org.freedesktop.DBus.Properties
Eldbus » Basic FreeDesktop.Org Methods

## Functions

Eina_Bool | eldbus_proxy_properties_monitor (Eldbus_Proxy *proxy, Eina_Bool enable)
| Enable or disable local cache of properties.
Eldbus_Pending * | eldbus_proxy_property_get (Eldbus_Proxy *proxy, const char *name, Eldbus_Message_Cb cb, const void *data)
| Get a property.
Eldbus_Pending * | eldbus_proxy_property_set (Eldbus_Proxy *proxy, const char *name, const char *sig, const void *value, Eldbus_Message_Cb cb, const void *data)
| Set a property.
Eldbus_Pending * | eldbus_proxy_property_value_set (Eldbus_Proxy *proxy, const char *name, const char *sig, const Eina_Value *value, Eldbus_Message_Cb cb, const void *data)
| Set a property with a Eina_Value.
Eldbus_Pending * | eldbus_proxy_property_get_all (Eldbus_Proxy *proxy, Eldbus_Message_Cb cb, const void *data)
| Get all properties.
Eldbus_Signal_Handler * | eldbus_proxy_properties_changed_callback_add (Eldbus_Proxy *proxy, Eldbus_Signal_Cb cb, const void *data)
| Register a callback on "PropertiesChanged" signal.
Eina_Value * | eldbus_proxy_property_local_get (Eldbus_Proxy *proxy, const char *name)
| Return the cached value of property.
const Eina_Hash * | eldbus_proxy_property_local_get_all (Eldbus_Proxy *proxy)
| Get all cached properties.

## Detailed Description

## Function Documentation

## eldbus_proxy_properties_monitor()

Eina_Bool eldbus_proxy_properties_monitor | ( | Eldbus_Proxy * | proxy,
|  | Eina_Bool | enable )

Enable or disable local cache of properties.

After enable you can call eldbus_proxy_property_local_get() or eldbus_proxy_property_local_get_all() to get cached properties.

Parameters

  proxy | bus+path+interface that the properties belong
  enable | enable or disable properties monitor

Returns
  EINA_TRUE if already have cached properties EINA_FALSE if it will asynchrony get the properties. You should listen for a ELDBUS_PROXY_EVENT_PROPERTY_LOADED to know when properties finish to load.

Examples
  complex-types-client-eina-value.c.

References EINA_FALSE, eina_hash_free(), eina_hash_population(), eina_hash_string_superfast_new(), EINA_TRUE, eldbus_proxy_event_callback_add(), ELDBUS_PROXY_EVENT_PROPERTY_CHANGED, ELDBUS_PROXY_EVENT_PROPERTY_REMOVED, eldbus_proxy_properties_changed_callback_add(), eldbus_proxy_property_get_all(), and eldbus_signal_handler_unref().

## eldbus_proxy_property_get()

Eldbus_Pending * eldbus_proxy_property_get | ( | Eldbus_Proxy * | proxy,
|  | const char * | name,
|  | Eldbus_Message_Cb | cb,
|  | const void * | data )

Get a property.

Parameters

  proxy | The proxy object on which to do the query.
  name | The property name to get.
  cb | The callback to be called when receiving an answer.
  data | Data to be passed to the callback.

Returns
  Eldbus_Pending object corresponding to the message sent.

Examples
  complex-types.c.

References EINA_SAFETY_ON_NULL_RETURN_VAL, and eldbus_proxy_call().

## eldbus_proxy_property_set()

Eldbus_Pending * eldbus_proxy_property_set | ( | Eldbus_Proxy * | proxy,
|  | const char * | name,
|  | const char * | sig,
|  | const void * | value,
|  | Eldbus_Message_Cb | cb,
|  | const void * | data )

Set a property.

Parameters

  proxy | The proxy object on which to do the query.
  name | The property name to get.
  sig |
  value | The value to set.
  cb | The callback to be called when receiving an answer.
  data | Data to be passed to the callback.

Returns
  Eldbus_Pending object corresponding to the message sent.

Examples
  complex-types.c.

