Efl.Net.Control (class)

Description

Controls network connectivity.

This class and its child objects are only useful to implement control of the network connectivity. If your application only needs to request access to the network, use @Efl.Net.Session instead.

Network connectivity is defined on top of technologies that provide access points. A technology can be "ethernet", "wifi", "bluetooth" or something else. Ethernet will provide a single access point, while "wifi" will expose zero or more access points that can come and go.

Users willing to use access points are expected to monitor "access_point,add" event to know when access points are added. To know when they were deleted, "access_point,del" or an Efl.Net.Control.Access_Point "del" event. Finally "access_points,changed" is relative to additions, deletions and reordering of access point due changes in their priorities.

The backend system is responsible for remembering connection details such as passphrase, last connected access point and priority. The user is NOT supposed to do that.

For ease of use Efl.Net.Control.state determines if at least one access point is online (verified connectivity), local (connected but unverified) or offline.

For safety reasons all radio transmissions may be disabled with Efl.Net.Control.radios_offline property. This is usually called "airplane mode" on some platforms.

Some platforms may not implement the backend for this class, in which case the system will report Efl.Net.Control.state as permanently "online" (Efl.Net.Control.State.online) and iterators for Efl.Net.Control.access_points and Efl.Net.Control.technologies will be empty (they will be returned but won't contain any items).

Since 1.19

Inheritance

Members

access_points (get)

The iterator of current access points.
Eina_Iterator *efl_net_control_access_points_get(const Eo *obj);


agent_enabled (get, set)

The agent is responsible for user interaction.
Eina_Bool efl_net_control_agent_enabled_get(const Eo *obj);
void efl_net_control_agent_enabled_set(Eo *obj, Eina_Bool agent_enabled);


agent_reply

If event "agent_request_input" was emitted, this will reply with the requested data
void efl_net_control_agent_reply(Eo *obj, const char *name, const Eina_Slice *ssid, const char *username, const char *passphrase, const char *wps);


constructor [Overridden from Efl.Object]

Call the object's constructor.
Efl_Object *efl_constructor(Eo *obj);


destructor [Overridden from Efl.Object]

Call the object's destructor.
void efl_destructor(Eo *obj);


finalize [Overridden from Efl.Object]

Called at the end of efl_add. Should not be called, just overridden.
Efl_Object *efl_finalize(Eo *obj);


radios_offline (get, set)

If true disable all network technologies that use radio transmission, such as bluetooth and wifi. If false, allows radio to be used.
Eina_Bool efl_net_control_radios_offline_get(const Eo *obj);
void efl_net_control_radios_offline_set(Eo *obj, Eina_Bool radios_offline);


state (get)

Summary of network connectivity.
Efl_Net_Control_State efl_net_control_state_get(const Eo *obj);


technologies (get)

The iterator of current technologies.
Eina_Iterator *efl_net_control_technologies_get(const Eo *obj);


Inherited

Efl.Loop.Consumer
loop (get) The loop to which this object belongs to.
parent (get, set) The parent of an object.
Efl.Object
allow_parent_unref (get, set) Allow an object to be deleted by unref even if it has a parent.
children_iterator_new Get an iterator on all childrens
comment (get, set) A human readable comment for the object
composite_attach Make an object a composite object of another.
composite_detach Detach a composite object from another object.
composite_part_is Check if an object is part of a composite object.
debug_name_override Build a read-only name for this object used for debugging.
del Unrefs the object and reparents it to NULL.
event_callback_forwarder_add Add an event callback forwarder for an event and an object.
event_callback_forwarder_del Remove an event callback forwarder for an event and an object.
event_callback_stop Stop the current callback call.
event_freeze Freeze events of object.
event_freeze_count (get) Return freeze events of object.
class event_global_freeze Freeze events of object.
class event_global_freeze_count (get) Return freeze events of object.
class event_global_thaw Thaw events of object.
event_thaw Thaw events of object.
finalized (get) True if the object is already finalized, otherwise false.
name (get, set) The name of the object.
name_find Find a child object with the given name and return it.
provider_find Searches upwards in the object tree for a provider which knows the given class/interface.

Events

access_point,add

The given access point has been added
EFL_NET_CONTROL_EVENT_ACCESS_POINT_ADD(Efl_Net_Control_Access_Point *)


access_point,del

The given access point will be deleted
EFL_NET_CONTROL_EVENT_ACCESS_POINT_DEL(Efl_Net_Control_Access_Point *)


access_points,changed

Access points were added, deleted or reordered.
EFL_NET_CONTROL_EVENT_ACCESS_POINTS_CHANGED(void)


agent_browser_url

Requires the user to visit a web page
EFL_NET_CONTROL_EVENT_AGENT_BROWSER_URL(Efl_Net_Control_Agent_Browser_Url)


agent_error

Requires the error to be reported to the user
EFL_NET_CONTROL_EVENT_AGENT_ERROR(Efl_Net_Control_Agent_Error)


agent_released

Notifies we're not the agent anymore
EFL_NET_CONTROL_EVENT_AGENT_RELEASED(void)


agent_request_input

Requires the user to enter information in order to proceed, such as hidden SSID, passphrase, etc. After the user enters the information, reply by calling Efl.Net.Control.agent_reply
EFL_NET_CONTROL_EVENT_AGENT_REQUEST_INPUT(Efl_Net_Control_Agent_Request_Input)


radios_offline,changed

EFL_NET_CONTROL_EVENT_RADIOS_OFFLINE_CHANGED(void)


state,changed

Property Efl.Net.Control.state changed
EFL_NET_CONTROL_EVENT_STATE_CHANGED(void)


technology,add

The given technology has been added
EFL_NET_CONTROL_EVENT_TECHNOLOGY_ADD(Efl_Net_Control_Technology *)


technology,del

The given technology will be deleted
EFL_NET_CONTROL_EVENT_TECHNOLOGY_DEL(Efl_Net_Control_Technology *)


Inherited

Efl.Object
callback,add A callback was added.
callback,del A callback was deleted.
del Object is being deleted.
destruct Object has been fully destroyed. It can not be used beyond this point. This event should only serve to clean up any dangling pointer.