e_dbus: uncrustify ofono module
authorlucas <lucas@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 16 Sep 2010 01:11:08 +0000 (01:11 +0000)
committerlucas <lucas@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Thu, 16 Sep 2010 01:11:08 +0000 (01:11 +0000)
The following exceptions apply to current uncrustify config:

mod_add_long_function_closebrace_comment=0
mod_add_long_switch_closebrace_comment=0
mod_add_long_ifdef_endif_comment=0
mod_add_long_ifdef_else_comment=0
mod_full_brace_if_chain=true

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/e_dbus@52332 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/ofono/E_Ofono.h
src/lib/ofono/e_ofono.c
src/lib/ofono/e_ofono_element.c
src/lib/ofono/e_ofono_manager.c
src/lib/ofono/e_ofono_modem.c
src/lib/ofono/e_ofono_network_reg.c
src/lib/ofono/e_ofono_private.h
src/lib/ofono/e_ofono_sms.c

index e0ef0c8..d96f74b 100644 (file)
 extern "C" {
 #endif
 
-  /* Ecore Events */
-  extern int E_OFONO_EVENT_MANAGER_IN;
-  extern int E_OFONO_EVENT_MANAGER_OUT;
-  extern int E_OFONO_EVENT_ELEMENT_ADD;
-  extern int E_OFONO_EVENT_ELEMENT_DEL;
-  extern int E_OFONO_EVENT_ELEMENT_UPDATED;
-
-  typedef struct _E_Ofono_Element E_Ofono_Element;
-
-  struct _E_Ofono_Element
-  {
-     const char *path;
-     const char *interface;
-     E_DBus_Signal_Handler *signal_handler;
-     Eina_Inlist *props;
-
-     /* private */
-     struct {
-       Eina_Inlist *properties_get;
-       Eina_Inlist *property_set;
-       Eina_Inlist *send_sms;
-     } _pending;
-     struct {
-       Ecore_Idler *changed;
-     } _idler;
-     Eina_Inlist *_listeners;
-     int _references;
-  };
-
-  /* General Public API */
-  EAPI unsigned int e_ofono_system_init(E_DBus_Connection *edbus_conn) EINA_ARG_NONNULL(1);
-  EAPI unsigned int e_ofono_system_shutdown(void);
-
-  /* Manager Methods */
-  EAPI E_Ofono_Element *e_ofono_manager_get(void) EINA_WARN_UNUSED_RESULT;
-  EAPI Eina_Bool e_ofono_manager_modems_get(Eina_Array **array);
-
-  /* Modem Methods */
-  EAPI Eina_Bool e_ofono_modem_powered_get(const E_Ofono_Element *element, Eina_Bool *powered) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-  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_modem_name_get(const E_Ofono_Element *element, const char **name) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-
-  /* NetworkRegistration Methods */
-  EAPI Eina_Bool e_ofono_netreg_mode_get(const E_Ofono_Element *element, const char **mode) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-  EAPI Eina_Bool e_ofono_netreg_status_get(const E_Ofono_Element *element, const char **status) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-  EAPI Eina_Bool e_ofono_netreg_operator_get(const E_Ofono_Element *element, const char **op) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-  EAPI Eina_Bool e_ofono_netreg_strength_get(const E_Ofono_Element *element, uint8_t *strength) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-
-  /* SMS Methods */
-  EAPI Eina_Bool e_ofono_sms_sca_get(const E_Ofono_Element *element, const char **sca) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-  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, 2) EINA_WARN_UNUSED_RESULT;
-  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, 2, 3) EINA_WARN_UNUSED_RESULT;
-
-  /* Low-Level API:
-   *
-   * Should just be used to work around problems until proper solution
-   * is made into e_ofono.
-   */
-  EAPI Eina_Bool e_ofono_manager_sync_elements(void);
-
-  EAPI Eina_Bool e_ofono_elements_get_all(unsigned int *count, E_Ofono_Element ***p_elements) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-  EAPI Eina_Bool e_ofono_elements_get_all_type(const char *type, unsigned int *count, E_Ofono_Element ***p_elements) EINA_ARG_NONNULL(1, 2, 3) EINA_WARN_UNUSED_RESULT;
-  EAPI E_Ofono_Element *e_ofono_element_get(const char *path, const char *interface) EINA_ARG_NONNULL(1, 2) 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, 2);
-  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, 2);
-
-  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 void e_ofono_element_print(FILE *fp, const E_Ofono_Element *element) EINA_ARG_NONNULL(1, 2);
-
-
-  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_set(E_Ofono_Element *element, const char *prop, int type, const void *value) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
-  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, 2) EINA_WARN_UNUSED_RESULT;
-  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, 2, 3) EINA_WARN_UNUSED_RESULT;
-
-  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, 2);
-
-  EAPI Eina_Bool e_ofono_element_property_type_get_stringshared(const E_Ofono_Element *element, const char *name, int *type) EINA_ARG_NONNULL(1, 2, 3) EINA_WARN_UNUSED_RESULT;
-  EAPI Eina_Bool e_ofono_element_property_type_get(const E_Ofono_Element *element, const char *name, int *type) EINA_ARG_NONNULL(1, 2, 3) EINA_WARN_UNUSED_RESULT;
-  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, 2, 4) EINA_WARN_UNUSED_RESULT;
-  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, 2, 4) EINA_WARN_UNUSED_RESULT;
-  EAPI Eina_Bool e_ofono_element_property_get(const E_Ofono_Element *element, const char *name, int *type, void *value) EINA_ARG_NONNULL(1, 2, 4) EINA_WARN_UNUSED_RESULT;
-
-  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;
+/* Ecore Events */
+extern int E_OFONO_EVENT_MANAGER_IN;
+extern int E_OFONO_EVENT_MANAGER_OUT;
+extern int E_OFONO_EVENT_ELEMENT_ADD;
+extern int E_OFONO_EVENT_ELEMENT_DEL;
+extern int E_OFONO_EVENT_ELEMENT_UPDATED;
+
+typedef struct _E_Ofono_Element   E_Ofono_Element;
+
+struct _E_Ofono_Element
+{
+   const char            *path;
+   const char            *interface;
+   E_DBus_Signal_Handler *signal_handler;
+   Eina_Inlist           *props;
+
+   /* private */
+   struct
+   {
+      Eina_Inlist *properties_get;
+      Eina_Inlist *property_set;
+      Eina_Inlist *send_sms;
+   } _pending;
+   struct
+   {
+      Ecore_Idler *changed;
+   } _idler;
+   Eina_Inlist *_listeners;
+   int          _references;
+};
+
+/* General Public API */
+EAPI unsigned int         e_ofono_system_init(E_DBus_Connection *edbus_conn) EINA_ARG_NONNULL(1);
+EAPI unsigned int         e_ofono_system_shutdown(void);
+
+/* Manager Methods */
+EAPI E_Ofono_Element *    e_ofono_manager_get(void) EINA_WARN_UNUSED_RESULT;
+EAPI Eina_Bool            e_ofono_manager_modems_get(Eina_Array **array);
+
+/* Modem Methods */
+EAPI Eina_Bool            e_ofono_modem_powered_get(const E_Ofono_Element *element, Eina_Bool *powered) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
+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_modem_name_get(const E_Ofono_Element *element, const char **name) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
+
+/* NetworkRegistration Methods */
+EAPI Eina_Bool            e_ofono_netreg_mode_get(const E_Ofono_Element *element, const char **mode) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
+EAPI Eina_Bool            e_ofono_netreg_status_get(const E_Ofono_Element *element, const char **status) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
+EAPI Eina_Bool            e_ofono_netreg_operator_get(const E_Ofono_Element *element, const char **op) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
+EAPI Eina_Bool            e_ofono_netreg_strength_get(const E_Ofono_Element *element, uint8_t *strength) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
+
+/* SMS Methods */
+EAPI Eina_Bool            e_ofono_sms_sca_get(const E_Ofono_Element *element, const char **sca) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
+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, 2) EINA_WARN_UNUSED_RESULT;
+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, 2, 3) EINA_WARN_UNUSED_RESULT;
+
+/* Low-Level API:
+ *
+ * Should just be used to work around problems until proper solution
+ * is made into e_ofono.
+ */
+EAPI Eina_Bool            e_ofono_manager_sync_elements(void);
+
+EAPI Eina_Bool            e_ofono_elements_get_all(unsigned int *count, E_Ofono_Element ***p_elements) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
+EAPI Eina_Bool            e_ofono_elements_get_all_type(const char *type, unsigned int *count, E_Ofono_Element ***p_elements) EINA_ARG_NONNULL(1, 2, 3) EINA_WARN_UNUSED_RESULT;
+EAPI E_Ofono_Element *    e_ofono_element_get(const char *path, const char *interface) EINA_ARG_NONNULL(1, 2) 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, 2);
+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, 2);
+
+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 void                 e_ofono_element_print(FILE *fp, const E_Ofono_Element *element) EINA_ARG_NONNULL(1, 2);
+
+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_set(E_Ofono_Element *element, const char *prop, int type, const void *value) EINA_ARG_NONNULL(1, 2) EINA_WARN_UNUSED_RESULT;
+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, 2) EINA_WARN_UNUSED_RESULT;
+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, 2, 3) EINA_WARN_UNUSED_RESULT;
+
+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, 2);
+
+EAPI Eina_Bool            e_ofono_element_property_type_get_stringshared(const E_Ofono_Element *element, const char *name, int *type) EINA_ARG_NONNULL(1, 2, 3) EINA_WARN_UNUSED_RESULT;
+EAPI Eina_Bool            e_ofono_element_property_type_get(const E_Ofono_Element *element, const char *name, int *type) EINA_ARG_NONNULL(1, 2, 3) EINA_WARN_UNUSED_RESULT;
+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, 2, 4) EINA_WARN_UNUSED_RESULT;
+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, 2, 4) EINA_WARN_UNUSED_RESULT;
+EAPI Eina_Bool            e_ofono_element_property_get(const E_Ofono_Element *element, const char *name, int *type, void *value) EINA_ARG_NONNULL(1, 2, 4) EINA_WARN_UNUSED_RESULT;
+
+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;
 
 #ifdef __cplusplus
 }
