1 #ifndef _EFL_NET_CONNMAN_H_ 2 #define _EFL_NET_CONNMAN_H_ 1 3 4 #include "Ecore.h" 5 #include "ecore_con_private.h" 6 7 #include "Eldbus.h" 8 9 #define DEFAULT_TIMEOUT 10000.0 10 11 /** 12 * @file efl_net-connman.h 13 * 14 * Common infrastructure to create Efl_Net_Control_Manager and Efl_Net_Session 15 * based on ConnMan connection manager. 16 * 17 * @note Each connection manager that needs shared infra should create 18 * their own file! 19 * 20 * @internal 21 */ 22 23 /** 24 * Should be called from inside Efl.Object.constructor before using 25 * any of connman functions. 26 * 27 * @return #EINA_FALSE on errors, all other functions will be useless 28 * in this case. #EINA_TRUE on success. 29 * 30 * @internal 31 */ 32 Eina_Bool efl_net_connman_init(void); 33 34 /** 35 * Should be called from inside Efl.Object.destructor after done using 36 * all of connman functions. 37 * 38 * @internal 39 */ 40 void efl_net_connman_shutdown(void); 41 42 /** 43 * Returns the DBus connection shared by all objects. 44 * 45 * @internal 46 */ 47 Eldbus_Connection *efl_net_connman_connection_get(void); 48 49 /** 50 * Returns a singleton for ConnMan's Manager object and interface 51 * (proxy). 52 * 53 * @note call efl_net_connman_init() before using. There is no need to 54 * eldbus_proxy_ref() it, but if done should have a matching 55 * eldbus_proxy_unref(). After done, remember to 56 * efl_net_connman_shutdown(). 57 * 58 * @internal 59 */ 60 Eldbus_Proxy *efl_net_connman_manager_get(void); 61 62 /** 63 * Given a Efl.Net.Control find a technology instance given its name. 64 * 65 * @internal 66 */ 67 Efl_Net_Control_Technology *efl_net_connman_control_find_technology_by_type(Efl_Net_Control_Manager *ctl, const char *tech_type); 68 69 /** 70 * Ask Efl.Net.Control to reload access point list. 71 * 72 * @internal 73 */ 74 void efl_net_connman_control_access_points_reload(Efl_Net_Control_Manager *ctl); 75 76 77 /** 78 * Creates a new Efl.Net.Control.Technology child of an 79 * Efl.Net.Control with path and properties 80 * 81 * @internal 82 */ 83 Efl_Net_Control_Technology *efl_net_connman_technology_new(Efl_Net_Control_Manager *parent, const char *path, Eldbus_Message_Iter *properties); 84 85 /** 86 * Get the path of the given technology. 87 * 88 * @internal 89 */ 90 const char *efl_net_connman_technology_path_get(Efl_Net_Control_Technology *tech); 91 92 /** 93 * Convert connman's type string to enum value. 94 * 95 * @internal 96 */ 97 Efl_Net_Control_Technology_Type efl_net_connman_technology_type_from_str(const char *tech_type); 98 99 /** 100 * Creates a new Efl.Net.Control.Access_Point child of an 101 * Efl.Net.Control with path and properties 102 * 103 * @internal 104 */ 105 Efl_Net_Control_Access_Point *efl_net_connman_access_point_new(Efl_Net_Control_Manager *parent, const char *path, Eldbus_Message_Iter *properties, unsigned int priority); 106 107 /** 108 * Get the path of the given access_point. 109 * 110 * @internal 111 */ 112 const char *efl_net_connman_access_point_path_get(Efl_Net_Control_Access_Point *ap); 113 114 /** 115 * Updates Efl.Net.Control.Access_Point properties 116 * 117 * @internal 118 */ 119 void efl_net_connman_access_point_update(Efl_Net_Control_Manager *ap, Eldbus_Message_Iter *properties, unsigned int priority); 120 121 122 #endif /* _EFL_NET_CONNMAN_H_ */ 123