Lines Matching refs:prop

496 	HalProperty *prop;  in hal_device_property_to_string()  local
498 prop = hal_device_property_find (device, key); in hal_device_property_to_string()
499 if (!prop) in hal_device_property_to_string()
502 return hal_property_to_string (prop); in hal_device_property_to_string()
529 HalProperty *prop; in hal_device_property_get_type() local
534 prop = hal_device_property_find (device, key); in hal_device_property_get_type()
536 if (prop != NULL) in hal_device_property_get_type()
537 return hal_property_get_type (prop); in hal_device_property_get_type()
545 HalProperty *prop; in hal_device_property_get_string() local
550 prop = hal_device_property_find (device, key); in hal_device_property_get_string()
552 if (prop != NULL) in hal_device_property_get_string()
553 return hal_property_get_string (prop); in hal_device_property_get_string()
561 HalProperty *prop; in hal_device_property_get_as_string() local
567 prop = hal_device_property_find (device, key); in hal_device_property_get_as_string()
569 if (prop != NULL) { in hal_device_property_get_as_string()
570 switch (hal_property_get_type (prop)) { in hal_device_property_get_as_string()
572 strncpy (buf, hal_property_get_string (prop), bufsize); in hal_device_property_get_as_string()
575 snprintf (buf, bufsize, "%d", hal_property_get_int (prop)); in hal_device_property_get_as_string()
578 snprintf (buf, bufsize, "%llu", (long long unsigned int) hal_property_get_uint64 (prop)); in hal_device_property_get_as_string()
581 snprintf (buf, bufsize, "%f", hal_property_get_double (prop)); in hal_device_property_get_as_string()
584 strncpy (buf, hal_property_get_bool (prop) ? "true" : "false", bufsize); in hal_device_property_get_as_string()
596 for (iter = hal_property_get_strlist (prop); in hal_device_property_get_as_string()
625 HalProperty *prop; in hal_device_property_get_int() local
630 prop = hal_device_property_find (device, key); in hal_device_property_get_int()
632 if (prop != NULL) in hal_device_property_get_int()
633 return hal_property_get_int (prop); in hal_device_property_get_int()
641 HalProperty *prop; in hal_device_property_get_uint64() local
646 prop = hal_device_property_find (device, key); in hal_device_property_get_uint64()
648 if (prop != NULL) in hal_device_property_get_uint64()
649 return hal_property_get_uint64 (prop); in hal_device_property_get_uint64()
657 HalProperty *prop; in hal_device_property_get_bool() local
662 prop = hal_device_property_find (device, key); in hal_device_property_get_bool()
664 if (prop != NULL) in hal_device_property_get_bool()
665 return hal_property_get_bool (prop); in hal_device_property_get_bool()
673 HalProperty *prop; in hal_device_property_get_double() local
678 prop = hal_device_property_find (device, key); in hal_device_property_get_double()
680 if (prop != NULL) in hal_device_property_get_double()
681 return hal_property_get_double (prop); in hal_device_property_get_double()
690 HalProperty *prop; in hal_device_property_set_string() local
693 prop = hal_device_property_find (device, key); in hal_device_property_set_string()
695 if (prop != NULL) { in hal_device_property_set_string()
696 if (hal_property_get_type (prop) != HAL_PROPERTY_TYPE_STRING) in hal_device_property_set_string()
701 strcmp (hal_property_get_string (prop), value) == 0) in hal_device_property_set_string()
704 hal_property_set_string (prop, value); in hal_device_property_set_string()
711 prop = hal_property_new_string (key, value); in hal_device_property_set_string()
713 device->properties = g_slist_prepend (device->properties, prop); in hal_device_property_set_string()
726 HalProperty *prop; in hal_device_property_set_int() local
729 prop = hal_device_property_find (device, key); in hal_device_property_set_int()
731 if (prop != NULL) { in hal_device_property_set_int()
732 if (hal_property_get_type (prop) != HAL_PROPERTY_TYPE_INT32) in hal_device_property_set_int()
736 if (hal_property_get_int (prop) == value) in hal_device_property_set_int()
739 hal_property_set_int (prop, value); in hal_device_property_set_int()
745 prop = hal_property_new_int (key, value); in hal_device_property_set_int()
747 device->properties = g_slist_prepend (device->properties, prop); in hal_device_property_set_int()
760 HalProperty *prop; in hal_device_property_set_uint64() local
763 prop = hal_device_property_find (device, key); in hal_device_property_set_uint64()
765 if (prop != NULL) { in hal_device_property_set_uint64()
766 if (hal_property_get_type (prop) != HAL_PROPERTY_TYPE_UINT64) in hal_device_property_set_uint64()
770 if (hal_property_get_uint64 (prop) == value) in hal_device_property_set_uint64()
773 hal_property_set_uint64 (prop, value); in hal_device_property_set_uint64()
779 prop = hal_property_new_uint64 (key, value); in hal_device_property_set_uint64()
781 device->properties = g_slist_prepend (device->properties, prop); in hal_device_property_set_uint64()
794 HalProperty *prop; in hal_device_property_set_bool() local
797 prop = hal_device_property_find (device, key); in hal_device_property_set_bool()
799 if (prop != NULL) { in hal_device_property_set_bool()
800 if (hal_property_get_type (prop) != HAL_PROPERTY_TYPE_BOOLEAN) in hal_device_property_set_bool()
804 if (hal_property_get_bool (prop) == value) in hal_device_property_set_bool()
807 hal_property_set_bool (prop, value); in hal_device_property_set_bool()
813 prop = hal_property_new_bool (key, value); in hal_device_property_set_bool()
815 device->properties = g_slist_prepend (device->properties, prop); in hal_device_property_set_bool()
828 HalProperty *prop; in hal_device_property_set_double() local
831 prop = hal_device_property_find (device, key); in hal_device_property_set_double()
833 if (prop != NULL) { in hal_device_property_set_double()
834 if (hal_property_get_type (prop) != HAL_PROPERTY_TYPE_DOUBLE) in hal_device_property_set_double()
838 if (hal_property_get_double (prop) == value) in hal_device_property_set_double()
841 hal_property_set_double (prop, value); in hal_device_property_set_double()
847 prop = hal_property_new_double (key, value); in hal_device_property_set_double()
849 device->properties = g_slist_prepend (device->properties, prop); in hal_device_property_set_double()
896 HalProperty *prop; in hal_device_property_remove() local
898 prop = hal_device_property_find (device, key); in hal_device_property_remove()
900 if (prop == NULL) in hal_device_property_remove()
903 device->properties = g_slist_remove (device->properties, prop); in hal_device_property_remove()
905 hal_property_free (prop); in hal_device_property_remove()
919 HalProperty *prop; in hal_device_property_set_attribute() local
921 prop = hal_device_property_find (device, key); in hal_device_property_set_attribute()
923 if (prop == NULL) in hal_device_property_set_attribute()
1042 HalProperty *prop; in hal_device_async_wait_property() local
1046 prop = hal_device_property_find (device, key); in hal_device_async_wait_property()
1048 if (prop != NULL || timeout==0) { in hal_device_async_wait_property()
1049 callback (device, user_data, prop != NULL); in hal_device_async_wait_property()
1089 HalProperty *prop; in hal_device_property_get_strlist() local
1094 prop = hal_device_property_find (device, key); in hal_device_property_get_strlist()
1096 if (prop != NULL) in hal_device_property_get_strlist()
1097 return hal_property_get_strlist (prop); in hal_device_property_get_strlist()
1126 HalProperty *prop; in hal_device_property_strlist_append() local
1129 prop = hal_device_property_find (device, key); in hal_device_property_strlist_append()
1131 if (prop != NULL) { in hal_device_property_strlist_append()
1132 if (hal_property_get_type (prop) != HAL_PROPERTY_TYPE_STRLIST) in hal_device_property_strlist_append()
1135 hal_property_strlist_append (prop, value); in hal_device_property_strlist_append()
1141 prop = hal_property_new_strlist (key); in hal_device_property_strlist_append()
1142 hal_property_strlist_append (prop, value); in hal_device_property_strlist_append()
1144 device->properties = g_slist_prepend (device->properties, prop); in hal_device_property_strlist_append()
1158 HalProperty *prop; in hal_device_property_strlist_prepend() local
1161 prop = hal_device_property_find (device, key); in hal_device_property_strlist_prepend()
1163 if (prop != NULL) { in hal_device_property_strlist_prepend()
1164 if (hal_property_get_type (prop) != HAL_PROPERTY_TYPE_STRLIST) in hal_device_property_strlist_prepend()
1167 hal_property_strlist_prepend (prop, value); in hal_device_property_strlist_prepend()
1173 prop = hal_property_new_strlist (key); in hal_device_property_strlist_prepend()
1174 hal_property_strlist_prepend (prop, value); in hal_device_property_strlist_prepend()
1176 device->properties = g_slist_prepend (device->properties, prop); in hal_device_property_strlist_prepend()
1190 HalProperty *prop; in hal_device_property_strlist_remove_elem() local
1193 prop = hal_device_property_find (device, key); in hal_device_property_strlist_remove_elem()
1195 if (prop == NULL) in hal_device_property_strlist_remove_elem()
1198 if (hal_property_get_type (prop) != HAL_PROPERTY_TYPE_STRLIST) in hal_device_property_strlist_remove_elem()
1201 if (hal_property_strlist_remove_elem (prop, index)) { in hal_device_property_strlist_remove_elem()
1214 HalProperty *prop; in hal_device_property_strlist_clear() local
1217 prop = hal_device_property_find (device, key); in hal_device_property_strlist_clear()
1219 if (prop == NULL) { in hal_device_property_strlist_clear()
1220 prop = hal_property_new_strlist (key); in hal_device_property_strlist_clear()
1222 device->properties = g_slist_prepend (device->properties, prop); in hal_device_property_strlist_clear()
1230 if (hal_property_get_type (prop) != HAL_PROPERTY_TYPE_STRLIST) in hal_device_property_strlist_clear()
1233 if (hal_property_strlist_clear (prop)) { in hal_device_property_strlist_clear()
1248 HalProperty *prop; in hal_device_property_strlist_add() local
1254 prop = hal_device_property_find (device, key); in hal_device_property_strlist_add()
1256 if (prop != NULL) { in hal_device_property_strlist_add()
1257 if (hal_property_get_type (prop) != HAL_PROPERTY_TYPE_STRLIST) in hal_device_property_strlist_add()
1260 res = hal_property_strlist_add (prop, value); in hal_device_property_strlist_add()
1267 prop = hal_property_new_strlist (key); in hal_device_property_strlist_add()
1268 hal_property_strlist_prepend (prop, value); in hal_device_property_strlist_add()
1270 device->properties = g_slist_prepend (device->properties, prop); in hal_device_property_strlist_add()
1287 HalProperty *prop; in hal_device_property_strlist_remove() local
1290 prop = hal_device_property_find (device, key); in hal_device_property_strlist_remove()
1292 if (prop == NULL) in hal_device_property_strlist_remove()
1295 if (hal_property_get_type (prop) != HAL_PROPERTY_TYPE_STRLIST) in hal_device_property_strlist_remove()
1298 if (hal_property_strlist_remove (prop, value)) { in hal_device_property_strlist_remove()