index e67d1ff..db0566f 100644 (file)
@@ -41,8 +41,8 @@ e_ofono_system_bus_name_get(void)
 }
 
 /***********************************************************************
- * Manager
- ***********************************************************************/
+* Manager
+***********************************************************************/
 
 /*
  * FIXME: Do we really need to call Manager.GetProperties()?
@@ -67,12 +67,13 @@ e_ofono_manager_sync_elements(void)
    E_Ofono_Element *manager;
 
    if (!unique_name)
-     return FALSE;
+      return FALSE;
+
    manager = e_ofono_element_register(manager_path, e_ofono_iface_manager);
    if (manager)
-     e_ofono_element_properties_sync(manager);
+      e_ofono_element_properties_sync(manager);
    else
-     return FALSE;
+      return FALSE;
 
    DBG("sync_manager: %s (%s)", unique_name, bus_name);
 
@@ -95,12 +96,12 @@ _e_ofono_system_name_owner_enter(const char *uid)
    DBG("enter ofono at %s (old was %s)", uid, unique_name);
    if (unique_name && strcmp(unique_name, uid) == 0)
      {
-       DBG("same unique_name for ofono, ignore.");
-       return;
+        DBG("same unique_name for ofono, ignore.");
+        return;
      }
 
    if (unique_name)
-     _e_ofono_system_name_owner_exit();
+      _e_ofono_system_name_owner_exit();
 
    unique_name = strdup(uid);
 
@@ -108,7 +109,6 @@ _e_ofono_system_name_owner_enter(const char *uid)
    e_ofono_manager_sync_elements();
 }
 
-
 static void
 _e_ofono_system_name_owner_changed(void *data __UNUSED__, DBusMessage *msg)
 {
@@ -117,34 +117,38 @@ _e_ofono_system_name_owner_changed(void *data __UNUSED__, DBusMessage *msg)
 
    dbus_error_init(&err);
    if (!dbus_message_get_args(msg, &err,
-                             DBUS_TYPE_STRING, &name,
-                             DBUS_TYPE_STRING, &from,
-                             DBUS_TYPE_STRING, &to,
-                             DBUS_TYPE_INVALID))
+                              DBUS_TYPE_STRING, &name,
+                              DBUS_TYPE_STRING, &from,
+                              DBUS_TYPE_STRING, &to,
+                              DBUS_TYPE_INVALID))
      {
-       ERR("could not get NameOwnerChanged arguments: %s: %s",
-           err.name, err.message);
-       dbus_error_free(&err);
-       return;
+        ERR("could not get NameOwnerChanged arguments: %s: %s",
+            err.name, err.message);
+        dbus_error_free(&err);
+        return;
      }
 
    if (strcmp(name, bus_name) != 0)
-     return;
+      return;
 
    DBG("NameOwnerChanged from=[%s] to=[%s]", from, to);
 
    if (from[0] == '\0' && to[0] != '\0')
-     _e_ofono_system_name_owner_enter(to);
+     {
+        _e_ofono_system_name_owner_enter(to);
+     }
    else if (from[0] != '\0' && to[0] == '\0')
      {
-       DBG("exit ofono at %s", from);
-       if (strcmp(unique_name, from) != 0)
-         DBG("%s was not the known name %s, ignored.", from, unique_name);
-       else
-         _e_ofono_system_name_owner_exit();
+        DBG("exit ofono at %s", from);
+        if (strcmp(unique_name, from) != 0)
+           DBG("%s was not the known name %s, ignored.", from, unique_name);
+        else
+           _e_ofono_system_name_owner_exit();
      }
    else
-     DBG("unknow change from %s to %s", from, to);
+     {
+        DBG("unknow change from %s to %s", from, to);
+     }
 }
 
 static void
@@ -157,17 +161,17 @@ _e_ofono_get_name_owner(void *data __UNUSED__, DBusMessage *msg, DBusError *err)
    pending_get_name_owner = NULL;
 
    if (!_dbus_callback_check_and_init(msg, &itr, err))
-     return;
+      return;
 
    t = dbus_message_iter_get_arg_type(&itr);
    if (!_dbus_iter_type_check(t, DBUS_TYPE_STRING))
-     return;
+      return;
 
    dbus_message_iter_get_basic(&itr, &uid);
    if (!uid)
      {
-       ERR("no name owner!");
-       return;
+        ERR("no name owner!");
+        return;
      }
 
    _e_ofono_system_name_owner_enter(uid);
@@ -202,80 +206,97 @@ e_ofono_system_init(E_DBus_Connection *edbus_conn)
    init_count++;
 
    if (init_count > 1)
-     return init_count;
+      return init_count;
 
    _e_dbus_ofono_log_dom = eina_log_domain_register
-     ("e_dbus_ofono", EINA_LOG_DEFAULT_COLOR);
+         ("e_dbus_ofono", EINA_LOG_DEFAULT_COLOR);
 
    if(_e_dbus_ofono_log_dom < 0)
      {
-       EINA_LOG_ERR
-         ("impossible to create a log domain for edbus_ofono module");
-       return -1;
+        EINA_LOG_ERR
+           ("impossible to create a log domain for edbus_ofono module");
+        return -1;
      }
 
    if (E_OFONO_EVENT_MANAGER_IN == 0)
-     E_OFONO_EVENT_MANAGER_IN = ecore_event_type_new();
+      E_OFONO_EVENT_MANAGER_IN = ecore_event_type_new();
+
    if (E_OFONO_EVENT_MANAGER_OUT == 0)
-     E_OFONO_EVENT_MANAGER_OUT = ecore_event_type_new();
+      E_OFONO_EVENT_MANAGER_OUT = ecore_event_type_new();
+
    if (E_OFONO_EVENT_ELEMENT_ADD == 0)
-     E_OFONO_EVENT_ELEMENT_ADD = ecore_event_type_new();
+      E_OFONO_EVENT_ELEMENT_ADD = ecore_event_type_new();
+
    if (E_OFONO_EVENT_ELEMENT_DEL == 0)
-     E_OFONO_EVENT_ELEMENT_DEL = ecore_event_type_new();
+      E_OFONO_EVENT_ELEMENT_DEL = ecore_event_type_new();
+
    if (E_OFONO_EVENT_ELEMENT_UPDATED == 0)
-     E_OFONO_EVENT_ELEMENT_UPDATED = ecore_event_type_new();
+      E_OFONO_EVENT_ELEMENT_UPDATED = ecore_event_type_new();
 
    if (!e_ofono_iface_manager)
-     e_ofono_iface_manager = eina_stringshare_add("org.ofono.Manager");
+      e_ofono_iface_manager = eina_stringshare_add("org.ofono.Manager");
+
    if (!e_ofono_prop_modems)
-     e_ofono_prop_modems = eina_stringshare_add("Modems");
+      e_ofono_prop_modems = eina_stringshare_add("Modems");
+
    if (!e_ofono_iface_modem)
-     e_ofono_iface_modem = eina_stringshare_add("org.ofono.Modem");
+      e_ofono_iface_modem = eina_stringshare_add("org.ofono.Modem");
+
    if (!e_ofono_prop_name)
-     e_ofono_prop_name = eina_stringshare_add("Name");
+      e_ofono_prop_name = eina_stringshare_add("Name");
+
    if (!e_ofono_prop_powered)
-     e_ofono_prop_powered = eina_stringshare_add("Powered");
+      e_ofono_prop_powered = eina_stringshare_add("Powered");
+
    if (!e_ofono_prop_interfaces)
-     e_ofono_prop_interfaces = eina_stringshare_add("Interfaces");
+      e_ofono_prop_interfaces = eina_stringshare_add("Interfaces");
+
    if (!e_ofono_iface_netreg)
-     e_ofono_iface_netreg = eina_stringshare_add("org.ofono.NetworkRegistration");
+      e_ofono_iface_netreg = eina_stringshare_add("org.ofono.NetworkRegistration");
+
    if (!e_ofono_prop_mode)
-     e_ofono_prop_mode = eina_stringshare_add("Mode");
+      e_ofono_prop_mode = eina_stringshare_add("Mode");
+
    if (!e_ofono_prop_status)
-     e_ofono_prop_status = eina_stringshare_add("Status");
+      e_ofono_prop_status = eina_stringshare_add("Status");
+
    if (!e_ofono_prop_operator)
-     e_ofono_prop_operator = eina_stringshare_add("Operator");
+      e_ofono_prop_operator = eina_stringshare_add("Operator");
+
    if (!e_ofono_prop_strength)
-     e_ofono_prop_strength = eina_stringshare_add("Strength");
+      e_ofono_prop_strength = eina_stringshare_add("Strength");
+
    if (!e_ofono_iface_sms)
-   e_ofono_iface_sms = eina_stringshare_add("org.ofono.SmsManager");
+      e_ofono_iface_sms = eina_stringshare_add("org.ofono.SmsManager");
+
    if (!e_ofono_prop_sca)
-   e_ofono_prop_sca = eina_stringshare_add("ServiceCenterAddress");
+      e_ofono_prop_sca = eina_stringshare_add("ServiceCenterAddress");
+
    if (!e_ofono_method_send_sms)
-     e_ofono_method_send_sms = eina_stringshare_add("SendMessage");
+      e_ofono_method_send_sms = eina_stringshare_add("SendMessage");
 
    e_ofono_conn = edbus_conn;
    cb_name_owner_changed = e_dbus_signal_handler_add
-     (e_ofono_conn, E_DBUS_FDO_BUS, E_DBUS_FDO_PATH, E_DBUS_FDO_INTERFACE, "NameOwnerChanged",
-      _e_ofono_system_name_owner_changed, NULL);
+         (e_ofono_conn, E_DBUS_FDO_BUS, E_DBUS_FDO_PATH, E_DBUS_FDO_INTERFACE, "NameOwnerChanged",
+         _e_ofono_system_name_owner_changed, NULL);
 
    if (pending_get_name_owner)
-     dbus_pending_call_cancel(pending_get_name_owner);
+      dbus_pending_call_cancel(pending_get_name_owner);
 
    pending_get_name_owner = e_dbus_get_name_owner
-     (e_ofono_conn, bus_name, _e_ofono_get_name_owner, NULL);
+         (e_ofono_conn, bus_name, _e_ofono_get_name_owner, NULL);
 
    e_ofono_elements_init();
 
    return init_count;
 }
 
-
 static inline void
 _stringshare_del(const char **str)
 {
    if (!*str)
-     return;
+      return;
+
    eina_stringshare_del(*str);
    *str = NULL;
 }
@@ -291,12 +312,13 @@ e_ofono_system_shutdown(void)
 {
    if (init_count == 0)
      {
-       ERR("ofono system already shut down.");
-       return 0;
+        ERR("ofono system already shut down.");
+        return 0;
      }
+
    init_count--;
    if (init_count > 0)
-     return init_count;
+      return init_count;
 
    _stringshare_del(&e_ofono_iface_manager);
    _stringshare_del(&e_ofono_prop_modems);
@@ -314,3 +336,4 @@ e_ofono_system_shutdown(void)
    _stringshare_del(&e_ofono_method_send_sms);
    return 0;
 }
+
index d38886b..5feb510 100644 (file)
 #define MAX_KEY_SIZE 4096
 static Eina_Hash *elements = NULL;
 
-typedef struct _E_Ofono_Element_Pending E_Ofono_Element_Pending;
-typedef struct _E_Ofono_Element_Call_Data E_Ofono_Element_Call_Data;
-typedef struct _E_Ofono_Element_Property E_Ofono_Element_Property;
-typedef struct _E_Ofono_Element_Listener E_Ofono_Element_Listener;
-typedef struct _E_Ofono_Element_Dict_Entry E_Ofono_Element_Dict_Entry;
+typedef struct _E_Ofono_Element_Pending      E_Ofono_Element_Pending;
+typedef struct _E_Ofono_Element_Call_Data    E_Ofono_Element_Call_Data;
+typedef struct _E_Ofono_Element_Property     E_Ofono_Element_Property;
+typedef struct _E_Ofono_Element_Listener     E_Ofono_Element_Listener;
+typedef struct _E_Ofono_Element_Dict_Entry   E_Ofono_Element_Dict_Entry;
 
 struct _E_Ofono_Element_Pending
 {
-   EINA_INLIST;
-   DBusPendingCall *pending;
-   void *data;
+                           EINA_INLIST;
+   DBusPendingCall        *pending;
+   void                   *data;
    E_DBus_Method_Return_Cb user_cb;
-   void *user_data;
+   void                   *user_data;
 };
 
 struct _E_Ofono_Element_Call_Data
 {
-   E_Ofono_Element *element;
-   E_DBus_Method_Return_Cb cb;
+   E_Ofono_Element         *element;
+   E_DBus_Method_Return_Cb  cb;
    E_Ofono_Element_Pending *pending;
-   Eina_Inlist **p_list;
+   Eina_Inlist            **p_list;
 };
 
 struct _E_Ofono_Element_Property
 {
-   EINA_INLIST;
+               EINA_INLIST;
    const char *name;
-   int type;
+   int         type;
    union {
-      Eina_Bool boolean;
-      const char *str;
+      Eina_Bool      boolean;
+      const char    *str;
       unsigned short u16;
-      unsigned int u32;
-      unsigned char byte;
-      const char *path;
-      void *variant;
+      unsigned int   u32;
+      unsigned char  byte;
+      const char    *path;
+      void          *variant;
       E_Ofono_Array *array;
    } value;
 };
@@ -57,23 +57,23 @@ struct _E_Ofono_Element_Property
 struct _E_Ofono_Element_Dict_Entry
 {
    const char *name;
-   int type;
+   int         type;
    union {
-      Eina_Bool boolean;
-      const char *str;
+      Eina_Bool      boolean;
+      const char    *str;
       unsigned short u16;
-      unsigned int u32;
-      unsigned char byte;
-      const char *path;
+      unsigned int   u32;
+      unsigned char  byte;
+      const char    *path;
    } value;
 };
 
 struct _E_Ofono_Element_Listener
 {
-   EINA_INLIST;
-   void (*cb)(void *data, const E_Ofono_Element *element);
+         EINA_INLIST;
+   void  (*cb)(void *data, const E_Ofono_Element *element);
    void *data;
-   void (*free_data)(void *data);
+   void  (*free_data)(void *data);
 };
 
 static void
@@ -88,7 +88,7 @@ e_ofono_element_event_add(int event_type, E_Ofono_Element *element)
 {
    e_ofono_element_ref(element);
    ecore_event_add
-     (event_type, element, _e_ofono_element_event_no_free, element);
+      (event_type, element, _e_ofono_element_event_no_free, element);
 }
 
 static void
@@ -101,10 +101,10 @@ e_ofono_element_call_dispatch_and_free(void *d, DBusMessage *msg, DBusError *err
    pending->pending = NULL;
 
    if (data->cb)
-     data->cb(data->element, msg, err);
+      data->cb(data->element, msg, err);
 
    if (pending->user_cb)
-     pending->user_cb(pending->user_data, msg, err);
+      pending->user_cb(pending->user_data, msg, err);
 
    pending->data = NULL;
    *data->p_list = eina_inlist_remove(*data->p_list, EINA_INLIST_GET(pending));
@@ -117,15 +117,15 @@ e_ofono_element_pending_cancel_and_free(Eina_Inlist **pending)
 {
    while (*pending)
      {
-       E_Ofono_Element_Pending *p = (E_Ofono_Element_Pending *)*pending;
-       DBusError err;
+        E_Ofono_Element_Pending *p = (E_Ofono_Element_Pending *)*pending;
+        DBusError err;
 
-       dbus_pending_call_cancel(p->pending);
+        dbus_pending_call_cancel(p->pending);
 
-       dbus_error_init(&err);
-       dbus_set_error(&err, "Canceled", "Pending method call was canceled.");
-       e_ofono_element_call_dispatch_and_free(p->data, NULL, &err);
-       dbus_error_free(&err);
+        dbus_error_init(&err);
+        dbus_set_error(&err, "Canceled", "Pending method call was canceled.");
+        e_ofono_element_call_dispatch_and_free(p->data, NULL, &err);
+        dbus_error_free(&err);
      }
 }
 
@@ -136,20 +136,21 @@ e_ofono_element_listener_add(E_Ofono_Element *element, void (*cb)(void *data, co
 
    if (!element)
      {
-       ERR("safety check failed: element == NULL");
-       goto error;
+        ERR("safety check failed: element == NULL");
+        goto error;
      }
+
    if (!cb)
      {
-       ERR("safety check failed: cb == NULL");
-       goto error;
+        ERR("safety check failed: cb == NULL");
+        goto error;
      }
 
    l = malloc(sizeof(*l));
    if (!l)
      {
-       ERR("could not allocate E_Ofono_Element_Listener");
-       goto error;
+        ERR("could not allocate E_Ofono_Element_Listener");
+        goto error;
      }
 
    l->cb = cb;
@@ -157,13 +158,13 @@ e_ofono_element_listener_add(E_Ofono_Element *element, void (*cb)(void *data, co
    l->free_data = free_data;
 
    element->_listeners = eina_inlist_append
-     (element->_listeners, EINA_INLIST_GET(l));
+         (element->_listeners, EINA_INLIST_GET(l));
 
    return;
 
- error:
+error:
    if (free_data)
-     free_data((void *)data);
+      free_data((void *)data);
 }
 
 void
@@ -175,14 +176,16 @@ e_ofono_element_listener_del(E_Ofono_Element *element, void (*cb)(void *data, co
    EINA_SAFETY_ON_NULL_RETURN(cb);
 
    EINA_INLIST_FOREACH(element->_listeners, l)
-     if ((l->cb == cb) && (l->data == data))
-       {
-         element->_listeners = eina_inlist_remove
-           (element->_listeners, EINA_INLIST_GET(l));
-         if (l->free_data) l->free_data(l->data);
-         free(l);
-         return;
-       }
+   if ((l->cb == cb) && (l->data == data))
+     {
+        element->_listeners = eina_inlist_remove
+              (element->_listeners, EINA_INLIST_GET(l));
+        if (l->free_data)
+           l->free_data(l->data);
+
+        free(l);
+        return;
+     }
 }
 
 static void
@@ -197,20 +200,20 @@ _e_ofono_element_listeners_call_do(E_Ofono_Element *element)
     */
    count = eina_inlist_count(element->_listeners);
    if (count < 1)
-     goto end;
+      goto end;
 
    shadow = alloca(sizeof(*shadow) * count);
    if (!shadow)
-     goto end;
+      goto end;
 
    i = 0;
    EINA_INLIST_FOREACH(element->_listeners, l)
-     shadow[i++] = l;
+   shadow[i++] = l;
 
    for (i = 0; i < count; i++)
-     shadow[i]->cb(shadow[i]->data, element);
+      shadow[i]->cb(shadow[i]->data, element);
 
