aboutsummaryrefslogtreecommitdiffstats
path: root/pages/develop/api/efl/net/control.txt
blob: c5ee35b5141315d0498156b0bc7aa6c6f363dcdf (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
~~Title: Efl.Net.Control~~
====== Efl.Net.Control (class) ======

===== Description =====

%%Controls network connectivity.%%

%%This class and its children objects are only useful to implement control of the network connectivity. If your application is only interested in requesting access to the network, use the @Efl.Net.Session instead.%%

%%The 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 were added. To know when they were deleted, "access_point,del" or an %%[[:develop:api:efl:net:control:access_point|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 to remember connection details such as passphrase, last connected access point and priority. The user is NOT supposed to do that.%%

%%For ease of use, %%[[:develop:api:efl:net:control:property:state|Efl.Net.Control.state]]%% tells if at least one access point is online (verified connectivity), local (connected but unverified) or offline.%%

%%Due safety reasons all radio transmissions may be disabled with %%[[:develop:api:efl:net:control:property:radios_offline|Efl.Net.Control.radios_offline]]%% property. This is usually called "airplane mode" in some platforms.%%

%%Some platforms may not implement the backend for this class, in such cases the system will report always %%[[:develop:api:efl:net:control:property:state|Efl.Net.Control.state]]%% "online" (%%[[:develop:api:efl:net:control:state|Efl.Net.Control.State.online]]%%) and iterators for %%[[:develop:api:efl:net:control:property:access_points|Efl.Net.Control.access_points]]%% and %%[[:develop:api:efl:net:control:property:technologies|Efl.Net.Control.technologies]]%% will be empty (they will be returned but won't contain any item).%%

//Since 1.19//

{{page>:develop:api-include:efl:net:control:description&nouser&nolink&nodate}}

===== Inheritance =====

 => [[:develop:api:efl:loop_user|Efl.Loop_User]] //(class)// => [[:develop:api:efl:object|Efl.Object]] //(class)//
++++ Inheritance graph |

<graphviz>
digraph hierarchy {
    bgcolor = "transparent"
    size = "6"
    rankdir = "TB"

    node [shape = "box"]
    edge [color = "gray35"]

    efl_net_control [fillcolor = "black", label = "Efl.Net.Control", color = "gray15", fontcolor = "white", style = "filled"]
    efl_loop_user [fillcolor = "gray15", label = "Efl.Loop_User", color = "gray15", fontcolor = "white", style = "filled"]
    efl_object [fillcolor = "gray15", label = "Efl.Object", color = "gray15", fontcolor = "white", style = "filled"]

    efl_net_control -> efl_loop_user
    efl_loop_user -> efl_object
}
</graphviz>

++++

++++ Full hierarchy |

  * [[:develop:api:efl:loop_user|Efl.Loop_User]] //(class)//
    * [[:develop:api:efl:object|Efl.Object]] //(class)//


++++
===== Members =====

**[[:develop:api:efl:net:control:method:agent_reply|agent_reply]]**\\
> %%If event "agent_request_input" was emitted, this will reply with the requested data%%
<code c>
void efl_net_control_agent_reply(Eo *obj, const char *name, const Eina_Slice *ssid, const char *username, const char *passphrase, const char *wps);
</code>
\\
**[[:develop:api:efl:net:control:method:constructor|constructor]]**// [Overridden from [[:develop:api:efl:object|Efl.Object]]]//\\
> %%Call the object's constructor.%%
<code c>
Efl_Object *efl_constructor(Eo *obj);
</code>
\\
**[[:develop:api:efl:net:control:method:destructor|destructor]]**// [Overridden from [[:develop:api:efl:object|Efl.Object]]]//\\
> %%Call the object's destructor.%%
<code c>
void efl_destructor(Eo *obj);
</code>
\\
**[[:develop:api:efl:net:control:method:finalize|finalize]]**// [Overridden from [[:develop:api:efl:object|Efl.Object]]]//\\
> %%Called at the end of #eo_add. Should not be called, just overridden.%%
<code c>
Efl_Object *efl_finalize(Eo *obj);
</code>
\\
**[[:develop:api:efl:net:control:property:access_points|access_points]]** //**(get)**//\\
> %%The iterator of current access points.%%
<code c>
Eina_Iterator *efl_net_control_access_points_get(const Eo *obj);
</code>
\\
**[[:develop:api:efl:net:control:property:agent_enabled|agent_enabled]]** //**(get, set)**//\\
> %%The agent is responsible for user interaction.%%
<code c>
Eina_Bool efl_net_control_agent_enabled_get(const Eo *obj);
void efl_net_control_agent_enabled_set(Eo *obj, Eina_Bool agent_enabled);
</code>
\\
**[[:develop:api:efl:net:control:property:radios_offline|radios_offline]]** //**(get, set)**//\\
> %%If %%''true''%% disable all network technologies that use radio transmission, such as bluetooth and wifi. If %%''false''%%, allows radios to be used.%%
<code c>
Eina_Bool efl_net_control_radios_offline_get(const Eo *obj);
void efl_net_control_radios_offline_set(Eo *obj, Eina_Bool radios_offline);
</code>
\\
**[[:develop:api:efl:net:control:property:state|state]]** //**(get)**//\\
> %%Summary of network connectivity.%%
<code c>
Efl_Net_Control_State efl_net_control_state_get(const Eo *obj);
</code>
\\
**[[:develop:api:efl:net:control:property:technologies|technologies]]** //**(get)**//\\
> %%The iterator of current technologies.%%
<code c>
Eina_Iterator *efl_net_control_technologies_get(const Eo *obj);
</code>
\\

==== Inherited ====

[[:develop:api:efl:loop_user|Efl.Loop_User]]\\
> **[[:develop:api:efl:loop_user:property:loop|loop]]** //**(get)**//, **[[:develop:api:efl:loop_user:property:parent|parent]]** //**(get, set)**//\\
[[:develop:api:efl:object|Efl.Object]]\\
> **[[:develop:api:efl:object:method:children_iterator_new|children_iterator_new]]**, **[[:develop:api:efl:object:method:composite_attach|composite_attach]]**, **[[:develop:api:efl:object:method:composite_detach|composite_detach]]**, **[[:develop:api:efl:object:method:composite_part_is|composite_part_is]]**, **[[:develop:api:efl:object:method:debug_name_override|debug_name_override]]**, **[[:develop:api:efl:object:method:del|del]]**, **[[:develop:api:efl:object:method:event_callback_forwarder_add|event_callback_forwarder_add]]**, **[[:develop:api:efl:object:method:event_callback_forwarder_del|event_callback_forwarder_del]]**, **[[:develop:api:efl:object:method:event_callback_stop|event_callback_stop]]**, **[[:develop:api:efl:object:method:event_freeze|event_freeze]]**, **[[:develop:api:efl:object:method:event_global_freeze|event_global_freeze]]**, **[[:develop:api:efl:object:method:event_global_thaw|event_global_thaw]]**, **[[:develop:api:efl:object:method:event_thaw|event_thaw]]**, **[[:develop:api:efl:object:method:name_find|name_find]]**, **[[:develop:api:efl:object:method:provider_find|provider_find]]**, **[[:develop:api:efl:object:property:allow_parent_unref|allow_parent_unref]]** //**(get, set)**//, **[[:develop:api:efl:object:property:comment|comment]]** //**(get, set)**//, **[[:develop:api:efl:object:property:event_freeze_count|event_freeze_count]]** //**(get)**//, **[[:develop:api:efl:object:property:event_global_freeze_count|event_global_freeze_count]]** //**(get)**//, **[[:develop:api:efl:object:property:finalized|finalized]]** //**(get)**//, **[[:develop:api:efl:object:property:name|name]]** //**(get, set)**//
===== Events =====

**[[:develop:api:efl:net:control:event:access_point_add|access_point,add]]**\\
> %%The given access point was added%%
<code c>
EFL_NET_CONTROL_EVENT_ACCESS_POINT_ADD(Efl_Net_Control_Access_Point *)
</code>
\\ **[[:develop:api:efl:net:control:event:access_point_del|access_point,del]]**\\
> %%The given access point will be deleted%%
<code c>
EFL_NET_CONTROL_EVENT_ACCESS_POINT_DEL(Efl_Net_Control_Access_Point *)
</code>
\\ **[[:develop:api:efl:net:control:event:access_points_changed|access_points,changed]]**\\
> %%Access points were added, deleted or reordered.%%
<code c>
EFL_NET_CONTROL_EVENT_ACCESS_POINTS_CHANGED(void)
</code>
\\ **[[:develop:api:efl:net:control:event:agent_browser_url|agent_browser_url]]**\\
> %%Requires the user to visit a web page%%
<code c>
EFL_NET_CONTROL_EVENT_AGENT_BROWSER_URL(Efl_Net_Control_Agent_Browser_Url)
</code>
\\ **[[:develop:api:efl:net:control:event:agent_error|agent_error]]**\\
> %%Requires the error to be reported to the user%%
<code c>
EFL_NET_CONTROL_EVENT_AGENT_ERROR(Efl_Net_Control_Agent_Error)
</code>
\\ **[[:develop:api:efl:net:control:event:agent_released|agent_released]]**\\
> %%Notifies we're not the agent anymore%%
<code c>
EFL_NET_CONTROL_EVENT_AGENT_RELEASED(void)
</code>
\\ **[[:develop:api:efl:net:control:event:agent_request_input|agent_request_input]]**\\
> %%Requires the user to enter information in order to proceed, such as hidden SSID, passphrase, etc. After the user entered information, reply by calling %%[[:develop:api:efl:net:control:method:agent_reply|Efl.Net.Control.agent_reply]]%%%%
<code c>
EFL_NET_CONTROL_EVENT_AGENT_REQUEST_INPUT(Efl_Net_Control_Agent_Request_Input)
</code>
\\ **[[:develop:api:efl:net:control:event:radios_offline_changed|radios_offline,changed]]**\\
> %%Property %%[[:develop:api:efl:net:control:property:radios_offline|Efl.Net.Control.radios_offline]]%% changed%%
<code c>
EFL_NET_CONTROL_EVENT_RADIOS_OFFLINE_CHANGED(void)
</code>
\\ **[[:develop:api:efl:net:control:event:state_changed|state,changed]]**\\
> %%Property %%[[:develop:api:efl:net:control:property:state|Efl.Net.Control.state]]%% changed%%
<code c>
EFL_NET_CONTROL_EVENT_STATE_CHANGED(void)
</code>
\\ **[[:develop:api:efl:net:control:event:technology_add|technology,add]]**\\
> %%The given technology was added%%
<code c>
EFL_NET_CONTROL_EVENT_TECHNOLOGY_ADD(Efl_Net_Control_Technology *)
</code>
\\ **[[:develop:api:efl:net:control:event:technology_del|technology,del]]**\\
> %%The given technology will be deleted%%
<code c>
EFL_NET_CONTROL_EVENT_TECHNOLOGY_DEL(Efl_Net_Control_Technology *)
</code>
\\ ==== Inherited ====

[[:develop:api:efl:object|Efl.Object]]\\
> **[[:develop:api:efl:object:event:callback_add|callback,add]]**, **[[:develop:api:efl:object:event:callback_del|callback,del]]**, **[[:develop:api:efl:object:event:del|del]]**