#include <stddef.h>
#include <stdio.h>
#include <Eina.h>
#include <eina_safety_checks.h>
#include "E_Ofono.h"


Go to the source code of this file.
Data Structures | |
struct | _E_Ofono_Array |
Macros | |
#define | _dbus_iter_type_check(t, e) __dbus_iter_type_check(t, e, # e) |
#define | DBG(...) EINA_LOG_DOM_DBG(_e_dbus_ofono_log_dom, __VA_ARGS__) |
#define | EINA_LOG_DEFAULT_COLOR EINA_COLOR_CYAN |
#define | ERR(...) EINA_LOG_DOM_ERR(_e_dbus_ofono_log_dom, __VA_ARGS__) |
#define | INF(...) EINA_LOG_DOM_INFO(_e_dbus_ofono_log_dom, __VA_ARGS__) |
#define | WRN(...) EINA_LOG_DOM_WARN(_e_dbus_ofono_log_dom, __VA_ARGS__) |
Typedefs | |
typedef struct _E_Ofono_Array | E_Ofono_Array |
Functions | |
void * | alloca (size_t) |
Eina_Bool | e_ofono_element_call_full (E_Ofono_Element *element, const char *method_name, const char *interface, E_DBus_Method_Return_Cb cb, Eina_Inlist **pending, E_DBus_Method_Return_Cb user_cb, const void *user_data) |
Eina_Bool | e_ofono_element_call_with_path (E_Ofono_Element *element, const char *method_name, const char *string, E_DBus_Method_Return_Cb cb, Eina_Inlist **pending, E_DBus_Method_Return_Cb user_cb, const void *user_data) |
Eina_Bool | e_ofono_element_call_with_path_and_string (E_Ofono_Element *element, const char *method_name, const char *path, const char *string, E_DBus_Method_Return_Cb cb, Eina_Inlist **pending, E_DBus_Method_Return_Cb user_cb, const void *user_data) |
Eina_Bool | e_ofono_element_call_with_string (E_Ofono_Element *element, const char *method_name, const char *string, E_DBus_Method_Return_Cb cb, Eina_Inlist **pending, E_DBus_Method_Return_Cb user_cb, const void *user_data) |
Eina_Bool | e_ofono_element_message_send (E_Ofono_Element *element, const char *method_name, const char *interface, E_DBus_Method_Return_Cb cb, DBusMessage *msg, Eina_Inlist **pending, E_DBus_Method_Return_Cb user_cb, const void *user_data) |
E_Ofono_Element * | e_ofono_element_register (const char *path, const char *interface) |
void | e_ofono_element_unregister (E_Ofono_Element *element) |
void | e_ofono_elements_init (void) |
void | e_ofono_elements_shutdown (void) |
void | e_ofono_manager_clear_elements (void) |
const char * | e_ofono_system_bus_name_get (void) |
Variables | |
int | _e_dbus_ofono_log_dom |
E_DBus_Connection * | e_ofono_conn |
const char * | e_ofono_iface_manager |
const char * | e_ofono_iface_modem |
const char * | e_ofono_iface_netreg |
const char * | e_ofono_iface_sms |
const char * | e_ofono_method_send_sms |
const char * | e_ofono_prop_interfaces |
const char * | e_ofono_prop_mode |
const char * | e_ofono_prop_modems |
const char * | e_ofono_prop_name |
const char * | e_ofono_prop_operator |
const char * | e_ofono_prop_powered |
const char * | e_ofono_prop_sca |
const char * | e_ofono_prop_status |
const char * | e_ofono_prop_strength |
Macro Definition Documentation
#define _dbus_iter_type_check | ( | t, | |
e | |||
) | __dbus_iter_type_check(t, e, # e) |
#define DBG | ( | ... | ) | EINA_LOG_DOM_DBG(_e_dbus_ofono_log_dom, __VA_ARGS__) |
#define EINA_LOG_DEFAULT_COLOR EINA_COLOR_CYAN |
#define ERR | ( | ... | ) | EINA_LOG_DOM_ERR(_e_dbus_ofono_log_dom, __VA_ARGS__) |
#define INF | ( | ... | ) | EINA_LOG_DOM_INFO(_e_dbus_ofono_log_dom, __VA_ARGS__) |
#define WRN | ( | ... | ) | EINA_LOG_DOM_WARN(_e_dbus_ofono_log_dom, __VA_ARGS__) |
Typedef Documentation
typedef struct _E_Ofono_Array E_Ofono_Array |
Function Documentation
void* alloca | ( | size_t | ) |
Eina_Bool e_ofono_element_call_full | ( | E_Ofono_Element * | element, |
const char * | method_name, | ||
const char * | interface, | ||
E_DBus_Method_Return_Cb | cb, | ||
Eina_Inlist ** | pending, | ||
E_DBus_Method_Return_Cb | user_cb, | ||
const void * | user_data | ||
) |
References _dbus_iter_type_check, _E_Ofono_Array::array, DBG, e_ofono_element_message_send(), e_ofono_element_properties_sync(), e_ofono_element_register(), ERR, INF, _E_Ofono_Element::path, _E_Ofono_Element::props, _E_Ofono_Array::type, and WRN.
Referenced by e_ofono_element_properties_sync_full().
Eina_Bool e_ofono_element_call_with_path | ( | E_Ofono_Element * | element, |
const char * | method_name, | ||
const char * | string, | ||
E_DBus_Method_Return_Cb | cb, | ||
Eina_Inlist ** | pending, | ||
E_DBus_Method_Return_Cb | user_cb, | ||
const void * | user_data | ||
) |
Eina_Bool e_ofono_element_call_with_path_and_string | ( | E_Ofono_Element * | element, |
const char * | method_name, | ||
const char * | path, | ||
const char * | string, | ||
E_DBus_Method_Return_Cb | cb, | ||
Eina_Inlist ** | pending, | ||
E_DBus_Method_Return_Cb | user_cb, | ||
const void * | user_data | ||
) |
Eina_Bool e_ofono_element_call_with_string | ( | E_Ofono_Element * | element, |
const char * | method_name, | ||
const char * | string, | ||
E_DBus_Method_Return_Cb | cb, | ||
Eina_Inlist ** | pending, | ||
E_DBus_Method_Return_Cb | user_cb, | ||
const void * | user_data | ||
) |
Eina_Bool e_ofono_element_message_send | ( | E_Ofono_Element * | element, |
const char * | method_name, | ||
const char * | interface, | ||
E_DBus_Method_Return_Cb | cb, | ||
DBusMessage * | msg, | ||
Eina_Inlist ** | pending, | ||
E_DBus_Method_Return_Cb | user_cb, | ||
const void * | user_data | ||
) |
Send message with callbacks set to work with ofono elements.
If this call fails (returns 0), pending callbacks will not be called, not even with error messages.
- Returns
EINA_TRUE
on success,EINA_FALSE
otherwise.
References _E_Ofono_Element_Call_Data::cb, _E_Ofono_Element_Pending::data, e_dbus_message_send(), e_ofono_conn, e_ofono_system_bus_name_get(), _E_Ofono_Element_Call_Data::element, ERR, _E_Ofono_Element_Call_Data::p_list, _E_Ofono_Element::path, _E_Ofono_Element_Pending::pending, _E_Ofono_Element_Call_Data::pending, _E_Ofono_Element_Pending::user_cb, and _E_Ofono_Element_Pending::user_data.
Referenced by e_ofono_element_call_full(), e_ofono_element_call_with_path(), e_ofono_element_call_with_path_and_string(), e_ofono_element_call_with_string(), e_ofono_element_property_dict_set_full(), e_ofono_element_property_set_full(), and e_ofono_sms_send_message().
E_Ofono_Element* e_ofono_element_register | ( | const char * | path, |
const char * | interface | ||
) |
Register the given pair (path, interface), possibly creating an element and return it.
This will check if (path, interface) is already registered, in that case the exiting element is returned. If it was not registered yet, a new element is created, registered and returned.
This call will not add extra references to the object.
- Parameters
-
path the path to register the element
- Returns
- the registered object, no references are added.
References e_dbus_signal_handler_add(), e_ofono_conn, E_OFONO_EVENT_ELEMENT_ADD, e_ofono_system_bus_name_get(), e_ofono_elements_get_all_str_data::elements, ERR, _E_Ofono_Element::interface, MAX_KEY_SIZE, _E_Ofono_Element::path, and _E_Ofono_Element::signal_handler.
Referenced by e_ofono_element_call_full(), and e_ofono_manager_sync_elements().
void e_ofono_element_unregister | ( | E_Ofono_Element * | element | ) |
Forget about the given element.
This will remove the element from the pool of known objects, then add an E_OFONO_EVENT_ELEMENT_DEL and after that will unreference it, possible freeing it.
- Parameters
-
element element to forget about. Its reference will be removed.
References e_ofono_elements_get_all_str_data::elements, _E_Ofono_Element::interface, MAX_KEY_SIZE, and _E_Ofono_Element::path.
void e_ofono_elements_init | ( | void | ) |
Creates elements hash.
This has no init counter since its already guarded by other code.
References e_ofono_elements_get_all_str_data::elements.
Referenced by e_ofono_manager_clear_elements(), and e_ofono_system_init().
void e_ofono_elements_shutdown | ( | void | ) |
References e_ofono_elements_get_all_str_data::elements.
Referenced by e_ofono_manager_clear_elements().
void e_ofono_manager_clear_elements | ( | void | ) |
Remove all known elements.
This will remove all known elements but will NOT add any E_OFONO_EVENT_ELEMENT_DEL to main loop.
This is just useful to make sure next e_ofono_manager_sync_elements() will not leave any stale elements. This is unlikely to happen, as E_Ofono is supposed to catch all required events to avoid stale elements.
References e_ofono_elements_init(), and e_ofono_elements_shutdown().
const char* e_ofono_system_bus_name_get | ( | void | ) |
Variable Documentation
int _e_dbus_ofono_log_dom |
Referenced by e_ofono_system_init().
E_DBus_Connection* e_ofono_conn |
Referenced by e_ofono_element_message_send(), and e_ofono_element_register().
const char* e_ofono_iface_manager |
const char* e_ofono_iface_modem |
Referenced by e_ofono_element_is_modem(), e_ofono_system_init(), and e_ofono_system_shutdown().
const char* e_ofono_iface_netreg |
Referenced by e_ofono_element_is_netreg(), e_ofono_system_init(), and e_ofono_system_shutdown().
const char* e_ofono_iface_sms |
Referenced by e_ofono_sms_send_message(), e_ofono_system_init(), and e_ofono_system_shutdown().
const char* e_ofono_method_send_sms |
Referenced by e_ofono_sms_send_message(), e_ofono_system_init(), and e_ofono_system_shutdown().
const char* e_ofono_prop_interfaces |
Referenced by e_ofono_system_init(), and e_ofono_system_shutdown().
const char* e_ofono_prop_mode |
Referenced by e_ofono_netreg_mode_get(), e_ofono_system_init(), and e_ofono_system_shutdown().
const char* e_ofono_prop_modems |
Referenced by e_ofono_manager_modems_get(), e_ofono_system_init(), and e_ofono_system_shutdown().
const char* e_ofono_prop_name |
Referenced by e_ofono_modem_name_get(), e_ofono_system_init(), and e_ofono_system_shutdown().
const char* e_ofono_prop_operator |
Referenced by e_ofono_netreg_operator_get(), e_ofono_system_init(), and e_ofono_system_shutdown().
const char* e_ofono_prop_powered |
Referenced by e_ofono_modem_powered_get(), e_ofono_modem_powered_set(), e_ofono_system_init(), and e_ofono_system_shutdown().
const char* e_ofono_prop_sca |
Referenced by e_ofono_sms_sca_get(), e_ofono_sms_sca_set(), e_ofono_system_init(), and e_ofono_system_shutdown().
const char* e_ofono_prop_status |
Referenced by e_ofono_netreg_status_get(), e_ofono_system_init(), and e_ofono_system_shutdown().
const char* e_ofono_prop_strength |
Referenced by e_ofono_netreg_strength_get(), e_ofono_system_init(), and e_ofono_system_shutdown().