- end:
+end:
    e_ofono_element_event_add(E_OFONO_EVENT_ELEMENT_UPDATED, element);
 }
 
@@ -227,14 +230,15 @@ static void
 _e_ofono_element_listeners_call(E_Ofono_Element *element)
 {
    if (element->_idler.changed)
-     return;
+      return;
+
    element->_idler.changed = ecore_idler_add
-     (_e_ofono_element_listeners_call_idler, element);
+         (_e_ofono_element_listeners_call_idler, element);
 }
 
 /***********************************************************************
- * Property
- ***********************************************************************/
+* Property
+***********************************************************************/
 
 static void
 _e_ofono_element_dict_entry_free(E_Ofono_Element_Dict_Entry *entry)
@@ -245,16 +249,19 @@ _e_ofono_element_dict_entry_free(E_Ofono_Element_Dict_Entry *entry)
       case DBUS_TYPE_BYTE:
       case DBUS_TYPE_UINT16:
       case DBUS_TYPE_UINT32:
-        break;
+         break;
+
       case DBUS_TYPE_OBJECT_PATH:
-        eina_stringshare_del(entry->value.path);
-        break;
+         eina_stringshare_del(entry->value.path);
+         break;
+
       case DBUS_TYPE_STRING:
-        eina_stringshare_del(entry->value.str);
-        break;
+         eina_stringshare_del(entry->value.str);
+         break;
+
       default:
-        ERR("don't know how to free dict entry '%s' of type %c (%d)",
-            entry->name, entry->type, entry->type);
+         ERR("don't know how to free dict entry '%s' of type %c (%d)",
+             entry->name, entry->type, entry->type);
      }
 
    eina_stringshare_del(entry->name);
@@ -275,26 +282,26 @@ _e_ofono_element_dict_entry_new(DBusMessageIter *itr)
    t = dbus_message_iter_get_arg_type(&e_itr);
    if (!_dbus_iter_type_check(t, DBUS_TYPE_STRING))
      {
-       ERR("invalid format for dict entry. first type not a string: %c (%d)",
-           t, t);
-       return NULL;
+        ERR("invalid format for dict entry. first type not a string: %c (%d)",
+            t, t);
+        return NULL;
      }
 
    dbus_message_iter_get_basic(&e_itr, &key);
    if (!key || !key[0])
      {
-       ERR("invalid format for dict entry. no key.");
-       return NULL;
+        ERR("invalid format for dict entry. no key.");
+        return NULL;
      }
 
    dbus_message_iter_next(&e_itr);
    t = dbus_message_iter_get_arg_type(&e_itr);
    if (!_dbus_iter_type_check(t, DBUS_TYPE_VARIANT))
      {
-       ERR("invalid format for dict entry '%s'. "
-           "second type not a variant: %c (%d)",
-           key, t, t);
-       return NULL;
+        ERR("invalid format for dict entry '%s'. "
+            "second type not a variant: %c (%d)",
+            key, t, t);
+        return NULL;
      }
 
    dbus_message_iter_recurse(&e_itr, &v_itr);
@@ -302,44 +309,50 @@ _e_ofono_element_dict_entry_new(DBusMessageIter *itr)
    t = dbus_message_iter_get_arg_type(&v_itr);
    if ((t == DBUS_TYPE_INVALID) || (t == DBUS_TYPE_ARRAY))
      {
-       ERR("invalid type for dict value for entry '%s': %c (%d)",
-           key, t, t);
-       return NULL;
+        ERR("invalid type for dict value for entry '%s': %c (%d)",
+            key, t, t);
+        return NULL;
      }
 
    entry = calloc(1, sizeof(*entry));
    if (!entry)
      {
-       ERR("could not allocate memory for dict entry.");
-       return NULL;
+        ERR("could not allocate memory for dict entry.");
+        return NULL;
      }
 
    dbus_message_iter_get_basic(&v_itr, &value);
    switch (t)
      {
       case DBUS_TYPE_BOOLEAN:
-        entry->value.boolean = (Eina_Bool)(long)value;
-        break;
+         entry->value.boolean = (Eina_Bool)(long)value;
+         break;
+
       case DBUS_TYPE_BYTE:
-        entry->value.byte = (unsigned char)(long)value;
-        break;
+         entry->value.byte = (unsigned char)(long)value;
+         break;
+
       case DBUS_TYPE_UINT16:
-        entry->value.u16 = (unsigned short)(long)value;
-        break;
+         entry->value.u16 = (unsigned short)(long)value;
+         break;
+
       case DBUS_TYPE_UINT32:
-        entry->value.u32 = (unsigned int)(long)value;
-        break;
+         entry->value.u32 = (unsigned int)(long)value;
+         break;
+
       case DBUS_TYPE_STRING:
-        entry->value.str = eina_stringshare_add(value);
-        break;
+         entry->value.str = eina_stringshare_add(value);
+         break;
+
       case DBUS_TYPE_OBJECT_PATH:
-        entry->value.path = eina_stringshare_add(value);
-        break;
+         entry->value.path = eina_stringshare_add(value);
+         break;
+
       default:
-        ERR("don't know how to create dict entry '%s' for of type %c (%d)",
-            key, t, t);
-        free(entry);
-        return NULL;
+         ERR("don't know how to create dict entry '%s' for of type %c (%d)",
+             key, t, t);
+         free(entry);
+         return NULL;
      }
 
    entry->name = eina_stringshare_add(key);
@@ -355,8 +368,8 @@ _e_ofono_element_array_dict_find_stringshared(const E_Ofono_Array *array, const
    unsigned int i;
 
    EINA_ARRAY_ITER_NEXT(array->array, i, entry, iterator)
-     if (entry->name == key)
-       return entry;
+   if (entry->name == key)
+      return entry;
 
    return NULL;
 }
@@ -369,7 +382,7 @@ _e_ofono_element_array_free(E_Ofono_Array *array, E_Ofono_Array *new __UNUSED__)
    void *item;
 
    if (!array)
-     return;
+      return;
 
    switch (array->type)
      {
@@ -377,23 +390,27 @@ _e_ofono_element_array_free(E_Ofono_Array *array, E_Ofono_Array *new __UNUSED__)
       case DBUS_TYPE_BYTE:
       case DBUS_TYPE_UINT16:
       case DBUS_TYPE_UINT32:
-        break;
+         break;
+
       case DBUS_TYPE_OBJECT_PATH:
-        EINA_ARRAY_ITER_NEXT(array->array, i, item, iterator)
-          eina_stringshare_del(item);
-        break;
+         EINA_ARRAY_ITER_NEXT(array->array, i, item, iterator)
+         eina_stringshare_del(item);
+         break;
+
       case DBUS_TYPE_STRING:
-        EINA_ARRAY_ITER_NEXT(array->array, i, item, iterator)
-          eina_stringshare_del(item);
-        break;
+         EINA_ARRAY_ITER_NEXT(array->array, i, item, iterator)
+         eina_stringshare_del(item);
+         break;
+
       case DBUS_TYPE_DICT_ENTRY:
-        EINA_ARRAY_ITER_NEXT(array->array, i, item, iterator)
-          _e_ofono_element_dict_entry_free(item);
-        break;
+         EINA_ARRAY_ITER_NEXT(array->array, i, item, iterator)
+         _e_ofono_element_dict_entry_free(item);
+         break;
+
       default:
-        ERR("don't know how to free array of values of type %c (%d)",
-            array->type, array->type);
-        break;
+         ERR("don't know how to free array of values of type %c (%d)",
+             array->type, array->type);
+         break;
      }
    eina_array_free(array->array);
    free(array);
@@ -405,24 +422,29 @@ _e_ofono_element_property_value_free(E_Ofono_Element_Property *property)
    switch (property->type)
      {
       case 0:
-        return;
+         return;
+
       case DBUS_TYPE_BOOLEAN:
       case DBUS_TYPE_BYTE:
       case DBUS_TYPE_UINT16:
       case DBUS_TYPE_UINT32:
-        break;
+         break;
+
       case DBUS_TYPE_STRING:
-        eina_stringshare_del(property->value.str);
-        break;
+         eina_stringshare_del(property->value.str);
+         break;
+
       case DBUS_TYPE_OBJECT_PATH:
-        eina_stringshare_del(property->value.path);
-        break;
+         eina_stringshare_del(property->value.path);
+         break;
+
       case DBUS_TYPE_ARRAY:
-        _e_ofono_element_array_free(property->value.array, NULL);
-        break;
+         _e_ofono_element_array_free(property->value.array, NULL);
+         break;
+
       default:
-        ERR("don't know how to free value of property type %c (%d)",
-            property->type, property->type);
+         ERR("don't know how to free value of property type %c (%d)",
+             property->type, property->type);
      }
 }
 
@@ -438,15 +460,17 @@ _e_ofono_element_get_interface(const char *key)
    switch (head)
      {
       case 'M':
-        if (strcmp(tail, "odems") == 0)
-          interface = e_ofono_iface_modem;
-        break;
+         if (strcmp(tail, "odems") == 0)
+            interface = e_ofono_iface_modem;
+
+         break;
+
       default:
-        break;
+         break;
      }
 
    if (!interface)
-     ERR("failed to find interface for property \"%s\"", key);
+      ERR("failed to find interface for property \"%s\"", key);
 
    return interface;
 }
@@ -459,10 +483,12 @@ _e_ofono_element_item_register(const char *key, const char *item)
 
    interface = _e_ofono_element_get_interface(key);
    if (!interface)
-     return NULL;
+      return NULL;
+
    element = e_ofono_element_register(item, interface);
    if ((element) && (!e_ofono_element_properties_sync(element)))
-     WRN("could not get properties of %s", element->path);
+      WRN("could not get properties of %s", element->path);
+
    return element;
 }
 
@@ -482,113 +508,118 @@ _e_ofono_element_array_match(E_Ofono_Array *old, E_Ofono_Array *new, const char
    Eina_Bool interfaces = 0;
 
    if (!old)
-     return;
+      return;
+
    if ((old->type != DBUS_TYPE_OBJECT_PATH) &&
        (old->type != DBUS_TYPE_STRING))
-     return;
+      return;
 
    /* is this a list of interfaces? */
    interfaces = !strcmp(prop_name, "Interfaces");
 
    if ((!new) || (!new->array) || eina_array_count_get(new->array) == 0)
      {
-       if ((!old) || (!old->array) || eina_array_count_get(old->array) == 0)
-         return;
-       else
-         {
-            iter_old = old->array->data;
-            goto out_remove_remaining;
-         }
+        if ((!old) || (!old->array) || eina_array_count_get(old->array) == 0)
+          {
+             return;
+          }
+        else
+          {
+             iter_old = old->array->data;
+             goto out_remove_remaining;
+          }
      }
 
    iter_new = new->array->data;
    item_new = *iter_new;
    EINA_ARRAY_ITER_NEXT(old->array, i_old, item_old, iter_old)
-     {
-       if (item_old == item_new)
-         {
-            i_new++;
-            if (i_new >= eina_array_count_get(new->array))
-              {
-                 i_old++;
-                 break;
-              }
-
-            iter_new++;
-            item_new = *iter_new;
-         }
-       else
-         deleted = eina_list_append(deleted, item_old);
-     }
+   {
+      if (item_old == item_new)
+        {
+           i_new++;
+           if (i_new >= eina_array_count_get(new->array))
+             {
+                i_old++;
+                break;
+             }
+
+           iter_new++;
+           item_new = *iter_new;
+        }
+      else
+        {
+           deleted = eina_list_append(deleted, item_old);
+        }
+   }
 
    for(; i_new < eina_array_count_get(new->array); iter_new++, i_new++)
      {
-       Eina_Bool found = 0;
-       item_new = *iter_new;
-       if (!item_new)
-         break;
-
-       EINA_LIST_FOREACH(deleted, l, data)
-         {
-            if (data == item_new)
-              {
-                 deleted = eina_list_remove_list(deleted, l);
-                 found = 1;
-                 break;
-              }
-         }
-       if (!found)
-         {
-            E_Ofono_Element *e = NULL;
-
-            if (interfaces)
-              e = e_ofono_element_register(item_new, element->path);
-            else
-              e = _e_ofono_element_item_register(prop_name, item_new);
-
-            if (e)
-              DBG("Add element %s (%s)\n", e->path, e->interface);
-         }
+        Eina_Bool found = 0;
+        item_new = *iter_new;
+        if (!item_new)
+           break;
+
+        EINA_LIST_FOREACH(deleted, l, data)
+        {
+           if (data == item_new)
+             {
+                deleted = eina_list_remove_list(deleted, l);
+                found = 1;
+                break;
+             }
+        }
+        if (!found)
+          {
+             E_Ofono_Element *e = NULL;
+
+             if (interfaces)
+                e = e_ofono_element_register(item_new, element->path);
+             else
+                e = _e_ofono_element_item_register(prop_name, item_new);
+
+             if (e)
+                DBG("Add element %s (%s)\n", e->path, e->interface);
+          }
      }
 
    /* everybody after i_old on old->array + everybody from deleted list
       will be removed
-   */
+    */
    EINA_LIST_FREE(deleted, data)
-     {
-       E_Ofono_Element *e;
-       if (interfaces)
-         e = e_ofono_element_get(element->path, item_old);
-       else
-         e = e_ofono_element_get(data,
-                                 _e_ofono_element_get_interface(prop_name));
-
-       if (e)
-         {
-            e_ofono_element_unregister(e);
-            DBG("Deleted element %s %s\n", e->path, e->interface);
-         }
-     }
-
- out_remove_remaining:
+   {
+      E_Ofono_Element *e;
+      if (interfaces)
+         e = e_ofono_element_get(element->path, item_old);
+      else
+         e = e_ofono_element_get(data,
+                                 _e_ofono_element_get_interface(prop_name));
+
+      if (e)
+        {
+           e_ofono_element_unregister(e);
+           DBG("Deleted element %s %s\n", e->path, e->interface);
+        }
+   }
+
+out_remove_remaining:
    for(; i_old < eina_array_count_get(old->array); iter_old++, i_old++)
      {
-       E_Ofono_Element *e;
-       item_old = *iter_old;
-       if (!item_old)
-         break;
-
-       if (interfaces)
-         e = e_ofono_element_get(element->path, item_old);
-       else
-         e = e_ofono_element_get(item_old,
-                                 _e_ofono_element_get_interface(prop_name));
-
-       if (e)
-         {
-            e_ofono_element_unregister(e);
-            DBG("Deleted element %s %s\n", e->path, e->interface);
-         }
+        E_Ofono_Element *e;
+        item_old = *iter_old;
+        if (!item_old)
+           break;
+
+        if (interfaces)
+           e = e_ofono_element_get(element->path, item_old);
+        else
+           e = e_ofono_element_get(item_old,
+                                   _e_ofono_element_get_interface(prop_name));
+
+        if (e)
+          {
+             e_ofono_element_unregister(e);
+             DBG("Deleted element %s %s\n", e->path, e->interface);
+          }
      }
 }
 
