Lines Matching refs:property

111 void property_free(bt_property_t *property) {  in property_free()  argument
112 property_free_array(property, 1); in property_free()
126 bool property_is_addr(const bt_property_t *property) { in property_is_addr() argument
127 assert(property != NULL); in property_is_addr()
128 return property->type == BT_PROPERTY_BDADDR; in property_is_addr()
131 bool property_is_device_class(const bt_property_t *property) { in property_is_device_class() argument
132 assert(property != NULL); in property_is_device_class()
133 return property->type == BT_PROPERTY_CLASS_OF_DEVICE; in property_is_device_class()
136 bool property_is_device_type(const bt_property_t *property) { in property_is_device_type() argument
137 assert(property != NULL); in property_is_device_type()
138 return property->type == BT_PROPERTY_TYPE_OF_DEVICE; in property_is_device_type()
141 bool property_is_discovery_timeout(const bt_property_t *property) { in property_is_discovery_timeout() argument
142 assert(property != NULL); in property_is_discovery_timeout()
143 return property->type == BT_PROPERTY_ADAPTER_DISCOVERY_TIMEOUT; in property_is_discovery_timeout()
146 bool property_is_name(const bt_property_t *property) { in property_is_name() argument
147 assert(property != NULL); in property_is_name()
148 return property->type == BT_PROPERTY_BDNAME; in property_is_name()
151 bool property_is_rssi(const bt_property_t *property) { in property_is_rssi() argument
152 assert(property != NULL); in property_is_rssi()
153 return property->type == BT_PROPERTY_REMOTE_RSSI; in property_is_rssi()
156 bool property_is_scan_mode(const bt_property_t *property) { in property_is_scan_mode() argument
157 assert(property != NULL); in property_is_scan_mode()
158 return property->type == BT_PROPERTY_ADAPTER_SCAN_MODE; in property_is_scan_mode()
161 bool property_is_uuids(const bt_property_t *property) { in property_is_uuids() argument
162 assert(property != NULL); in property_is_uuids()
163 return property->type == BT_PROPERTY_UUIDS; in property_is_uuids()
167 const bt_bdaddr_t *property_as_addr(const bt_property_t *property) { in property_as_addr() argument
168 assert(property_is_addr(property)); in property_as_addr()
169 return (const bt_bdaddr_t *)property->val; in property_as_addr()
172 const bt_device_class_t *property_as_device_class(const bt_property_t *property) { in property_as_device_class() argument
173 assert(property_is_device_class(property)); in property_as_device_class()
174 return (const bt_device_class_t *)property->val; in property_as_device_class()
177 bt_device_type_t property_as_device_type(const bt_property_t *property) { in property_as_device_type() argument
178 assert(property_is_device_type(property)); in property_as_device_type()
179 return *(const bt_device_type_t *)property->val; in property_as_device_type()
182 uint32_t property_as_discovery_timeout(const bt_property_t *property) { in property_as_discovery_timeout() argument
183 assert(property_is_discovery_timeout(property)); in property_as_discovery_timeout()
184 return *(const uint32_t *)property->val; in property_as_discovery_timeout()
187 const bt_bdname_t *property_as_name(const bt_property_t *property) { in property_as_name() argument
188 assert(property_is_name(property)); in property_as_name()
189 return (const bt_bdname_t *)property->val; in property_as_name()
192 int8_t property_as_rssi(const bt_property_t *property) { in property_as_rssi() argument
193 assert(property_is_rssi(property)); in property_as_rssi()
194 return *(const int8_t *)property->val; in property_as_rssi()
197 bt_scan_mode_t property_as_scan_mode(const bt_property_t *property) { in property_as_scan_mode() argument
198 assert(property_is_scan_mode(property)); in property_as_scan_mode()
199 return *(const bt_scan_mode_t *)property->val; in property_as_scan_mode()
202 const bt_uuid_t *property_as_uuids(const bt_property_t *property, size_t *count) { in property_as_uuids() argument
203 assert(property_is_uuids(property)); in property_as_uuids()
204 *count = sizeof(bt_uuid_t) / property->len; in property_as_uuids()
205 return (const bt_uuid_t *)property->val; in property_as_uuids()
209 bt_property_t *property = osi_calloc(sizeof(bt_property_t)); in property_new_() local
211 property->val = osi_malloc(len); in property_new_()
212 memcpy(property->val, val, len); in property_new_()
214 property->type = type; in property_new_()
215 property->len = len; in property_new_()
217 return property; in property_new_()