e_ofono_private.h File Reference
#include <stddef.h>
#include <stdio.h>
#include <Eina.h>
#include <eina_safety_checks.h>
#include "E_Ofono.h"
+ Include dependency graph for e_ofono_private.h:
+ This graph shows which files directly or indirectly include this file:

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_Elemente_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_Connectione_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,
 
)    __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 
)
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 
)

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
paththe 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
elementelement 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  )
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().

Variable Documentation

int _e_dbus_ofono_log_dom

Referenced by e_ofono_system_init().

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_status
const char* e_ofono_prop_strength