@@ -598,90 +629,111 @@ _e_ofono_element_property_update(E_Ofono_Element_Property *property, int type, v
    int changed = 0;
 
    if ((type == DBUS_TYPE_STRING || type == DBUS_TYPE_OBJECT_PATH) && data)
-     data = (char *)eina_stringshare_add(data);
+      data = (char *)eina_stringshare_add(data);
 
    if (property->type != type)
      {
-       if (property->type)
-         DBG("property type changed from '%c' to '%c'",
-             property->type, type);
-       _e_ofono_element_property_value_free(property);
-       memset(&property->value, 0, sizeof(property->value));
-       property->type = type;
-       changed = 1;
+        if (property->type)
+           DBG("property type changed from '%c' to '%c'",
+               property->type, type);
+
+        _e_ofono_element_property_value_free(property);
+        memset(&property->value, 0, sizeof(property->value));
+        property->type = type;
+        changed = 1;
      }
 
    switch (type)
      {
       case DBUS_TYPE_BOOLEAN:
-        if (changed || property->value.boolean != (Eina_Bool)(long)data)
-          {
-             property->value.boolean = (Eina_Bool)(long)data;
-             changed = 1;
-          }
-        break;
+         if (changed || property->value.boolean != (Eina_Bool)(long)data)
+           {
+              property->value.boolean = (Eina_Bool)(long)data;
+              changed = 1;
+           }
+
+         break;
+
       case DBUS_TYPE_BYTE:
-        if (changed || property->value.byte != (unsigned char)(long)data)
-          {
-             property->value.byte = (unsigned char)(long)data;
-             changed = 1;
-          }
-        break;
+         if (changed || property->value.byte != (unsigned char)(long)data)
+           {
+              property->value.byte = (unsigned char)(long)data;
+              changed = 1;
+           }
+
+         break;
+
       case DBUS_TYPE_UINT16:
-        if (changed || property->value.u16 != (unsigned short)(long)data)
-          {
-             property->value.u16 = (unsigned short)(long)data;
-             changed = 1;
-          }
-        break;
+         if (changed || property->value.u16 != (unsigned short)(long)data)
+           {
+              property->value.u16 = (unsigned short)(long)data;
+              changed = 1;
+           }
+
+         break;
+
       case DBUS_TYPE_UINT32:
-        if (changed || property->value.u32 != (unsigned int)(long)data)
-          {
-             property->value.u32 = (unsigned int)(long)data;
-             changed = 1;
-          }
-        break;
+         if (changed || property->value.u32 != (unsigned int)(long)data)
+           {
+              property->value.u32 = (unsigned int)(long)data;
+              changed = 1;
+           }
+
+         break;
+
       case DBUS_TYPE_STRING:
-        if (changed)
-          property->value.str = data;
-        else
-          {
-             if (property->value.str)
-               eina_stringshare_del(property->value.str);
-             if (property->value.str != data)
-               {
-                  property->value.str = data;
-                  changed = 1;
-               }
-          }
-        break;
+         if (changed)
+           {
+              property->value.str = data;
+           }
+         else
+           {
+              if (property->value.str)
+                 eina_stringshare_del(property->value.str);
+
+              if (property->value.str != data)
+                {
+                   property->value.str = data;
+                   changed = 1;
+                }
+           }
+
+         break;
+
       case DBUS_TYPE_OBJECT_PATH:
-        if (changed)
-          property->value.path = data;
-        else
-          {
-             if (property->value.path)
-               eina_stringshare_del(property->value.path);
-             if (property->value.path != data)
-               {
-                  property->value.path = data;
-                  changed = 1;
-               }
-          }
-        break;
+         if (changed)
+           {
+              property->value.path = data;
+           }
+         else
+           {
+              if (property->value.path)
+                 eina_stringshare_del(property->value.path);
+
+              if (property->value.path != data)
+                {
+                   property->value.path = data;
+                   changed = 1;
+                }
+           }
+
+         break;
+
       case DBUS_TYPE_ARRAY:
-        if (!changed)
-          if (property->value.array)
-            {
-               _e_ofono_element_array_match(property->value.array, data,
-                                            property->name, element);
-               _e_ofono_element_array_free(property->value.array, data);
-            }
-        property->value.array = data;
-        changed = 1;
-        break;
+         if (!changed)
+            if (property->value.array)
+              {
+                 _e_ofono_element_array_match(property->value.array, data,
+                                              property->name, element);
+                 _e_ofono_element_array_free(property->value.array, data);
+              }
+
+         property->value.array = data;
+         changed = 1;
+         break;
+
       default:
-        ERR("don't know how to update property type %c (%d)", type, type);
+         ERR("don't know how to update property type %c (%d)", type, type);
      }
 
    return changed;
@@ -695,9 +747,9 @@ _e_ofono_element_property_new(const char *name, int type, void *data, E_Ofono_El
    property = calloc(1, sizeof(*property));
    if (!property)
      {
-       eina_stringshare_del(name);
-       ERR("could not allocate property: %s", strerror(errno));
-       return NULL;
+        eina_stringshare_del(name);
+        ERR("could not allocate property: %s", strerror(errno));
+        return NULL;
      }
 
    property->name = name;
@@ -714,8 +766,8 @@ _e_ofono_element_property_free(E_Ofono_Element_Property *property)
 }
 
 /***********************************************************************
- * Element
- ***********************************************************************/
+* Element
+***********************************************************************/
 unsigned char *
 e_ofono_element_bytes_array_get_stringshared(const E_Ofono_Element *element, const char *property, unsigned int *count)
 {
@@ -732,27 +784,28 @@ e_ofono_element_bytes_array_get_stringshared(const E_Ofono_Element *element, con
    *count = 0;
 
    if (!e_ofono_element_property_get_stringshared
-       (element, property, NULL, &array))
-     return NULL;
+          (element, property, NULL, &array))
+      return NULL;
 
    if ((!array) || (!(array->array)))
-     return NULL;
+      return NULL;
 
    *count = eina_array_count_get(array->array);
    ret = malloc(*count * sizeof(unsigned char));
    if (!ret)
      {
-       ERR("could not allocate return array of %d bytes: %s",
-           *count, strerror(errno));
-       return NULL;
+        ERR("could not allocate return array of %d bytes: %s",
+            *count, strerror(errno));
+        return NULL;
      }
+
    p = ret;
 
    EINA_ARRAY_ITER_NEXT(array->array, i, item, iterator)
-     {
-       *p = (unsigned char)(long)item;
-       p++;
-     }
+   {
+      *p = (unsigned char)(long)item;
+      p++;
+   }
    return ret;
 }
 
@@ -775,43 +828,45 @@ e_ofono_element_objects_array_get_stringshared(const E_Ofono_Element *element, c
    *p_elements = NULL;
 
    if (!e_ofono_element_property_get_stringshared
-       (element, property, &type, &array))
-     return 0;
+          (element, property, &type, &array))
+      return 0;
 
    if (type != DBUS_TYPE_ARRAY)
      {
-       ERR("property %s is not an array!", property);
-       return 0;
+        ERR("property %s is not an array!", property);
+        return 0;
      }
 
    if ((!array) || (!array->array) || (array->type == DBUS_TYPE_INVALID))
-     return 0;
+      return 0;
 
    if (array->type != DBUS_TYPE_OBJECT_PATH)
      {
-       ERR("property %s is not an array of object paths!", property);
-       return 0;
+        ERR("property %s is not an array of object paths!", property);
+        return 0;
      }
 
    *count = eina_array_count_get(array->array);
    ret = malloc(*count * sizeof(E_Ofono_Element *));
    if (!ret)
      {
-       ERR("could not allocate return array of %d elements: %s",
-           *count, strerror(errno));
-       *count = 0;
-       return 0;
+        ERR("could not allocate return array of %d elements: %s",
+            *count, strerror(errno));
+        *count = 0;
+        return 0;
      }
+
    p = ret;
 
    EINA_ARRAY_ITER_NEXT(array->array, i, item, iterator)
-     {
-       E_Ofono_Element *e = e_ofono_element_get(item, property);
-       if (!e)
-         continue;
-       *p = e;
-       p++;
-     }
+   {
+      E_Ofono_Element *e = e_ofono_element_get(item, property);
+      if (!e)
+         continue;
+
+      *p = e;
+      p++;
+   }
    *count = p - ret;
    *p_elements = ret;
    return 1;
@@ -837,42 +892,44 @@ e_ofono_element_strings_array_get_stringshared(const E_Ofono_Element *element, c
    *strings = NULL;
 
    if (!e_ofono_element_property_get_stringshared
-       (element, property, &type, &array))
-     return 0;
+          (element, property, &type, &array))
+      return 0;
 
    if (type != DBUS_TYPE_ARRAY)
      {
-       ERR("property %s is not an array!", property);
-       return 0;
+        ERR("property %s is not an array!", property);
+        return 0;
      }
 
    if ((!array) || (!array->array) || (array->type == DBUS_TYPE_INVALID))
-     return 0;
+      return 0;
 
    if (array->type != DBUS_TYPE_STRING)
      {
-       ERR("property %s is not an array of strings!", property);
-       return 0;
+        ERR("property %s is not an array of strings!", property);
+        return 0;
      }
 
    *count = eina_array_count_get(array->array);
    ret = malloc(*count * sizeof(char *));
    if (!ret)
      {
-       ERR("could not allocate return array of %d strings: %s",
-           *count, strerror(errno));
-       *count = 0;
-       return 0;
+        ERR("could not allocate return array of %d strings: %s",
+            *count, strerror(errno));
+        *count = 0;
+        return 0;
      }
+
    p = ret;
 
    EINA_ARRAY_ITER_NEXT(array->array, i, item, iterator)
-     {
-       if (!item)
-         continue;
-       *p = item;
-       p++;
-     }
+   {
+      if (!item)
+         continue;
+
+      *p = item;
+      p++;
+   }
    *count = p - ret;
    *strings = ret;
    return 1;
@@ -886,67 +943,78 @@ _e_ofono_element_array_print(FILE *fp, E_Ofono_Array *array)
    void *item;
 
    if (!array)
-     return;
+      return;
 
    switch (array->type)
      {
       case DBUS_TYPE_OBJECT_PATH:
-        EINA_ARRAY_ITER_NEXT(array->array, i, item, iterator)
-          fprintf(fp, "\"%s\", ", (const char *)item);
-        break;
+         EINA_ARRAY_ITER_NEXT(array->array, i, item, iterator)
+         fprintf(fp, "\"%s\", ", (const char *)item);
+         break;
+
       case DBUS_TYPE_STRING:
-        EINA_ARRAY_ITER_NEXT(array->array, i, item, iterator)
-          fprintf(fp, "\"%s\", ", (const char *)item);
-        break;
+         EINA_ARRAY_ITER_NEXT(array->array, i, item, iterator)
+         fprintf(fp, "\"%s\", ", (const char *)item);
+         break;
+
       case DBUS_TYPE_BYTE:
-        EINA_ARRAY_ITER_NEXT(array->array, i, item, iterator)
-          fprintf(fp, "%#02hhx (\"%c\"), ", (unsigned char)(long)item,
-                  (unsigned char)(long)item);
-        break;
+         EINA_ARRAY_ITER_NEXT(array->array, i, item, iterator)
+         fprintf(fp, "%#02hhx (\"%c\"), ", (unsigned char)(long)item,
+                 (unsigned char)(long)item);
+         break;
+
       case DBUS_TYPE_UINT16:
-        EINA_ARRAY_ITER_NEXT(array->array, i, item, iterator)
-          fprintf(fp, "%#04hx (%hu), ", (unsigned short)(long)item,
-                  (unsigned short)(long)item);
-        break;
+         EINA_ARRAY_ITER_NEXT(array->array, i, item, iterator)
+         fprintf(fp, "%#04hx (%hu), ", (unsigned short)(long)item,
+                 (unsigned short)(long)item);
+         break;
+
       case DBUS_TYPE_UINT32:
-        EINA_ARRAY_ITER_NEXT(array->array, i, item, iterator)
-          fprintf(fp, "%#08x (%u), ", (unsigned int)(long)item,
-                  (unsigned int)(long)item);
-        break;
+         EINA_ARRAY_ITER_NEXT(array->array, i, item, iterator)
+         fprintf(fp, "%#08x (%u), ", (unsigned int)(long)item,
+                 (unsigned int)(long)item);
+         break;
+
       case DBUS_TYPE_DICT_ENTRY:
-        fputs("{ ", fp);
-        EINA_ARRAY_ITER_NEXT(array->array, i, item, iterator)
-          {
-             E_Ofono_Element_Dict_Entry *entry = item;
-             fprintf(fp, "%s: ", entry->name);
-             switch (entry->type)
-               {
-                case DBUS_TYPE_OBJECT_PATH:
-                   fprintf(fp, "\"%s\", ", entry->value.path);
-                   break;
-                case DBUS_TYPE_STRING:
-                   fprintf(fp, "\"%s\", ", entry->value.str);
-                   break;
-                case DBUS_TYPE_BYTE:
-                   fprintf(fp, "%#02hhx (\"%c\"), ",
-                           entry->value.byte, entry->value.byte);
-                   break;
-                case DBUS_TYPE_UINT16:
-                   fprintf(fp, "%#04hx (%hu), ",
-                           entry->value.u16, entry->value.u16);
-                   break;
-                case DBUS_TYPE_UINT32:
-                   fprintf(fp, "%#08x (%u), ",
-                           entry->value.u32, entry->value.u32);
-                   break;
-                default:
-                   fprintf(fp, "<UNKNOWN TYPE '%c'>", entry->type);
-               }
-          }
-        fputs("}", fp);
-        break;
+         fputs("{ ", fp);
+         EINA_ARRAY_ITER_NEXT(array->array, i, item, iterator)
+         {
+            E_Ofono_Element_Dict_Entry *entry = item;
+            fprintf(fp, "%s: ", entry->name);
+            switch (entry->type)
+              {
+               case DBUS_TYPE_OBJECT_PATH:
+                  fprintf(fp, "\"%s\", ", entry->value.path);
+                  break;
+
+               case DBUS_TYPE_STRING:
+                  fprintf(fp, "\"%s\", ", entry->value.str);
+                  break;
+
+               case DBUS_TYPE_BYTE:
+                  fprintf(fp, "%#02hhx (\"%c\"), ",
+                          entry->value.byte, entry->value.byte);
+                  break;
+
+               case DBUS_TYPE_UINT16:
+                  fprintf(fp, "%#04hx (%hu), ",
+                          entry->value.u16, entry->value.u16);
+                  break;
+
+               case DBUS_TYPE_UINT32:
+                  fprintf(fp, "%#08x (%u), ",
+                          entry->value.u32, entry->value.u32);
+                  break;
+
+               default:
+                  fprintf(fp, "<UNKNOWN TYPE '%c'>", entry->type);
+              }
+         }
+         fputs("}", fp);
+         break;
+
       default:
-        fprintf(fp, "<UNKNOWN ARRAY TYPE '%c'>", array->type);
+         fprintf(fp, "<UNKNOWN ARRAY TYPE '%c'>", array->type);
      }
 }
 