References EINA_SAFETY_ON_FALSE_RETURN_VAL, EINA_SAFETY_ON_NULL_RETURN_VAL, eldbus_message_iter_basic_append(), eldbus_message_iter_container_close(), eldbus_message_iter_container_new(), eldbus_message_iter_get(), eldbus_message_unref(), eldbus_proxy_method_call_new(), and eldbus_proxy_send().

## eldbus_proxy_property_value_set()

Eldbus_Pending * eldbus_proxy_property_value_set | ( | Eldbus_Proxy * | proxy,
|  | const char * | name,
|  | const char * | sig,
|  | const Eina_Value * | value,
|  | Eldbus_Message_Cb | cb,
|  | const void * | data )

Set a property with a Eina_Value.

Parameters

  proxy | The proxy object on which to do the query.
  name | The property name to get.
  sig |
  value | The value to set.
  cb | The callback to be called when receiving an answer.
  data | Data to be passed to the callback.

Returns
  Eldbus_Pending object corresponding to the message sent.

Since
  1.17

References EINA_SAFETY_ON_FALSE_RETURN_VAL, EINA_SAFETY_ON_NULL_RETURN_VAL, eldbus_message_iter_basic_append(), eldbus_message_iter_container_close(), eldbus_message_iter_container_new(), eldbus_message_iter_get(), eldbus_message_unref(), eldbus_proxy_method_call_new(), and eldbus_proxy_send().

## eldbus_proxy_property_get_all()

Eldbus_Pending * eldbus_proxy_property_get_all | ( | Eldbus_Proxy * | proxy,
|  | Eldbus_Message_Cb | cb,
|  | const void * | data )

Get all properties.

Parameters

  proxy | The proxy object on which to do the query.
  cb | The callback to be called when receiving an answer.
  data | Data to be passed to the callback.

Returns
  Eldbus_Pending object corresponding to the message sent.

Examples
  banshee.c.

References eldbus_proxy_call().

Referenced by eldbus_proxy_properties_monitor().

## eldbus_proxy_properties_changed_callback_add()

Eldbus_Signal_Handler * eldbus_proxy_properties_changed_callback_add | ( | Eldbus_Proxy * | proxy,
|  | Eldbus_Signal_Cb | cb,
|  | const void * | data )

Register a callback on "PropertiesChanged" signal.

Parameters

  proxy | The proxy object on which to register the callback.
  cb | The callback to be called when receiving the signal.
  data | Data to be passed to the callback.

Returns
  Eldbus_Signal_Handler object representing a listener for "PropertiesChanged" signal.

References EINA_SAFETY_ON_NULL_RETURN_VAL, eldbus_proxy_signal_handler_add(), and eldbus_signal_handler_match_extra_set().

Referenced by eldbus_proxy_event_callback_add(), and eldbus_proxy_properties_monitor().

## eldbus_proxy_property_local_get()

Eina_Value * eldbus_proxy_property_local_get | ( | Eldbus_Proxy * | proxy,
|  | const char * | name )

Return the cached value of property.

This only work if you have enable eldbus_proxy_properties_monitor or if you have call eldbus_proxy_event_callback_add of type ELDBUS_PROXY_EVENT_PROPERTY_CHANGED and the property you want had changed.

Parameters

  proxy | The proxy object on which to do the query.
  name | The property name to get.

Returns
  Cached value of property.

Examples
  complex-types-client-eina-value.c.

References eina_hash_find(), and EINA_SAFETY_ON_NULL_RETURN_VAL.

## eldbus_proxy_property_local_get_all()

const Eina_Hash * eldbus_proxy_property_local_get_all | ( | Eldbus_Proxy * | proxy | ) |

Get all cached properties.

This only work if you have enable eldbus_proxy_properties_monitor or if you have call eldbus_proxy_event_callback_add of type ELDBUS_PROXY_EVENT_PROPERTY_CHANGED.

Parameters

  proxy | The proxy object on which to do the query.

Returns
  A Eina_Hash with all cached properties

References EINA_SAFETY_ON_NULL_RETURN_VAL.