Lines Matching refs:prop

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