@@ -961,48 +1029,55 @@ e_ofono_element_print(FILE *fp, const E_Ofono_Element *element)
    EINA_SAFETY_ON_NULL_RETURN(fp);
    if (!element)
      {
-       fputs("Error: no element to print\n", fp);
-       return;
+        fputs("Error: no element to print\n", fp);
+        return;
      }
 
    fprintf(fp,
-          "Element %p: %s [%s]\n"
-          "\tProperties:\n",
-          element, element->path, element->interface);
+           "Element %p: %s [%s]\n"
+           "\tProperties:\n",
+           element, element->path, element->interface);
 
    EINA_INLIST_FOREACH(element->props, p)
-     {
-       fprintf(fp, "\t\t%s (%c) = ", p->name, p->type);
-
-       switch (p->type)
-         {
-          case DBUS_TYPE_STRING:
-             fprintf(fp, "\"%s\"", p->value.str);
-             break;
-          case DBUS_TYPE_OBJECT_PATH:
-             fprintf(fp, "\"%s\"", p->value.path);
-             break;
-          case DBUS_TYPE_BOOLEAN:
-             fprintf(fp, "%hhu", p->value.boolean);
-             break;
-          case DBUS_TYPE_BYTE:
-             fprintf(fp, "%#02hhx (%d), ", p->value.byte, p->value.byte);
-             break;
-          case DBUS_TYPE_UINT16:
-             fprintf(fp, "%hu", p->value.u16);
-             break;
-          case DBUS_TYPE_UINT32:
-             fprintf(fp, "%u", p->value.u32);
-             break;
-          case DBUS_TYPE_ARRAY:
-             _e_ofono_element_array_print(fp, p->value.array);
-             break;
-          default:
-             fputs("don't know how to print type", fp);
-         }
-
-       fputc('\n', fp);
-     }
+   {
+      fprintf(fp, "\t\t%s (%c) = ", p->name, p->type);
+
+      switch (p->type)
+        {
+         case DBUS_TYPE_STRING:
+            fprintf(fp, "\"%s\"", p->value.str);
+            break;
+
+         case DBUS_TYPE_OBJECT_PATH:
+            fprintf(fp, "\"%s\"", p->value.path);
+            break;
+
+         case DBUS_TYPE_BOOLEAN:
+            fprintf(fp, "%hhu", p->value.boolean);
+            break;
+
+         case DBUS_TYPE_BYTE:
+            fprintf(fp, "%#02hhx (%d), ", p->value.byte, p->value.byte);
+            break;
+
+         case DBUS_TYPE_UINT16:
+            fprintf(fp, "%hu", p->value.u16);
+            break;
+
+         case DBUS_TYPE_UINT32:
+            fprintf(fp, "%u", p->value.u32);
+            break;
+
+         case DBUS_TYPE_ARRAY:
+            _e_ofono_element_array_print(fp, p->value.array);
+            break;
+
+         default:
+            fputs("don't know how to print type", fp);
+        }
+
+      fputc('\n', fp);
+   }
 }
 
 static E_Ofono_Element *
@@ -1013,8 +1088,8 @@ e_ofono_element_new(const char *path, const char *interface)
    element = calloc(1, sizeof(*element));
    if (!element)
      {
-       ERR("could not allocate element: %s",   strerror(errno));
-       return NULL;
+        ERR("could not allocate element: %s",   strerror(errno));
+        return NULL;
      }
 
    element->path = eina_stringshare_add(path);
@@ -1029,10 +1104,10 @@ e_ofono_element_extra_properties_free(E_Ofono_Element *element)
 {
    while (element->props)
      {
-       E_Ofono_Element_Property *prop;
-       prop = (E_Ofono_Element_Property *)element->props;
-       element->props = element->props->next;
-       _e_ofono_element_property_free(prop);
+        E_Ofono_Element_Property *prop;
+        prop = (E_Ofono_Element_Property *)element->props;
+        element->props = element->props->next;
+        _e_ofono_element_property_free(prop);
      }
 }
 
@@ -1040,16 +1115,18 @@ static void
 e_ofono_element_free(E_Ofono_Element *element)
 {
    if (element->_idler.changed)
-     ecore_idler_del(element->_idler.changed);
+      ecore_idler_del(element->_idler.changed);
 
    while (element->_listeners)
      {
-       E_Ofono_Element_Listener *l = (void *)element->_listeners;
-       element->_listeners = eina_inlist_remove
-         (element->_listeners, element->_listeners);
+        E_Ofono_Element_Listener *l = (void *)element->_listeners;
+        element->_listeners = eina_inlist_remove
+              (element->_listeners, element->_listeners);
 
-       if (l->free_data) l->free_data(l->data);
-       free(l);
+        if (l->free_data)
+           l->free_data(l->data);
+
+        free(l);
      }
 
    e_ofono_element_pending_cancel_and_free(&element->_pending.properties_get);
@@ -1085,9 +1162,10 @@ e_ofono_element_unref(E_Ofono_Element *element)
 
    i = --element->_references;
    if (i == 0)
-     e_ofono_element_free(element);
+      e_ofono_element_free(element);
    else if (i < 0)
-     ERR("element %p references %d < 0", element, i);
+      ERR("element %p references %d < 0", element, i);
+
    return i;
 }
 
