Data Structures | |
struct | _E_Ofono_Element |
Typedefs | |
typedef struct _E_Ofono_Element | E_Ofono_Element |
Functions | |
EAPI E_Ofono_Element * | e_ofono_element_get (const char *path, const char *interface) EINA_ARG_NONNULL(1 |
EAPI Eina_Bool | e_ofono_element_is_manager (const E_Ofono_Element *element) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT |
EAPI Eina_Bool | e_ofono_element_is_modem (const E_Ofono_Element *element) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT |
EAPI Eina_Bool | e_ofono_element_is_netreg (const E_Ofono_Element *element) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT |
EAPI void | e_ofono_element_listener_add (E_Ofono_Element *element, void(*cb)(void *data, const E_Ofono_Element *element), const void *data, void(*free_data)(void *data)) EINA_ARG_NONNULL(1 |
EAPI void EAPI void | e_ofono_element_listener_del (E_Ofono_Element *element, void(*cb)(void *data, const E_Ofono_Element *element), const void *data) EINA_ARG_NONNULL(1 |
EAPI void | e_ofono_element_print (FILE *fp, const E_Ofono_Element *element) EINA_ARG_NONNULL(1 |
EAPI void | e_ofono_element_properties_list (const E_Ofono_Element *element, Eina_Bool(*cb)(void *data, const E_Ofono_Element *element, const char *name, int type, const void *value), const void *data) EINA_ARG_NONNULL(1 |
EAPI void EAPI Eina_Bool | e_ofono_element_properties_sync (E_Ofono_Element *element) EINA_ARG_NONNULL(1) |
EAPI Eina_Bool | e_ofono_element_properties_sync_full (E_Ofono_Element *element, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) |
EAPI Eina_Bool | e_ofono_element_property_dict_get_stringshared (const E_Ofono_Element *element, const char *dict_name, const char *key_name, int *type, void *value) EINA_ARG_NONNULL(1 |
EAPI Eina_Bool | e_ofono_element_property_dict_set_full (E_Ofono_Element *element, const char *prop, const char *key, int type, const void *value, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1 |
EAPI Eina_Bool | e_ofono_element_property_get (const E_Ofono_Element *element, const char *name, int *type, void *value) EINA_ARG_NONNULL(1 |
EAPI Eina_Bool | e_ofono_element_property_get_stringshared (const E_Ofono_Element *element, const char *name, int *type, void *value) EINA_ARG_NONNULL(1 |
EAPI Eina_Bool | e_ofono_element_property_set (E_Ofono_Element *element, const char *prop, int type, const void *value) EINA_ARG_NONNULL(1 |
EAPI Eina_Bool | e_ofono_element_property_set_full (E_Ofono_Element *element, const char *prop, int type, const void *value, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1 |
EAPI Eina_Bool | e_ofono_element_property_type_get (const E_Ofono_Element *element, const char *name, int *type) EINA_ARG_NONNULL(1 |
EAPI void EAPI Eina_Bool | e_ofono_element_property_type_get_stringshared (const E_Ofono_Element *element, const char *name, int *type) EINA_ARG_NONNULL(1 |
EAPI void EAPI void EAPI int | e_ofono_element_ref (E_Ofono_Element *element) EINA_ARG_NONNULL(1) |
EAPI int | e_ofono_element_unref (E_Ofono_Element *element) EINA_ARG_NONNULL(1) |
EAPI Eina_Bool | e_ofono_elements_get_all (unsigned int *count, E_Ofono_Element ***p_elements) EINA_ARG_NONNULL(1 |
EAPI Eina_Bool | e_ofono_elements_get_all_type (const char *type, unsigned int *count, E_Ofono_Element ***p_elements) EINA_ARG_NONNULL(1 |
EAPI E_Ofono_Element * | e_ofono_manager_get (void) EINA_WARN_UNUSED_RESULT |
EAPI Eina_Bool | e_ofono_manager_modems_get (Eina_Array **array) |
EAPI Eina_Bool | e_ofono_manager_sync_elements (void) |
EAPI Eina_Bool | e_ofono_modem_name_get (const E_Ofono_Element *element, const char **name) EINA_ARG_NONNULL(1 |
EAPI Eina_Bool | e_ofono_modem_powered_get (const E_Ofono_Element *element, Eina_Bool *powered) EINA_ARG_NONNULL(1 |
EAPI Eina_Bool | e_ofono_modem_powered_set (E_Ofono_Element *element, Eina_Bool powered, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT |
EAPI Eina_Bool | e_ofono_netreg_mode_get (const E_Ofono_Element *element, const char **mode) EINA_ARG_NONNULL(1 |
EAPI Eina_Bool | e_ofono_netreg_operator_get (const E_Ofono_Element *element, const char **op) EINA_ARG_NONNULL(1 |
EAPI Eina_Bool | e_ofono_netreg_status_get (const E_Ofono_Element *element, const char **status) EINA_ARG_NONNULL(1 |
EAPI Eina_Bool | e_ofono_netreg_strength_get (const E_Ofono_Element *element, uint8_t *strength) EINA_ARG_NONNULL(1 |
EAPI Eina_Bool | e_ofono_sms_sca_get (const E_Ofono_Element *element, const char **sca) EINA_ARG_NONNULL(1 |
EAPI Eina_Bool | e_ofono_sms_sca_set (E_Ofono_Element *element, const char *sca, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1 |
EAPI Eina_Bool | e_ofono_sms_send_message (E_Ofono_Element *element, const char *number, const char *message, E_DBus_Method_Return_Cb cb, const void *data) EINA_ARG_NONNULL(1 |
EAPI unsigned int | e_ofono_system_init (E_DBus_Connection *edbus_conn) EINA_ARG_NONNULL(1) |
EAPI unsigned int | e_ofono_system_shutdown (void) |
Variables | |
int | E_OFONO_EVENT_ELEMENT_ADD |
int | E_OFONO_EVENT_ELEMENT_DEL |
int | E_OFONO_EVENT_ELEMENT_UPDATED |
int | E_OFONO_EVENT_MANAGER_IN |
int | E_OFONO_EVENT_MANAGER_OUT |
EAPI Eina_Bool | EINA_WARN_UNUSED_RESULT |
Typedef Documentation
typedef struct _E_Ofono_Element E_Ofono_Element |
Function Documentation
EAPI E_Ofono_Element* e_ofono_element_get | ( | const char * | path, |
const char * | interface | ||
) |
EAPI Eina_Bool e_ofono_element_is_manager | ( | const E_Ofono_Element * | element | ) |
References e_ofono_iface_manager.
EAPI Eina_Bool e_ofono_element_is_modem | ( | const E_Ofono_Element * | element | ) |
References e_ofono_iface_modem.
EAPI Eina_Bool e_ofono_element_is_netreg | ( | const E_Ofono_Element * | element | ) |
References e_ofono_iface_netreg.
EAPI void e_ofono_element_listener_add | ( | E_Ofono_Element * | element, |
void(*)(void *data, const E_Ofono_Element *element) | cb, | ||
const void * | data, | ||
void(*)(void *data) | free_data | ||
) |
EAPI void EAPI void e_ofono_element_listener_del | ( | E_Ofono_Element * | element, |
void(*)(void *data, const E_Ofono_Element *element) | cb, | ||
const void * | data | ||
) |
EAPI void e_ofono_element_print | ( | FILE * | fp, |
const E_Ofono_Element * | element | ||
) |
EAPI void e_ofono_element_properties_list | ( | const E_Ofono_Element * | element, |
Eina_Bool(*)(void *data, const E_Ofono_Element *element, const char *name, int type, const void *value) | cb, | ||
const void * | data | ||
) |
EAPI void EAPI Eina_Bool e_ofono_element_properties_sync | ( | E_Ofono_Element * | element | ) |
Sync element properties with server, simple version.
Call method GetProperties() at the given element on server in order to sync them. This is the simple version and there is no check of server reply for errors.
- Parameters:
-
element to call method on server.
- Returns:
EINA_TRUE
on success,EINA_FALSE
otherwise.
References e_ofono_element_sync_properties_full().
Referenced by e_ofono_manager_sync_elements().
EAPI Eina_Bool e_ofono_element_properties_sync_full | ( | E_Ofono_Element * | element, |
E_DBus_Method_Return_Cb | cb, | ||
const void * | data | ||
) |
EAPI Eina_Bool e_ofono_element_property_dict_get_stringshared | ( | const E_Ofono_Element * | element, |
const char * | dict_name, | ||
const char * | key_name, | ||
int * | type, | ||
void * | value | ||
) |
EAPI Eina_Bool e_ofono_element_property_dict_set_full | ( | E_Ofono_Element * | element, |
const char * | prop, | ||
const char * | key, | ||
int | type, | ||
const void * | value, | ||
E_DBus_Method_Return_Cb | cb, | ||
const void * | data | ||
) |
EAPI Eina_Bool e_ofono_element_property_get | ( | const E_Ofono_Element * | element, |
const char * | name, | ||
int * | type, | ||
void * | value | ||
) |
EAPI Eina_Bool e_ofono_element_property_get_stringshared | ( | const E_Ofono_Element * | element, |
const char * | name, | ||
int * | type, | ||
void * | value | ||
) |
Referenced by e_ofono_element_bytes_array_get_stringshared(), e_ofono_element_objects_array_get_stringshared(), e_ofono_element_property_get(), e_ofono_element_strings_array_get_stringshared(), e_ofono_manager_modems_get(), e_ofono_modem_name_get(), e_ofono_modem_powered_get(), e_ofono_netreg_mode_get(), e_ofono_netreg_operator_get(), e_ofono_netreg_status_get(), e_ofono_netreg_strength_get(), and e_ofono_sms_sca_get().
EAPI Eina_Bool e_ofono_element_property_set | ( | E_Ofono_Element * | element, |
const char * | prop, | ||
int | type, | ||
const void * | value | ||
) |
EAPI Eina_Bool e_ofono_element_property_set_full | ( | E_Ofono_Element * | element, |
const char * | prop, | ||
int | type, | ||
const void * | value, | ||
E_DBus_Method_Return_Cb | cb, | ||
const void * | data | ||
) |
Referenced by e_ofono_element_property_set(), e_ofono_modem_powered_set(), and e_ofono_sms_sca_set().
EAPI Eina_Bool e_ofono_element_property_type_get | ( | const E_Ofono_Element * | element, |
const char * | name, | ||
int * | type | ||
) |
EAPI void EAPI Eina_Bool e_ofono_element_property_type_get_stringshared | ( | const E_Ofono_Element * | element, |
const char * | name, | ||
int * | type | ||
) |
Referenced by e_ofono_element_property_type_get().
EAPI void EAPI void EAPI int e_ofono_element_ref | ( | E_Ofono_Element * | element | ) |
Add reference to element.
References _E_Ofono_Element::_references.
EAPI int e_ofono_element_unref | ( | E_Ofono_Element * | element | ) |
Remove reference from element.
If reference count drops to 0 element will be freed.
References _E_Ofono_Element::_references, and ERR.
EAPI Eina_Bool e_ofono_elements_get_all | ( | unsigned int * | count, |
E_Ofono_Element *** | p_elements | ||
) |
EAPI Eina_Bool e_ofono_elements_get_all_type | ( | const char * | type, |
unsigned int * | count, | ||
E_Ofono_Element *** | p_elements | ||
) |
EAPI E_Ofono_Element* e_ofono_manager_get | ( | void | ) |
Get the element manager.
- Returns:
- element pointer if found, NULL otherwise.
References e_ofono_element_get(), and e_ofono_iface_manager.
EAPI Eina_Bool e_ofono_manager_modems_get | ( | Eina_Array ** | array | ) |
Get array of modem object paths.
If this property isn't found then 0 is returned. If zero is returned, then this call failed and parameter-returned values shall be considered invalid.
- Parameters:
-
array where to store the property value, must be a pointer to Eina_Array (Eina_Array **), it will not be allocated or copied and references will be valid until element changes, so copy it if you want to use it later.
- Returns:
EINA_TRUE
on success,EINA_FALSE
otherwise.
References _E_Ofono_Array::array, e_ofono_element_get(), e_ofono_element_property_get_stringshared(), e_ofono_iface_manager, and e_ofono_prop_modems.
EAPI Eina_Bool e_ofono_manager_sync_elements | ( | void | ) |
Synchronize elements with server.
This will call Manager.GetProperties() on server, retrieve properties and some element paths and then request their properties.
This call will add events E_OFONO_EVENT_ELEMENT_ADD and E_OFONO_EVENT_ELEMENT_UPDATED to the main loop.
This will not remove stale elements.
- Returns:
EINA_TRUE
on success,EINA_FALSE
otherwise.
References DBG, e_ofono_element_properties_sync(), e_ofono_element_register(), and e_ofono_iface_manager.
EAPI Eina_Bool e_ofono_modem_name_get | ( | const E_Ofono_Element * | element, |
const char ** | name | ||
) |
EAPI Eina_Bool e_ofono_modem_powered_get | ( | const E_Ofono_Element * | element, |
Eina_Bool * | powered | ||
) |
EAPI Eina_Bool e_ofono_modem_powered_set | ( | E_Ofono_Element * | element, |
Eina_Bool | powered, | ||
E_DBus_Method_Return_Cb | cb, | ||
const void * | data | ||
) |
Call method SetProperty("Powered", powered) at the given element on server.
- Parameters:
-
powered value to set. cb function to call when server replies or some error happens. data data to give to cb when it is called.
- Returns:
EINA_TRUE
on success,EINA_FALSE
otherwise.
References e_ofono_element_property_set_full(), and e_ofono_prop_powered.
EAPI Eina_Bool e_ofono_netreg_mode_get | ( | const E_Ofono_Element * | element, |
const char ** | mode | ||
) |
EAPI Eina_Bool e_ofono_netreg_operator_get | ( | const E_Ofono_Element * | element, |
const char ** | op | ||
) |
EAPI Eina_Bool e_ofono_netreg_status_get | ( | const E_Ofono_Element * | element, |
const char ** | status | ||
) |
EAPI Eina_Bool e_ofono_netreg_strength_get | ( | const E_Ofono_Element * | element, |
uint8_t * | strength | ||
) |
EAPI Eina_Bool e_ofono_sms_sca_get | ( | const E_Ofono_Element * | element, |
const char ** | sca | ||
) |
EAPI Eina_Bool e_ofono_sms_sca_set | ( | E_Ofono_Element * | element, |
const char * | sca, | ||
E_DBus_Method_Return_Cb | cb, | ||
const void * | data | ||
) |
EAPI Eina_Bool e_ofono_sms_send_message | ( | E_Ofono_Element * | element, |
const char * | number, | ||
const char * | message, | ||
E_DBus_Method_Return_Cb | cb, | ||
const void * | data | ||
) |
EAPI unsigned int e_ofono_system_init | ( | E_DBus_Connection * | edbus_conn | ) |
Initialize E oFono (E_Ofono) system.
This will connect and watch org.ofono.Manager and Element events and translate to Ecore main loop events, also provide a proxy for method invocation on server.
Interesting events are:
- E_OFONO_EVENT_MANAGER_IN: issued when ofono is avaiable.
- E_OFONO_EVENT_MANAGER_OUT: issued when ofono connection is lost.
- E_OFONO_EVENT_ELEMENT_ADD: element was added.
- E_OFONO_EVENT_ELEMENT_DEL: element was deleted.
- E_OFONO_EVENT_ELEMENT_UPDATED: element was updated (properties or state changed).
Manager IN/OUT events do not provide any event information, just tells you that system is usable or not. After manager is out, all elements will be removed, so after this event do not use the system anymore.
Element events will give you an element object. After DEL event callback returns, that element will not be valid anymore.
References _e_dbus_ofono_log_dom, E_DBUS_FDO_BUS, E_DBUS_FDO_INTERFACE, E_DBUS_FDO_PATH, e_dbus_get_name_owner(), e_dbus_signal_handler_add(), e_ofono_elements_init(), E_OFONO_EVENT_ELEMENT_ADD, E_OFONO_EVENT_ELEMENT_DEL, E_OFONO_EVENT_ELEMENT_UPDATED, E_OFONO_EVENT_MANAGER_IN, E_OFONO_EVENT_MANAGER_OUT, e_ofono_iface_manager, e_ofono_iface_modem, e_ofono_iface_netreg, e_ofono_iface_sms, e_ofono_method_send_sms, e_ofono_prop_interfaces, e_ofono_prop_mode, e_ofono_prop_modems, e_ofono_prop_name, e_ofono_prop_operator, e_ofono_prop_powered, e_ofono_prop_sca, e_ofono_prop_status, e_ofono_prop_strength, and EINA_LOG_DEFAULT_COLOR.
EAPI unsigned int e_ofono_system_shutdown | ( | void | ) |
Shutdown ofono system.
When count drops to 0 resources will be released and no calls should be made anymore.
References e_ofono_iface_manager, e_ofono_iface_modem, e_ofono_iface_netreg, e_ofono_iface_sms, e_ofono_method_send_sms, e_ofono_prop_interfaces, e_ofono_prop_mode, e_ofono_prop_modems, e_ofono_prop_name, e_ofono_prop_operator, e_ofono_prop_powered, e_ofono_prop_sca, e_ofono_prop_status, e_ofono_prop_strength, and ERR.
Variable Documentation
Referenced by e_ofono_element_register(), and e_ofono_system_init().
Referenced by e_ofono_system_init().
Referenced by e_ofono_system_init().
Referenced by e_ofono_system_init().
Referenced by e_ofono_system_init().
EAPI Eina_Bool EINA_WARN_UNUSED_RESULT |