const char *e_ofono_prop_name = NULL;
const char *e_ofono_prop_powered = NULL;
const char *e_ofono_prop_interfaces = NULL;
+const char *e_ofono_iface_network_reg = NULL;
+const char *e_ofono_prop_mode = NULL;
+const char *e_ofono_prop_status = NULL;
+const char *e_ofono_prop_operator = NULL;
+const char *e_ofono_prop_strength = NULL;
int _e_dbus_ofono_log_dom = -1;
e_ofono_prop_powered = eina_stringshare_add("Powered");
if (e_ofono_prop_interfaces == NULL)
e_ofono_prop_interfaces = eina_stringshare_add("Interfaces");
+ if (e_ofono_iface_network_reg == NULL)
+ e_ofono_iface_network_reg = eina_stringshare_add("org.ofono.NetworkRegistration");
+ if (e_ofono_prop_mode == NULL)
+ e_ofono_prop_mode = eina_stringshare_add("Mode");
+ if (e_ofono_prop_status == NULL)
+ e_ofono_prop_status = eina_stringshare_add("Status");
+ if (e_ofono_prop_operator == NULL)
+ e_ofono_prop_operator = eina_stringshare_add("Operator");
+ if (e_ofono_prop_strength == NULL)
+ e_ofono_prop_strength = eina_stringshare_add("Strength");
e_ofono_conn = edbus_conn;
cb_name_owner_changed = e_dbus_signal_handler_add
_stringshare_del(&e_ofono_prop_name);
_stringshare_del(&e_ofono_prop_powered);
_stringshare_del(&e_ofono_prop_interfaces);
+ _stringshare_del(&e_ofono_iface_network_reg);
+ _stringshare_del(&e_ofono_prop_mode);
+ _stringshare_del(&e_ofono_prop_status);
+ _stringshare_del(&e_ofono_prop_operator);
+ _stringshare_del(&e_ofono_prop_strength);
return 0;
}
--- /dev/null
+#include "e_ofono_private.h"
+
+/**
+ * Get property "Mode" value.
+ *
+ * If this property isn't found then 0 is returned.
+ * If zero is returned, then this call failed and parameter-returned
+ * values shall be considered invalid.
+ *
+ * @param mode where to store the property value, must be a pointer
+ * to string (const char **), it will not be allocated or
+ * copied and references will be valid until element changes,
+ * so copy it if you want to use it later.
+ *
+ * @return 1 on success, 0 otherwise.
+ */
+bool
+e_ofono_netreg_mode_get(E_Ofono_Element *element, const char **mode)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(mode, 0);
+
+ return e_ofono_element_property_get_stringshared
+ (element, e_ofono_prop_mode, NULL, mode);
+}
+
+/**
+ * Get property "Status" value.
+ *
+ * If this property isn't found then 0 is returned.
+ * If zero is returned, then this call failed and parameter-returned
+ * values shall be considered invalid.
+ *
+ * @param status where to store the property value, must be a pointer
+ * to string (const char **), it will not be allocated or
+ * copied and references will be valid until element changes,
+ * so copy it if you want to use it later.
+ *
+ * @return 1 on success, 0 otherwise.
+ */
+bool
+e_ofono_netreg_status_get(E_Ofono_Element *element, const char **status)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(status, 0);
+
+ return e_ofono_element_property_get_stringshared
+ (element, e_ofono_prop_status, NULL, status);
+}
+
+/**
+ * Get property "Operator" value.
+ *
+ * If this property isn't found then 0 is returned.
+ * If zero is returned, then this call failed and parameter-returned
+ * values shall be considered invalid.
+ *
+ * @param operator where to store the property value, must be a pointer
+ * to string (const char **), it will not be allocated or
+ * copied and references will be valid until element changes,
+ * so copy it if you want to use it later.
+ *
+ * @return 1 on success, 0 otherwise.
+ */
+bool
+e_ofono_netreg_operator_get(E_Ofono_Element *element, const char **op)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(op, 0);
+
+ return e_ofono_element_property_get_stringshared
+ (element, e_ofono_prop_operator, NULL, op);
+}
+
+/**
+ * Get property "Strength" value.
+ *
+ * @param strength where to store the property value, must be a pointer
+ * to char (char *), it will not be allocated or
+ * copied and references will be valid until element changes,
+ * so copy it if you want to use it later.
+ *
+ * @return 1 on success, 0 otherwise.
+ */
+bool
+e_ofono_netreg_strength_get(E_Ofono_Element *element, char *strength)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(element, 0);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(strength, 0);
+
+ return e_ofono_element_property_get_stringshared
+ (element, e_ofono_prop_strength, NULL, strength);
+}