@@ -1115,20 +1193,20 @@ e_ofono_element_message_send(E_Ofono_Element *element, const char *method_name,
    data = malloc(sizeof(*data));
    if (!data)
      {
-       ERR("could not alloc e_ofono_element_call_data: %s",
-           strerror(errno));
-       dbus_message_unref(msg);
-       return 0;
+        ERR("could not alloc e_ofono_element_call_data: %s",
+            strerror(errno));
+        dbus_message_unref(msg);
+        return 0;
      }
 
    p = malloc(sizeof(*p));
    if (!p)
      {
-       ERR("could not alloc E_Ofono_Element_Pending: %s",
-           strerror(errno));
-       free(data);
-       dbus_message_unref(msg);
-       return 0;
+        ERR("could not alloc E_Ofono_Element_Pending: %s",
+            strerror(errno));
+        free(data);
+        dbus_message_unref(msg);
+        return 0;
      }
 
    data->element = element;
@@ -1139,22 +1217,22 @@ e_ofono_element_message_send(E_Ofono_Element *element, const char *method_name,
    p->user_data = (void *)user_data;
    p->data = data;
    p->pending = e_dbus_message_send
-     (e_ofono_conn, msg, e_ofono_element_call_dispatch_and_free, -1, data);
+         (e_ofono_conn, msg, e_ofono_element_call_dispatch_and_free, -1, data);
    dbus_message_unref(msg);
 
    if (p->pending)
      {
-       *pending = eina_inlist_append(*pending, EINA_INLIST_GET(p));
-       return 1;
+        *pending = eina_inlist_append(*pending, EINA_INLIST_GET(p));
+        return 1;
      }
    else
      {
-       ERR("failed to call %s (obj=%s, path=%s, iface=%s)",
-           method_name, e_ofono_system_bus_name_get(),
-           element->path, interface);
-       free(data);
-       free(p);
-       return 0;
+        ERR("failed to call %s (obj=%s, path=%s, iface=%s)",
+            method_name, e_ofono_system_bus_name_get(),
+            element->path, interface);
+        free(data);
+        free(p);
+        return 0;
      }
 }
 
@@ -1170,11 +1248,11 @@ e_ofono_element_call_full(E_Ofono_Element *element, const char *method_name, con
    interface = interface ? : element->interface;
 
    msg = dbus_message_new_method_call
-     (e_ofono_system_bus_name_get(), element->path, interface,
-      method_name);
+         (e_ofono_system_bus_name_get(), element->path, interface,
+         method_name);
 
    return e_ofono_element_message_send
-     (element, method_name, interface, cb, msg, pending, user_cb, user_data);
+             (element, method_name, interface, cb, msg, pending, user_cb, user_data);
 }
 
 static Eina_Bool
@@ -1184,19 +1262,19 @@ _e_ofono_element_property_value_add(E_Ofono_Element *element, const char *name,
 
    name = eina_stringshare_add(name);
    EINA_INLIST_FOREACH(element->props, p)
-     {
-       if (p->name == name)
-         {
-            eina_stringshare_del(name);
-            return _e_ofono_element_property_update(p, type, value, element);
-         }
-     }
+   {
+      if (p->name == name)
+        {
+           eina_stringshare_del(name);
+           return _e_ofono_element_property_update(p, type, value, element);
+        }
+   }
 
    p = _e_ofono_element_property_new(name, type, value, element);
    if (!p)
      {
-       ERR("could not create property %s (%c)", name, type);
-       return 0;
+        ERR("could not create property %s (%c)", name, type);
+        return 0;
      }
 
    element->props = eina_inlist_append(element->props, EINA_INLIST_GET(p));
@@ -1212,72 +1290,77 @@ _e_ofono_element_iter_get_array(DBusMessageIter *itr, const char *key)
    array = malloc(sizeof(E_Ofono_Array));
    if (!array)
      {
-       ERR("could not create new e_ofono array.");
-       return NULL;
+        ERR("could not create new e_ofono array.");
+        return NULL;
      }
+
    array->array = eina_array_new(16);
    if (!(array->array))
      {
-       ERR("could not create new eina array.");
-       free(array);
-       return NULL;
+        ERR("could not create new eina array.");
+        free(array);
+        return NULL;
      }
 
    dbus_message_iter_recurse(itr, &e_itr);
    array->type = dbus_message_iter_get_arg_type(&e_itr);
    if (array->type == DBUS_TYPE_INVALID)
      {
-       DBG("array %s is of type 'invalid' (empty?)", key);
-       eina_array_free(array->array);
-       free(array);
-       return NULL;
+        DBG("array %s is of type 'invalid' (empty?)", key);
+        eina_array_free(array->array);
+        free(array);
+        return NULL;
      }
 
    do
      {
-       switch (array->type)
-         {
-          case DBUS_TYPE_OBJECT_PATH:
-            {
-               const char *path;
-
-               dbus_message_iter_get_basic(&e_itr, &path);
-               path = eina_stringshare_add(path);
-               eina_array_push(array->array, path);
-               _e_ofono_element_item_register(key, path);
-            }
-            break;
-          case DBUS_TYPE_STRING:
-            {
-               const char *str;
-
-               dbus_message_iter_get_basic(&e_itr, &str);
-               str = eina_stringshare_add(str);
-               eina_array_push(array->array, str);
-            }
-            break;
-          case DBUS_TYPE_BYTE:
-            {
-               unsigned char byte;
-               dbus_message_iter_get_basic(&e_itr, &byte);
-               eina_array_push(array->array, (void *)(long)byte);
-            }
-            break;
-          case DBUS_TYPE_DICT_ENTRY:
-            {
-               E_Ofono_Element_Dict_Entry *entry;
-               entry = _e_ofono_element_dict_entry_new(&e_itr);
-               if (entry)
-                 eina_array_push(array->array, entry);
-            }
-            break;
-          default:
-             ERR("don't know how to build array '%s' of type %c (%d)",
-                 key, array->type, array->type);
-             eina_array_free(array->array);
-             free(array);
-             return NULL;
-         }
+        switch (array->type)
+          {
+           case DBUS_TYPE_OBJECT_PATH:
+           {
+              const char *path;
+
+              dbus_message_iter_get_basic(&e_itr, &path);
+              path = eina_stringshare_add(path);
+              eina_array_push(array->array, path);
+              _e_ofono_element_item_register(key, path);
+           }
+           break;
+
+           case DBUS_TYPE_STRING:
+           {
+              const char *str;
+
+              dbus_message_iter_get_basic(&e_itr, &str);
+              str = eina_stringshare_add(str);
+              eina_array_push(array->array, str);
+           }
+           break;
+
+           case DBUS_TYPE_BYTE:
+           {
+              unsigned char byte;
+              dbus_message_iter_get_basic(&e_itr, &byte);
+              eina_array_push(array->array, (void *)(long)byte);
+           }
+           break;
+
+           case DBUS_TYPE_DICT_ENTRY:
+           {
+              E_Ofono_Element_Dict_Entry *entry;
+              entry = _e_ofono_element_dict_entry_new(&e_itr);
+              if (entry)
+                 eina_array_push(array->array, entry);
+           }
+           break;
+
+           default:
+              ERR("don't know how to build array '%s' of type %c (%d)",
+                  key, array->type, array->type);
+              eina_array_free(array->array);
+              free(array);
+              return NULL;
+          }
      }
    while (dbus_message_iter_next(&e_itr));
    return array;
@@ -1293,77 +1376,84 @@ _e_ofono_element_get_properties_callback(void *user_data, DBusMessage *msg, DBus
    DBG("get_properties msg=%p", msg);
 
    if (!_dbus_callback_check_and_init(msg, &itr, err))
-     return;
+      return;
 
    t = dbus_message_iter_get_arg_type(&itr);
    if (!_dbus_iter_type_check(t, DBUS_TYPE_ARRAY))
-     return;
+      return;
 
    changed = 0;
    dbus_message_iter_recurse(&itr, &s_itr);
    do
      {
-       DBusMessageIter e_itr, v_itr;
-       const char *key;
-       void *value = NULL;
-       int r;
-
-       t = dbus_message_iter_get_arg_type(&s_itr);
-       if (!_dbus_iter_type_check(t, DBUS_TYPE_DICT_ENTRY))
-         continue;
-
-       dbus_message_iter_recurse(&s_itr, &e_itr);
-
-       t = dbus_message_iter_get_arg_type(&e_itr);
-       if (!_dbus_iter_type_check(t, DBUS_TYPE_STRING))
-         continue;
-
-       dbus_message_iter_get_basic(&e_itr, &key);
-       dbus_message_iter_next(&e_itr);
-       t = dbus_message_iter_get_arg_type(&e_itr);
-       if (!_dbus_iter_type_check(t, DBUS_TYPE_VARIANT))
-         continue;
-
-       dbus_message_iter_recurse(&e_itr, &v_itr);
-       t = dbus_message_iter_get_arg_type(&v_itr);
-       if (t == DBUS_TYPE_ARRAY)
-         value = _e_ofono_element_iter_get_array(&v_itr, key);
-       else if (t != DBUS_TYPE_INVALID) {
-          dbus_message_iter_get_basic(&v_itr, &value);
-       } else {
-          ERR("property has invalid type %s", key);
-          continue;
-       }
-
-       r = _e_ofono_element_property_value_add(element, key, t, value);
-       if (r < 0)
-         ERR("failed to add property value %s (%c)", key, t);
-       else if (r == 1)
-         {
-            INF("property value changed %s (%c)", key, t);
-            changed = 1;
-            if ((strcmp(key, "Interfaces") == 0) && value)
-              {
-                 char *interface;
-                 Eina_Array_Iterator iterator;
-                 unsigned int i;
-                 E_Ofono_Element *e;
-
-                 EINA_ARRAY_ITER_NEXT(((E_Ofono_Array*)value)->array, i,
-                                      interface, iterator)
-                   {
-                      DBG("Found interface %s on %s", interface, element->path);
-                      e = e_ofono_element_register(element->path, interface);
-                      if ((e) && (!e_ofono_element_properties_sync(e)))
-                        WRN("could not get properties of %s", e->path);
-                   }
-              }
-         }
+        DBusMessageIter e_itr, v_itr;
+        const char *key;
+        void *value = NULL;
+        int r;
+
+        t = dbus_message_iter_get_arg_type(&s_itr);
+        if (!_dbus_iter_type_check(t, DBUS_TYPE_DICT_ENTRY))
+           continue;
+
+        dbus_message_iter_recurse(&s_itr, &e_itr);
+
+        t = dbus_message_iter_get_arg_type(&e_itr);
+        if (!_dbus_iter_type_check(t, DBUS_TYPE_STRING))
+           continue;
+
+        dbus_message_iter_get_basic(&e_itr, &key);
+        dbus_message_iter_next(&e_itr);
+        t = dbus_message_iter_get_arg_type(&e_itr);
+        if (!_dbus_iter_type_check(t, DBUS_TYPE_VARIANT))
+           continue;
+
+        dbus_message_iter_recurse(&e_itr, &v_itr);
+        t = dbus_message_iter_get_arg_type(&v_itr);
+        if (t == DBUS_TYPE_ARRAY)
+          {
+             value = _e_ofono_element_iter_get_array(&v_itr, key);
+          }
+        else if (t != DBUS_TYPE_INVALID)
+          {
+             dbus_message_iter_get_basic(&v_itr, &value);
+          }
+        else
+          {
+             ERR("property has invalid type %s", key);
+             continue;
+          }
+
+        r = _e_ofono_element_property_value_add(element, key, t, value);
+        if (r < 0)
+          {
+             ERR("failed to add property value %s (%c)", key, t);
+          }
+        else if (r == 1)
+          {
+             INF("property value changed %s (%c)", key, t);
+             changed = 1;
+             if ((strcmp(key, "Interfaces") == 0) && value)
+               {
+                  char *interface;
+                  Eina_Array_Iterator iterator;
+                  unsigned int i;
+                  E_Ofono_Element *e;
+
+                  EINA_ARRAY_ITER_NEXT(((E_Ofono_Array *)value)->array, i,
+                                       interface, iterator)
+                  {
+                     DBG("Found interface %s on %s", interface, element->path);
+                     e = e_ofono_element_register(element->path, interface);
+                     if ((e) && (!e_ofono_element_properties_sync(e)))
+                        WRN("could not get properties of %s", e->path);
+                  }
+               }
+          }
      }
    while (dbus_message_iter_next(&s_itr));
 
    if (changed)
-     _e_ofono_element_listeners_call(element);
+      _e_ofono_element_listeners_call(element);
 }
 
 /**
@@ -1385,9 +1475,9 @@ e_ofono_element_sync_properties_full(E_Ofono_Element *element, E_DBus_Method_Ret
 
    EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
    return e_ofono_element_call_full
-     (element, name, element->interface,
-      _e_ofono_element_get_properties_callback,
-      &element->_pending.properties_get, cb, data);
+             (element, name, element->interface,
+             _e_ofono_element_get_properties_callback,
+             &element->_pending.properties_get, cb, data);
 }
 
 /**
@@ -1438,34 +1528,34 @@ e_ofono_element_property_dict_set_full(E_Ofono_Element *element, const char *pro
    EINA_SAFETY_ON_NULL_RETURN_VAL(prop, 0);
 
    msg = dbus_message_new_method_call
-     (e_ofono_system_bus_name_get(), element->path, element->interface, name);
+         (e_ofono_system_bus_name_get(), element->path, element->interface, name);
 
    if (!msg)
-     return 0;
+      return 0;
 
    dbus_message_iter_init_append(msg, &itr);
    dbus_message_iter_append_basic(&itr, DBUS_TYPE_STRING, &prop);
 
    if ((size_t)snprintf(typestr, sizeof(typestr),
-                       (DBUS_TYPE_ARRAY_AS_STRING
-                        DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING
-                        DBUS_TYPE_STRING_AS_STRING
-                        "%c"
-                        DBUS_DICT_ENTRY_END_CHAR_AS_STRING),
-                       type) >= sizeof(typestr))
+                        (DBUS_TYPE_ARRAY_AS_STRING
+                         DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING
+                         DBUS_TYPE_STRING_AS_STRING
+                         "%c"
+                         DBUS_DICT_ENTRY_END_CHAR_AS_STRING),
+                        type) >= sizeof(typestr))
      {
-       ERR("sizeof(typestr) is too small!");
-       return 0;
+        ERR("sizeof(typestr) is too small!");
+        return 0;
      }
 
    dbus_message_iter_open_container(&itr, DBUS_TYPE_VARIANT, typestr, &variant);
 
    snprintf(typestr, sizeof(typestr),
-           (DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING
-            DBUS_TYPE_STRING_AS_STRING
-            "%c"
-            DBUS_DICT_ENTRY_END_CHAR_AS_STRING),
-           type);
+            (DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING
+             DBUS_TYPE_STRING_AS_STRING
+             "%c"
+             DBUS_DICT_ENTRY_END_CHAR_AS_STRING),
+            type);
 
    dbus_message_iter_open_container(&variant, DBUS_TYPE_ARRAY, typestr, &dict);
    dbus_message_iter_open_container(&dict, DBUS_TYPE_DICT_ENTRY, NULL, &entry);
@@ -1473,17 +1563,17 @@ e_ofono_element_property_dict_set_full(E_Ofono_Element *element, const char *pro
    dbus_message_iter_append_basic(&entry, DBUS_TYPE_STRING, &key);
 
    if ((type == DBUS_TYPE_STRING) || (type == DBUS_TYPE_OBJECT_PATH))
-     dbus_message_iter_append_basic(&entry, type, &value);
+      dbus_message_iter_append_basic(&entry, type, &value);
    else
-     dbus_message_iter_append_basic(&entry, type, value);
+      dbus_message_iter_append_basic(&entry, type, value);
 
    dbus_message_iter_close_container(&dict, &entry);
    dbus_message_iter_close_container(&variant, &dict);
    dbus_message_iter_close_container(&itr, &variant);
 
    return e_ofono_element_message_send
-     (element, name, NULL, NULL, msg,
-      &element->_pending.property_set, cb, data);
+             (element, name, NULL, NULL, msg,
+             &element->_pending.property_set, cb, data);
 }
 
 /**
@@ -1514,10 +1604,10 @@ e_ofono_element_property_set_full(E_Ofono_Element *element, const char *prop, in
    EINA_SAFETY_ON_NULL_RETURN_VAL(prop, 0);
 
    msg = dbus_message_new_method_call
-     (e_ofono_system_bus_name_get(), element->path, element->interface, name);
+         (e_ofono_system_bus_name_get(), element->path, element->interface, name);
 
    if (!msg)
-     return 0;
+      return 0;
 
    DBusMessageIter itr, v;
    dbus_message_iter_init_append(msg, &itr);
@@ -1527,19 +1617,24 @@ e_ofono_element_property_set_full(E_Ofono_Element *element, const char *prop, in
    typestr[1] = '\0';
    dbus_message_iter_open_container(&itr, DBUS_TYPE_VARIANT, typestr, &v);
    if ((type == DBUS_TYPE_STRING) || (type == DBUS_TYPE_OBJECT_PATH))
-     dbus_message_iter_append_basic(&v, type, &value);
+     {
+        dbus_message_iter_append_basic(&v, type, &value);
+     }
    else if (type == DBUS_TYPE_BOOLEAN)
      {
-       unsigned int b = *(Eina_Bool *)value;
-       dbus_message_iter_append_basic(&v, type, &b);
+        unsigned int b = *(Eina_Bool *)value;
+        dbus_message_iter_append_basic(&v, type, &b);
      }
    else
-     dbus_message_iter_append_basic(&v, type, value);
+     {
+        dbus_message_iter_append_basic(&v, type, value);
+     }
+
    dbus_message_iter_close_container(&itr, &v);
 
    return e_ofono_element_message_send
-     (element, name, NULL, NULL, msg,
-      &element->_pending.property_set, cb, data);
+             (element, name, NULL, NULL, msg,
+             &element->_pending.property_set, cb, data);
 }
 
 /**
@@ -1562,7 +1657,7 @@ e_ofono_element_property_set(E_Ofono_Element *element, const char *prop, int typ
    EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
    EINA_SAFETY_ON_NULL_RETURN_VAL(prop, 0);
    return e_ofono_element_property_set_full
-     (element, prop, type, value, NULL, NULL);
+             (element, prop, type, value, NULL, NULL);
 }
 
 Eina_Bool
@@ -1577,17 +1672,17 @@ e_ofono_element_call_with_path(E_Ofono_Element *element, const char *method_name
    EINA_SAFETY_ON_NULL_RETURN_VAL(pending, 0);
 
    msg = dbus_message_new_method_call
-     (e_ofono_system_bus_name_get(), element->path, element->interface,
-      method_name);
+         (e_ofono_system_bus_name_get(), element->path, element->interface,
+         method_name);
 
    if (!msg)
-     return 0;
+      return 0;
 
    dbus_message_iter_init_append(msg, &itr);
    dbus_message_iter_append_basic(&itr, DBUS_TYPE_OBJECT_PATH, &string);
 
    return e_ofono_element_message_send
-     (element, method_name, NULL, cb, msg, pending, user_cb, user_data);
+             (element, method_name, NULL, cb, msg, pending, user_cb, user_data);
 }
 
 Eina_Bool
@@ -1602,17 +1697,17 @@ e_ofono_element_call_with_string(E_Ofono_Element *element, const char *method_na
    EINA_SAFETY_ON_NULL_RETURN_VAL(pending, 0);
 
    msg = dbus_message_new_method_call
-     (e_ofono_system_bus_name_get(), element->path, element->interface,
-      method_name);
+         (e_ofono_system_bus_name_get(), element->path, element->interface,
+         method_name);
 
    if (!msg)
-     return 0;
+      return 0;
 
    dbus_message_iter_init_append(msg, &itr);
    dbus_message_iter_append_basic(&itr, DBUS_TYPE_STRING, &string);
 
    return e_ofono_element_message_send
-     (element, method_name, NULL, cb, msg, pending, user_cb, user_data);
+             (element, method_name, NULL, cb, msg, pending, user_cb, user_data);
 }
 
 Eina_Bool
@@ -1628,18 +1723,18 @@ e_ofono_element_call_with_path_and_string(E_Ofono_Element *element, const char *
    EINA_SAFETY_ON_NULL_RETURN_VAL(pending, 0);
 
    msg = dbus_message_new_method_call
-     (e_ofono_system_bus_name_get(), element->path, element->interface,
-      method_name);
+         (e_ofono_system_bus_name_get(), element->path, element->interface,
+         method_name);
 
    if (!msg)
-     return 0;
+      return 0;
 
    dbus_message_iter_init_append(msg, &itr);
    dbus_message_iter_append_basic(&itr, DBUS_TYPE_OBJECT_PATH, &path);
    dbus_message_iter_append_basic(&itr, DBUS_TYPE_STRING, &string);
 
    return e_ofono_element_message_send
-     (element, method_name, NULL, cb, msg, pending, user_cb, user_data);
+             (element, method_name, NULL, cb, msg, pending, user_cb, user_data);
 }
 
 /**
@@ -1664,13 +1759,13 @@ e_ofono_element_property_type_get_stringshared(const E_Ofono_Element *element, c
    EINA_SAFETY_ON_NULL_RETURN_VAL(type, 0);
 
    EINA_INLIST_FOREACH(element->props, p)
-     {
-       if (p->name == name)
-         {
-            *type = p->type;
-            return 1;
-         }
-     }
+   {
+      if (p->name == name)
+        {
+           *type = p->type;
+           return 1;
+        }
+   }
 
    WRN("element %s (%p) has no property with name \"%s\".",
        element->path, element, name);
@@ -1708,33 +1803,38 @@ e_ofono_element_list_properties(const E_Ofono_Element *element, Eina_Bool (*cb)(
    EINA_SAFETY_ON_NULL_RETURN(cb);
 
    EINA_INLIST_FOREACH(element->props, p)
-     {
-       const void *value = NULL;
-
-       switch (p->type)
-         {
-          case DBUS_TYPE_STRING:
-             value = &p->value.str;
-             break;
-          case DBUS_TYPE_OBJECT_PATH:
-             value = &p->value.path;
-             break;
-          case DBUS_TYPE_BOOLEAN:
-             value = (void *)(unsigned long)p->value.boolean;
-             break;
-          case DBUS_TYPE_UINT16:
-             value = &p->value.u16;
-             break;
-          case DBUS_TYPE_UINT32:
-             value = &p->value.u32;
-             break;
-          default:
-             ERR("unsupported type %c", p->type);
-         }
-
-       if (!cb((void *)data, element, p->name, p->type, value))
-         return;
-     }
+   {
+      const void *value = NULL;
+
+      switch (p->type)
+        {
+         case DBUS_TYPE_STRING:
+            value = &p->value.str;
+            break;
+
+         case DBUS_TYPE_OBJECT_PATH:
+            value = &p->value.path;
+            break;
+
+         case DBUS_TYPE_BOOLEAN:
+            value = (void *)(unsigned long)p->value.boolean;
+            break;
+
+         case DBUS_TYPE_UINT16:
+            value = &p->value.u16;
+            break;
+
+         case DBUS_TYPE_UINT32:
+            value = &p->value.u32;
+            break;
+
+         default:
+            ERR("unsupported type %c", p->type);
+        }
+
+      if (!cb((void *)data, element, p->name, p->type, value))
+         return;
+   }
 }
 
 /**
@@ -1767,63 +1867,73 @@ e_ofono_element_property_dict_get_stringshared(const E_Ofono_Element *element, c
    EINA_SAFETY_ON_NULL_RETURN_VAL(value, 0);
 
    EINA_INLIST_FOREACH(element->props, p)
-     {
-       E_Ofono_Element_Dict_Entry *entry;
-       E_Ofono_Array *array;
-
-       if (p->name != dict_name)
-         continue;
-       if (p->type != DBUS_TYPE_ARRAY)
-         {
-            WRN("element %s (%p) has property \"%s\" is not an array: %c (%d)",
-                element->path, element, dict_name, p->type, p->type);
-            return 0;
-         }
-       array = p->value.array;
-       if ((!array) || (array->type != DBUS_TYPE_DICT_ENTRY))
-         {
-            int t = array ? array->type : DBUS_TYPE_INVALID;
-            WRN("element %s (%p) has property \"%s\" is not a dict: %c (%d)",
-                element->path, element, dict_name, t, t);
-            return 0;
-         }
-       entry = _e_ofono_element_array_dict_find_stringshared(array, key);
-       if (!entry)
-         {
-            WRN("element %s (%p) has no dict property with name \"%s\" with "
-                "key \"%s\".",
-                element->path, element, dict_name, key);
-            return 0;
-         }
-
-       if (type) *type = entry->type;
-
-       switch (entry->type)
-         {
-          case DBUS_TYPE_BOOLEAN:
-             *(Eina_Bool *)value = entry->value.boolean;
-             return 1;
-          case DBUS_TYPE_BYTE:
-             *(unsigned char *)value = entry->value.byte;
-             return 1;
-          case DBUS_TYPE_UINT16:
-             *(unsigned short *)value = entry->value.u16;
-             return 1;
-          case DBUS_TYPE_UINT32:
-             *(unsigned int *)value = entry->value.u32;
-             return 1;
-          case DBUS_TYPE_STRING:
-             *(const char **)value = entry->value.str;
-             return 1;
-          case DBUS_TYPE_OBJECT_PATH:
-             *(const char **)value = entry->value.path;
-             return 1;
-          default:
-             ERR("don't know how to get property %s, key %s type %c (%d)",
-                 dict_name, key, entry->type, entry->type);
-             return 0;
-         }
-     }
+   {
+      E_Ofono_Element_Dict_Entry *entry;
+      E_Ofono_Array *array;
+
+      if (p->name != dict_name)
+         continue;
+
+      if (p->type != DBUS_TYPE_ARRAY)
+        {
+           WRN("element %s (%p) has property \"%s\" is not an array: %c (%d)",
+               element->path, element, dict_name, p->type, p->type);
+           return 0;
+        }
+
+      array = p->value.array;
+      if ((!array) || (array->type != DBUS_TYPE_DICT_ENTRY))
+        {
+           int t = array ? array->type : DBUS_TYPE_INVALID;
+           WRN("element %s (%p) has property \"%s\" is not a dict: %c (%d)",
+               element->path, element, dict_name, t, t);
+           return 0;
+        }
+
+      entry = _e_ofono_element_array_dict_find_stringshared(array, key);
+      if (!entry)
+        {
+           WRN("element %s (%p) has no dict property with name \"%s\" with "
+               "key \"%s\".",
+               element->path, element, dict_name, key);
+           return 0;
+        }
+
+      if (type)
+         *type = entry->type;
+
+      switch (entry->type)
+        {
+         case DBUS_TYPE_BOOLEAN:
+            *(Eina_Bool *)value = entry->value.boolean;
+            return 1;
+
+         case DBUS_TYPE_BYTE:
+            *(unsigned char *)value = entry->value.byte;
+            return 1;
+
+         case DBUS_TYPE_UINT16:
+            *(unsigned short *)value = entry->value.u16;
+            return 1;
+
+         case DBUS_TYPE_UINT32:
+            *(unsigned int *)value = entry->value.u32;
+            return 1;
+
+         case DBUS_TYPE_STRING:
+            *(const char **)value = entry->value.str;
+            return 1;
+
+         case DBUS_TYPE_OBJECT_PATH:
+            *(const char **)value = entry->value.path;
+            return 1;
+
+         default:
+            ERR("don't know how to get property %s, key %s type %c (%d)",
+                dict_name, key, entry->type, entry->type);
+            return 0;
+        }
+   }
 
    WRN("element %s (%p) has no property with name \"%s\".",
        element->path, element, dict_name);
@@ -1857,41 +1967,49 @@ e_ofono_element_property_get_stringshared(const E_Ofono_Element *element, const
    EINA_SAFETY_ON_NULL_RETURN_VAL(value, 0);
 
    EINA_INLIST_FOREACH(element->props, p)
-     {
-       if (p->name != name)
-         continue;
-
-       if (type) *type = p->type;
-
-       switch (p->type)
-         {
-          case DBUS_TYPE_BOOLEAN:
-             *(Eina_Bool *)value = p->value.boolean;
-             return 1;
-          case DBUS_TYPE_BYTE:
-             *(unsigned char *)value = p->value.byte;
-             return 1;
-          case DBUS_TYPE_UINT16:
-             *(unsigned short *)value = p->value.u16;
-             return 1;
-          case DBUS_TYPE_UINT32:
-             *(unsigned int *)value = p->value.u32;
-             return 1;
-          case DBUS_TYPE_STRING:
-             *(const char **)value = p->value.str;
-             return 1;
-          case DBUS_TYPE_OBJECT_PATH:
-             *(const char **)value = p->value.path;
-             return 1;
-          case DBUS_TYPE_ARRAY:
-             *(E_Ofono_Array **)value = p->value.array;
-             return 1;
-          default:
-             ERR("don't know how to get property type %c (%d)",
-                 p->type, p->type);
-             return 0;
-         }
-     }
+   {
+      if (p->name != name)
+         continue;
+
+      if (type)
+         *type = p->type;
+
+      switch (p->type)
+        {
+         case DBUS_TYPE_BOOLEAN:
+            *(Eina_Bool *)value = p->value.boolean;
+            return 1;
+
+         case DBUS_TYPE_BYTE:
+            *(unsigned char *)value = p->value.byte;
+            return 1;
+
+         case DBUS_TYPE_UINT16:
+            *(unsigned short *)value = p->value.u16;
+            return 1;
+
+         case DBUS_TYPE_UINT32:
+            *(unsigned int *)value = p->value.u32;
+            return 1;
+
+         case DBUS_TYPE_STRING:
+            *(const char **)value = p->value.str;
+            return 1;
+
+         case DBUS_TYPE_OBJECT_PATH:
+            *(const char **)value = p->value.path;
+            return 1;
+
+         case DBUS_TYPE_ARRAY:
+            *(E_Ofono_Array **)value = p->value.array;
+            return 1;
+
+         default:
+            ERR("don't know how to get property type %c (%d)",
+                p->type, p->type);
+            return 0;
+        }
+   }
 
    WRN("element %s (%p) has no property with name \"%s\".",
        element->path, element, name);
@@ -1921,16 +2039,15 @@ e_ofono_element_property_get(const E_Ofono_Element *element, const char *name, i
    Eina_Bool ret;
    name = eina_stringshare_add(name);
    ret = e_ofono_element_property_get_stringshared
-     (element, name, type, value);
+         (element, name, type, value);
    eina_stringshare_del(name);
    return ret;
 }
 
-
 struct e_ofono_elements_for_each_data
 {
    Eina_Hash_Foreach cb;
-   void *data;
+   void             *data;
 };
 
 static Eina_Bool
@@ -1957,7 +2074,7 @@ e_ofono_elements_for_each(Eina_Hash_Foreach cb, const void *user_data)
    EINA_SAFETY_ON_NULL_RETURN(cb);
 
    eina_hash_foreach
-     (elements, (Eina_Hash_Foreach) _e_ofono_elements_for_each, &data);
+      (elements, (Eina_Hash_Foreach)_e_ofono_elements_for_each, &data);
 }
 
 static Eina_Bool
@@ -1966,18 +2083,19 @@ _e_ofono_elements_get_allocate(unsigned int *count, E_Ofono_Element ***p_element
    *count = eina_hash_population(elements);
    if (*count == 0)
      {
-       *p_elements = NULL;
-       return 1;
+        *p_elements = NULL;
+        return 1;
      }
 
    *p_elements = malloc(*count * sizeof(E_Ofono_Element *));
    if (!*p_elements)
      {
-       ERR("could not allocate return array of %d elements: %s",
-           *count, strerror(errno));
-       *count = 0;
-       return 0;
+        ERR("could not allocate return array of %d elements: %s",
+            *count, strerror(errno));
+        *count = 0;
+        return 0;
      }
+
    return 1;
 }
 
@@ -2016,18 +2134,19 @@ e_ofono_elements_get_all(unsigned int *count, E_Ofono_Element ***p_elements)
    EINA_SAFETY_ON_NULL_RETURN_VAL(p_elements, 0);
 
    if (!_e_ofono_elements_get_allocate(count, p_elements))
-     return 0;
+      return 0;
+
    p = *p_elements;
    eina_hash_foreach
-     (elements, (Eina_Hash_Foreach) _e_ofono_elements_get_all, &p);
+      (elements, (Eina_Hash_Foreach)_e_ofono_elements_get_all, &p);
    return 1;
 }
 
 struct e_ofono_elements_get_all_str_data
 {
    E_Ofono_Element **elements;
-   int count;
-   const char *str;
+   int               count;
+   const char       *str;
 };
 
 static Eina_Bool
@@ -2037,7 +2156,7 @@ _e_ofono_elements_get_all_type(Eina_Hash *hash __UNUSED__, const char *key __UNU
    E_Ofono_Element *element = e;
 
    if ((data->str) && (element->interface != data->str))
-     return 1;
+      return 1;
 
    data->elements[data->count] = element;
    data->count++;
@@ -2071,14 +2190,14 @@ e_ofono_elements_get_all_type(const char *type, unsigned int *count, E_Ofono_Ele
    EINA_SAFETY_ON_NULL_RETURN_VAL(p_elements, 0);
 
    if (!_e_ofono_elements_get_allocate(count, p_elements))
-     return 0;
+      return 0;
 
    data.elements = *p_elements;
    data.count = 0;
    data.str = eina_stringshare_add(type);
    eina_hash_foreach(elements,
-                    (Eina_Hash_Foreach) _e_ofono_elements_get_all_type,
-                    &data);
+                     (Eina_Hash_Foreach)_e_ofono_elements_get_all_type,
+                     &data);
 
    eina_stringshare_del(data.str);
    *count = data.count;
@@ -2119,63 +2238,72 @@ _e_ofono_element_property_changed_callback(void *data, DBusMessage *msg)
    DBG("Property changed in element %s %s", element->path, element->interface);
 
    if (!_dbus_callback_check_and_init(msg, &itr, NULL))
-     return;
+      return;
 
    t = dbus_message_iter_get_arg_type(&itr);
    if (!_dbus_iter_type_check(t, DBUS_TYPE_STRING))
      {
-       ERR("missing name in property changed signal");
-       return;
+        ERR("missing name in property changed signal");
+        return;
      }
+
    dbus_message_iter_get_basic(&itr, &name);
 
    dbus_message_iter_next(&itr);
    t = dbus_message_iter_get_arg_type(&itr);
    if (!_dbus_iter_type_check(t, DBUS_TYPE_VARIANT))
      {
-       ERR("missing value in property changed signal");
-       return;
+        ERR("missing value in property changed signal");
+        return;
      }
+
    dbus_message_iter_recurse(&itr, &v_itr);
    t = dbus_message_iter_get_arg_type(&v_itr);
 
    if (t == DBUS_TYPE_ARRAY)
-     value = _e_ofono_element_iter_get_array(&v_itr, name);
+     {
+        value = _e_ofono_element_iter_get_array(&v_itr, name);
+     }
    else if (t != DBUS_TYPE_INVALID)
-     dbus_message_iter_get_basic(&v_itr, &value);
+     {
+        dbus_message_iter_get_basic(&v_itr, &value);
+     }
    else
      {
-       ERR("property has invalid type %s", name);
-       return;
+        ERR("property has invalid type %s", name);
+        return;
      }
 
    r = _e_ofono_element_property_value_add(element, name, t, value);
    if (r < 0)
-     ERR("failed to add property value %s (%c)", name, t);
+     {
+        ERR("failed to add property value %s (%c)", name, t);
+     }
    else if (r == 1)
      {
-       INF("property value changed %s (%c)", name, t);
-       changed = 1;
-       if ((strcmp(name, "Interfaces") == 0) && value)
-         {
-            char *interface;
-            Eina_Array_Iterator iterator;
-            unsigned int i;
-            E_Ofono_Element *e;
-
-            EINA_ARRAY_ITER_NEXT(((E_Ofono_Array*)value)->array, i,
-                                 interface, iterator)
-              {
-                 DBG("Found interface %s on %s", interface, element->path);
-                 e_ofono_element_register(element->path, interface);
-                 e = e_ofono_element_register(element->path, interface);
-                 if ((e) && (!e_ofono_element_properties_sync(e)))
-                   WRN("could not get properties of %s", e->path);
-              }
-         }
+        INF("property value changed %s (%c)", name, t);
+        changed = 1;
+        if ((strcmp(name, "Interfaces") == 0) && value)
+          {
+             char *interface;
+             Eina_Array_Iterator iterator;
+             unsigned int i;
+             E_Ofono_Element *e;
+
+             EINA_ARRAY_ITER_NEXT(((E_Ofono_Array *)value)->array, i,
+                                  interface, iterator)
+             {
+                DBG("Found interface %s on %s", interface, element->path);
+                e_ofono_element_register(element->path, interface);
+                e = e_ofono_element_register(element->path, interface);
+                if ((e) && (!e_ofono_element_properties_sync(e)))
+                   WRN("could not get properties of %s", e->path);
+             }
+          }
      }
+
    if (changed)
-     _e_ofono_element_listeners_call(element);
+      _e_ofono_element_listeners_call(element);
 }
 
 /**
@@ -2204,24 +2332,24 @@ e_ofono_element_register(const char *path, const char *interface)
    snprintf(key, MAX_KEY_SIZE, "%s:%s", path, interface);
    element = eina_hash_find(elements, key);
    if (element)
-     return element;
+      return element;
 
    element = e_ofono_element_new(path, interface);
    if (!element)
-     return NULL;
+      return NULL;
 
    if (!eina_hash_add(elements, key, element))
      {
-       ERR("could not add element %s to hash, delete it.", path);
-       e_ofono_element_free(element);
-       return NULL;
+        ERR("could not add element %s to hash, delete it.", path);
+        e_ofono_element_free(element);
+        return NULL;
      }
 
    element->signal_handler =
-     e_dbus_signal_handler_add
-     (e_ofono_conn, e_ofono_system_bus_name_get(),
-      element->path, element->interface, "PropertyChanged",
-      _e_ofono_element_property_changed_callback, element);
+      e_dbus_signal_handler_add
+         (e_ofono_conn, e_ofono_system_bus_name_get(),
+         element->path, element->interface, "PropertyChanged",
+         _e_ofono_element_property_changed_callback, element);
 
    e_ofono_element_event_add(E_OFONO_EVENT_ELEMENT_ADD, element);
 
@@ -2240,12 +2368,12 @@ _e_ofono_element_unregister_internal(E_Ofono_Element *element)
 {
    if (element->signal_handler)
      {
-       e_dbus_signal_handler_del(e_ofono_conn, element->signal_handler);
-       element->signal_handler = NULL;
+        e_dbus_signal_handler_del(e_ofono_conn, element->signal_handler);
+        element->signal_handler = NULL;
      }
 
    ecore_event_add(E_OFONO_EVENT_ELEMENT_DEL, element,
-                  _e_ofono_element_event_unregister_and_free, NULL);
+                   _e_ofono_element_event_unregister_and_free, NULL);
 }
 
 /**
@@ -2263,11 +2391,11 @@ e_ofono_element_unregister(E_Ofono_Element *element)
    char key[MAX_KEY_SIZE];
 
    if (!element)
-     return;
+      return;
 
    snprintf(key, MAX_KEY_SIZE, "%s:%s", element->path, element->interface);
    if (elements)
-     eina_hash_del_by_key(elements, key);
+      eina_hash_del_by_key(elements, key);
 }
 
 /**
@@ -2298,8 +2426,8 @@ e_ofono_elements_init(void)
 {
    EINA_SAFETY_ON_FALSE_RETURN(!elements);
    elements =
-     eina_hash_string_superfast_new
-     (EINA_FREE_CB(_e_ofono_element_unregister_internal));
+      eina_hash_string_superfast_new
+         (EINA_FREE_CB(_e_ofono_element_unregister_internal));
 }
 
 void
@@ -2336,3 +2464,4 @@ e_ofono_element_is_netreg(const E_Ofono_Element *element)
    EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
    return _e_ofono_element_is(element, e_ofono_iface_netreg);
 }
+
index a39d0fe..72ab598 100644 (file)
@@ -36,8 +36,10 @@ e_ofono_manager_modems_get(Eina_Array **array)
 
    element = e_ofono_element_get(manager_path, e_ofono_iface_manager);
    r = e_ofono_element_property_get_stringshared
-      (element, e_ofono_prop_modems, NULL, &a);
+         (element, e_ofono_prop_modems, NULL, &a);
    if (a)
-     *array = a->array;
+      *array = a->array;
+
    return r;
 }
+
index 196f4f0..5a55bb2 100644 (file)
@@ -19,7 +19,7 @@ e_ofono_modem_powered_get(const E_Ofono_Element *element, Eina_Bool *powered)
    EINA_SAFETY_ON_NULL_RETURN_VAL(powered, 0);
 
    return e_ofono_element_property_get_stringshared
-     (element, e_ofono_prop_powered, NULL, powered);
+             (element, e_ofono_prop_powered, NULL, powered);
 }
 
 /**
@@ -38,8 +38,8 @@ e_ofono_modem_powered_set(E_Ofono_Element *element, Eina_Bool powered, E_DBus_Me
    EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
 
    return e_ofono_element_property_set_full
-     (element, e_ofono_prop_powered, DBUS_TYPE_BOOLEAN,
-      &powered, cb, data);
+             (element, e_ofono_prop_powered, DBUS_TYPE_BOOLEAN,
+             &powered, cb, data);
 }
 
 /**
@@ -63,5 +63,6 @@ e_ofono_modem_name_get(const E_Ofono_Element *element, const char **name)
    EINA_SAFETY_ON_NULL_RETURN_VAL(name, 0);
 
    return e_ofono_element_property_get_stringshared
-     (element, e_ofono_prop_name, NULL, name);
+             (element, e_ofono_prop_name, NULL, name);
 }
+
index 3719173..d42e732 100644 (file)
@@ -21,7 +21,7 @@ e_ofono_netreg_mode_get(const E_Ofono_Element *element, const char **mode)
    EINA_SAFETY_ON_NULL_RETURN_VAL(mode, 0);
 
    return e_ofono_element_property_get_stringshared
-     (element, e_ofono_prop_mode, NULL, mode);
+             (element, e_ofono_prop_mode, NULL, mode);
 }
 
 /**
@@ -45,7 +45,7 @@ e_ofono_netreg_status_get(const E_Ofono_Element *element, const char **status)
    EINA_SAFETY_ON_NULL_RETURN_VAL(status, 0);
 
    return e_ofono_element_property_get_stringshared
-     (element, e_ofono_prop_status, NULL, status);
+             (element, e_ofono_prop_status, NULL, status);
 }
 
 /**
@@ -69,7 +69,7 @@ e_ofono_netreg_operator_get(const E_Ofono_Element *element, const char **op)
    EINA_SAFETY_ON_NULL_RETURN_VAL(op, 0);
 
    return e_ofono_element_property_get_stringshared
-     (element, e_ofono_prop_operator, NULL, op);
+             (element, e_ofono_prop_operator, NULL, op);
 }
 
 /**
@@ -89,5 +89,6 @@ e_ofono_netreg_strength_get(const E_Ofono_Element *element, uint8_t *strength)
    EINA_SAFETY_ON_NULL_RETURN_VAL(strength, 0);
 
    return e_ofono_element_property_get_stringshared
-     (element, e_ofono_prop_strength, NULL, strength);
+             (element, e_ofono_prop_strength, NULL, strength);
 }
+
index b1f4817..8decac8 100644 (file)
@@ -14,9 +14,9 @@
     #else
     # include <stddef.h>
     # ifdef  __cplusplus
-    extern "C"
+extern "C"
     # endif
-    void *alloca (size_t);
+void *    alloca (size_t);
     #endif
 
     #include <stdio.h>
 
     #include "E_Ofono.h"
 
-    static const char manager_path[] = "/";
-
-    extern const char *e_ofono_iface_manager;
-    extern const char *e_ofono_prop_modems;
-    extern const char *e_ofono_iface_modem;
-    extern const char *e_ofono_prop_name;
-    extern const char *e_ofono_prop_powered;
-    extern const char *e_ofono_prop_interfaces;
-    extern const char *e_ofono_iface_netreg;
-    extern const char *e_ofono_prop_mode;
-    extern const char *e_ofono_prop_status;
-    extern const char *e_ofono_prop_operator;
-    extern const char *e_ofono_prop_strength;
-    extern const char *e_ofono_iface_sms;
-    extern const char *e_ofono_prop_sca;
-    extern const char *e_ofono_method_send_sms;
-
-    extern int _e_dbus_ofono_log_dom;
+static const char manager_path[] = "/";
+
+extern const char *e_ofono_iface_manager;
+extern const char *e_ofono_prop_modems;
+extern const char *e_ofono_iface_modem;
+extern const char *e_ofono_prop_name;
+extern const char *e_ofono_prop_powered;
+extern const char *e_ofono_prop_interfaces;
+extern const char *e_ofono_iface_netreg;
+extern const char *e_ofono_prop_mode;
+extern const char *e_ofono_prop_status;
+extern const char *e_ofono_prop_operator;
+extern const char *e_ofono_prop_strength;
+extern const char *e_ofono_iface_sms;
+extern const char *e_ofono_prop_sca;
+extern const char *e_ofono_method_send_sms;
+
+extern int _e_dbus_ofono_log_dom;
 
     #ifndef EINA_LOG_DEFAULT_COLOR
     #define EINA_LOG_DEFAULT_COLOR EINA_COLOR_CYAN
     #undef WRN
     #undef ERR
 
-    #define DBG(...) EINA_LOG_DOM_DBG(_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__)
-    #define ERR(...) EINA_LOG_DOM_ERR(_e_dbus_ofono_log_dom , __VA_ARGS__)
+    #define DBG(...) EINA_LOG_DOM_DBG(_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__)
+    #define ERR(...) EINA_LOG_DOM_ERR(_e_dbus_ofono_log_dom, __VA_ARGS__)
 
-    typedef struct _E_Ofono_Array E_Ofono_Array;
+typedef struct _E_Ofono_Array   E_Ofono_Array;
 
-    struct _E_Ofono_Array
-    {
-       int type;
-       Eina_Array *array;
-    };
+struct _E_Ofono_Array
+{
+   int         type;
+   Eina_Array *array;
+};
 
-    static inline Eina_Bool
-    _dbus_callback_check_and_init(DBusMessage *msg, DBusMessageIter *itr, DBusError *err)
-    {
-       if (!msg)
-         {
+static inline Eina_Bool
+_dbus_callback_check_and_init(DBusMessage *msg, DBusMessageIter *itr, DBusError *err)
+{
+   if (!msg)
+     {
         if (err)
-          ERR("an error was reported by server: "
-                 "name=\"%s\", message=\"%s\"",
-                 err->name, err->message);
+           ERR("an error was reported by server: "
+               "name=\"%s\", message=\"%s\"",
+               err->name, err->message);
         else
-          ERR("callback without message arguments!");
+           ERR("callback without message arguments!");
 
         return 0;
-         }
+     }
 
-       if (!dbus_message_iter_init(msg, itr))
-         {
-          ERR("could not init iterator.");
+   if (!dbus_message_iter_init(msg, itr))
+     {
+        ERR("could not init iterator.");
         return 0;
-         }
+     }
 
-       return 1;
-    }
+   return 1;
+}
 
+static inline Eina_Bool
+__dbus_iter_type_check(int type, int expected, const char *expected_name)
+{
+   if (type == expected)
+      return 1;
 
-    static inline Eina_Bool
-    __dbus_iter_type_check(int type, int expected, const char *expected_name)
-    {
-       if (type == expected)
-         return 1;
+   ERR("expected type %s (%c) but got %c instead!",
+       expected_name, expected, type);
 
-       ERR("expected type %s (%c) but got %c instead!",
-           expected_name, expected, type);
+   return 0;
+}
 
-       return 0;
-    }
-    #define _dbus_iter_type_check(t, e) __dbus_iter_type_check(t, e, #e)
+    #define _dbus_iter_type_check(t, e) __dbus_iter_type_check(t, e, # e)
 
-    extern E_DBus_Connection *e_ofono_conn;
+extern E_DBus_Connection *e_ofono_conn;
 
-    const char *e_ofono_system_bus_name_get(void);
+const char *         e_ofono_system_bus_name_get(void);
 
-    void e_ofono_manager_clear_elements(void);
+void                 e_ofono_manager_clear_elements(void);
 
-    void e_ofono_elements_init(void);
-    void e_ofono_elements_shutdown(void);
+void                 e_ofono_elements_init(void);
+void                 e_ofono_elements_shutdown(void);
 
-    E_Ofono_Element *e_ofono_element_register(const char *path, const char *interface);
-    void e_ofono_element_unregister(E_Ofono_Element *element);
+E_Ofono_Element *    e_ofono_element_register(const char *path, const char *interface);
+void                 e_ofono_element_unregister(E_Ofono_Element *element);
 
-    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);
+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);
 
-    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_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_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_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_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_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);
index 38b8062..82c17f3 100644 (file)
@@ -17,7 +17,7 @@ e_ofono_sms_sca_get(const E_Ofono_Element *element, const char **sca)
    EINA_SAFETY_ON_NULL_RETURN_VAL(sca, 0);
 
    return e_ofono_element_property_get_stringshared
-      (element, e_ofono_prop_sca, NULL, sca);
+             (element, e_ofono_prop_sca, NULL, sca);
 }
 
 /**
@@ -37,7 +37,7 @@ e_ofono_sms_sca_set(E_Ofono_Element *element, const char *sca, E_DBus_Method_Ret
    EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
 
    return e_ofono_element_property_set_full
-      (element, e_ofono_prop_sca, DBUS_TYPE_STRING, sca, cb, data);
+             (element, e_ofono_prop_sca, DBUS_TYPE_STRING, sca, cb, data);
 }
 
 /**
@@ -63,15 +63,16 @@ e_ofono_sms_send_message(E_Ofono_Element *element, const char *number, const cha
    DBusMessageIter i;
 
    if (!(m = dbus_message_new_method_call(e_ofono_system_bus_name_get(),
-                                         element->path, element->interface,
-                                         e_ofono_method_send_sms)))
-     return EINA_FALSE;
+                                          element->path, element->interface,
+                                          e_ofono_method_send_sms)))
+      return EINA_FALSE;
 
    dbus_message_iter_init_append(m, &i);
    dbus_message_iter_append_basic(&i, DBUS_TYPE_STRING, &number);
    dbus_message_iter_append_basic(&i, DBUS_TYPE_STRING, &message);
 
    return e_ofono_element_message_send(element, e_ofono_method_send_sms,
-                                      e_ofono_iface_sms, NULL, m,
-                                      &element->_pending.send_sms, cb, data);
+                                       e_ofono_iface_sms, NULL, m,
+                                       &element->_pending.send_sms, cb, data);
 }
+