Lines Matching refs:prop

174 static int prop2cfg(bt_bdaddr_t *remote_bd_addr, bt_property_t *prop)  in prop2cfg()  argument
179 BTIF_TRACE_DEBUG("in, bd addr:%s, prop type:%d, len:%d", bdstr, prop->type, prop->len); in prop2cfg()
181 if(prop->len <= 0 || prop->len > (int)sizeof(value) - 1) in prop2cfg()
183 BTIF_TRACE_ERROR("property type:%d, len:%d is invalid", prop->type, prop->len); in prop2cfg()
186 switch(prop->type) in prop2cfg()
193 strncpy(value, (char*)prop->val, prop->len); in prop2cfg()
194 value[prop->len]='\0'; in prop2cfg()
202 strncpy(value, (char*)prop->val, prop->len); in prop2cfg()
203 value[prop->len]='\0'; in prop2cfg()
208 BTIF_STORAGE_KEY_ADAPTER_SCANMODE, *(int*)prop->val); in prop2cfg()
212 BTIF_STORAGE_KEY_ADAPTER_DISC_TIMEOUT, *(int*)prop->val); in prop2cfg()
216 BTIF_STORAGE_PATH_REMOTE_DEVCLASS, *(int*)prop->val); in prop2cfg()
220 BTIF_STORAGE_PATH_REMOTE_DEVTYPE, *(int*)prop->val); in prop2cfg()
227 for (i=0; i < (prop->len)/sizeof(bt_uuid_t); i++) in prop2cfg()
229 bt_uuid_t *p_uuid = (bt_uuid_t*)prop->val + i; in prop2cfg()
241 bt_remote_version_t *info = (bt_remote_version_t *)prop->val; in prop2cfg()
255 BTIF_TRACE_ERROR("Unknown prop type:%d", prop->type); in prop2cfg()
267 static int cfg2prop(bt_bdaddr_t *remote_bd_addr, bt_property_t *prop) in cfg2prop() argument
272 BTIF_TRACE_DEBUG("in, bd addr:%s, prop type:%d, len:%d", bdstr, prop->type, prop->len); in cfg2prop()
273 if(prop->len <= 0) in cfg2prop()
275 BTIF_TRACE_ERROR("property type:%d, len:%d is invalid", prop->type, prop->len); in cfg2prop()
279 switch(prop->type) in cfg2prop()
282 if(prop->len >= (int)sizeof(int)) in cfg2prop()
284 BTIF_STORAGE_PATH_REMOTE_DEVTIME, (int*)prop->val); in cfg2prop()
288 int len = prop->len; in cfg2prop()
291 BTIF_STORAGE_PATH_REMOTE_NAME, (char*)prop->val, &len); in cfg2prop()
293 BTIF_STORAGE_KEY_ADAPTER_NAME, (char*)prop->val, &len); in cfg2prop()
294 if(ret && len && len <= prop->len) in cfg2prop()
295 prop->len = len - 1; in cfg2prop()
298 prop->len = 0; in cfg2prop()
305 int len = prop->len; in cfg2prop()
307 BTIF_STORAGE_PATH_REMOTE_ALIASE, (char*)prop->val, &len); in cfg2prop()
308 if(ret && len && len <= prop->len) in cfg2prop()
309 prop->len = len - 1; in cfg2prop()
312 prop->len = 0; in cfg2prop()
318 if(prop->len >= (int)sizeof(int)) in cfg2prop()
320 BTIF_STORAGE_KEY_ADAPTER_SCANMODE, (int*)prop->val); in cfg2prop()
323 if(prop->len >= (int)sizeof(int)) in cfg2prop()
325 BTIF_STORAGE_KEY_ADAPTER_DISC_TIMEOUT, (int*)prop->val); in cfg2prop()
328 if(prop->len >= (int)sizeof(int)) in cfg2prop()
330 BTIF_STORAGE_PATH_REMOTE_DEVCLASS, (int*)prop->val); in cfg2prop()
333 if(prop->len >= (int)sizeof(int)) in cfg2prop()
334 ret = btif_config_get_int(bdstr, BTIF_STORAGE_PATH_REMOTE_DEVTYPE, (int*)prop->val); in cfg2prop()
343 bt_uuid_t *p_uuid = (bt_uuid_t*)prop->val; in cfg2prop()
345 prop->len = num_uuids * sizeof(bt_uuid_t); in cfg2prop()
350 prop->val = NULL; in cfg2prop()
351 prop->len = 0; in cfg2prop()
357 bt_remote_version_t *info = (bt_remote_version_t *)prop->val; in cfg2prop()
359 if(prop->len >= (int)sizeof(bt_remote_version_t)) in cfg2prop()
375 BTIF_TRACE_ERROR("Unknow prop type:%d", prop->type); in cfg2prop()