1 #include "e_connman_private.h"
4 e_connman_service_get(const char *path)
6 E_Connman_Element *service;
8 EINA_SAFETY_ON_NULL_RETURN_VAL(path, NULL);
10 service = e_connman_element_get(path);
14 if (!e_connman_element_is_service(service))
16 WRN("path '%s' is not a service!", path);
24 * Connect this service.
26 * Connect this service. It will attempt to connect
27 * WiFi, WiMAX or Bluetooth services.
29 * For Ethernet devices this method can only be used
30 * if it has previously been disconnected. Otherwise
31 * the plugging of a cable will trigger connecting
32 * automatically. If no cable is plugged in this method
35 * @param service path to call method on server.
36 * @param cb function to call when server replies or some error happens.
37 * @param data data to give to cb when it is called.
39 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
42 e_connman_service_connect(E_Connman_Element *service, E_DBus_Method_Return_Cb cb, const void *data)
44 const char name[] = "Connect";
46 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
47 return e_connman_element_call_full
48 (service, name, NULL, &service->_pending.service_connect, cb, data);
52 * Disconnect this service.
54 * Disconnect this service. If the service is not
55 * connected an error message will be generated.
57 * On Ethernet devices this will disconnect the IP
58 * details from the service. It will not magically
59 * unplug the cable. When no cable is plugged in this
62 * This method can also be used to abort a previous
63 * connectiong attempt via the Connect method.
65 * @param service path to call method on server.
66 * @param cb function to call when server replies or some error happens.
67 * @param data data to give to cb when it is called.
69 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
72 e_connman_service_disconnect(E_Connman_Element *service, E_DBus_Method_Return_Cb cb, const void *data)
74 const char name[] = "Disconnect";
76 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
77 return e_connman_element_call_full
78 (service, name, NULL, &service->_pending.service_disconnect, cb, data);
82 * Remove this service.
84 * A successfully connected service with Favorite=true
85 * can be removed this way. If it is connected, it will
86 * be automatically disconnected first.
88 * If the service requires a passphrase it will be
89 * cleared and forgotten when removing.
91 * This is similar to setting the Favorite property
92 * to false, but that is currently not supported.
94 * In the case a connection attempt failed and the
95 * service is in the State=failure, this method can
96 * also be used to reset the service.
98 * Calling this method on Ethernet devices will cause
99 * an error message. It is not possible to remove these
102 * @param service path to call method on server.
103 * @param cb function to call when server replies or some error happens.
104 * @param data data to give to cb when it is called.
106 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
109 e_connman_service_remove(E_Connman_Element *service, E_DBus_Method_Return_Cb cb, const void *data)
111 const char name[] = "Remove";
113 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
114 return e_connman_element_call_full
115 (service, name, NULL, &service->_pending.service_remove, cb, data);
119 * Clears the value of the specified property.
122 * @param service path to call method on server.
123 * @param property to be cleared.
124 * @param cb function to call when server replies or some error happens.
125 * @param data data to give to cb when it is called.
127 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
130 e_connman_service_clear_property(E_Connman_Element *service, const char *property, E_DBus_Method_Return_Cb cb, const void *data)
132 const char name[] = "ClearProperty";
134 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
135 EINA_SAFETY_ON_NULL_RETURN_VAL(property, EINA_FALSE);
136 return e_connman_element_call_with_string
137 (service, name, property, NULL, &service->_pending.service_clear_property,
142 * Move service before in favorites list.
144 * Call method MoveBefore(object service) at the given service on server.
146 * If a service has been used before, this allows a
147 * reorder of the favorite services.
149 * The target service object must be part of this
150 * profile. Moving between profiles is not supported.
152 * @param service path to call method on server.
153 * @param object_path object service.
154 * @param cb function to call when server replies or some error happens.
155 * @param data data to give to cb when it is called.
157 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
160 e_connman_service_move_before(E_Connman_Element *service, const char *object_path, E_DBus_Method_Return_Cb cb, const void *data)
162 const char name[] = "MoveBefore";
164 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
165 EINA_SAFETY_ON_NULL_RETURN_VAL(object_path, EINA_FALSE);
166 return e_connman_element_call_with_path
167 (service, name, object_path, NULL,
168 &service->_pending.service_move_before, cb, data);
172 * Move service after in favorites list.
174 * Call method MoveAfter(object service) at the given service on server.
176 * If a service has been used before, this allows a
177 * reorder of the favorite services.
179 * The target service object must be part of this
180 * profile. Moving between profiles is not supported.
182 * @param service path to call method on server.
183 * @param cb function to call when server replies or some error happens.
184 * @param data data to give to cb when it is called.
186 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
189 e_connman_service_move_after(E_Connman_Element *service, const char *object_path, E_DBus_Method_Return_Cb cb, const void *data)
191 const char name[] = "MoveAfter";
193 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
194 EINA_SAFETY_ON_NULL_RETURN_VAL(object_path, EINA_FALSE);
195 return e_connman_element_call_with_path
196 (service, name, object_path, NULL,
197 &service->_pending.service_move_after, cb, data);
201 * Get property "State" value.
203 * If this property isn't found then @c EINA_FALSE is returned.
204 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
205 * values shall be considered invalid.
207 * The service state information.
209 * Valid states are "idle", "failure", "association",
210 * "configuration", "ready", "login" and "online".
212 * @param service path to get property.
213 * @param state where to store the property value, must be a pointer
214 * to string (const char **), it will not be allocated or
215 * copied and references will be valid until element changes,
216 * so copy it if you want to use it later.
218 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
221 e_connman_service_state_get(const E_Connman_Element *service, const char **state)
223 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
224 EINA_SAFETY_ON_NULL_RETURN_VAL(state, EINA_FALSE);
225 return e_connman_element_property_get_stringshared
226 (service, e_connman_prop_state, NULL, state);
230 * Get property "Error" value.
232 * If this property isn't found then @c EINA_FALSE is returned.
233 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
234 * values shall be considered invalid.
236 * The service error status details.
238 * When error occur during connection or disconnection
239 * the detailed information are represented in this
240 * property to help the user interface to present the
241 * user with alternate options.
243 * This property is only valid when the service is in
244 * the "failure" state. Otherwise it might be empty or
245 * not present at all.
247 * Current defined error code is "dhcp-failed".
249 * @param service path to get property.
250 * @param error where to store the property value, must be a pointer
251 * to string (const char **), it will not be allocated or
252 * copied and references will be valid until element changes,
253 * so copy it if you want to use it later.
255 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
258 e_connman_service_error_get(const E_Connman_Element *service, const char **error)
260 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
261 EINA_SAFETY_ON_NULL_RETURN_VAL(error, EINA_FALSE);
262 return e_connman_element_property_get_stringshared
263 (service, e_connman_prop_error, NULL, error);
267 * Get property "Name" value.
269 * If this property isn't found then @c EINA_FALSE is returned.
270 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
271 * values shall be considered invalid.
273 * The service name (for example "Wireless" etc.)
275 * This name can be used for directly displaying it in
276 * the application. It has pure informational purpose.
278 * For Ethernet devices and hidden WiFi networks it is
279 * not guaranteed that this property is present.
281 * @param service path to get property.
282 * @param name where to store the property value, must be a pointer
283 * to string (const char **), it will not be allocated or
284 * copied and references will be valid until element changes,
285 * so copy it if you want to use it later.
287 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
290 e_connman_service_name_get(const E_Connman_Element *service, const char **name)
292 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
293 EINA_SAFETY_ON_NULL_RETURN_VAL(name, EINA_FALSE);
294 return e_connman_element_property_get_stringshared
295 (service, e_connman_prop_name, NULL, name);
299 * Get property "Type" value.
301 * If this property isn't found then @c EINA_FALSE is returned.
302 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
303 * values shall be considered invalid.
305 * The service type (for example "ethernet", "wifi" etc.)
307 * This information should only be used to determine
308 * advanced properties or showing the correct icon
311 * @param service path to get property.
312 * @param type where to store the property value, must be a pointer
313 * to string (const char **), it will not be allocated or
314 * copied and references will be valid until element changes,
315 * so copy it if you want to use it later.
317 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
320 e_connman_service_type_get(const E_Connman_Element *service, const char **type)
322 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
323 EINA_SAFETY_ON_NULL_RETURN_VAL(type, EINA_FALSE);
324 return e_connman_element_property_get_stringshared
325 (service, e_connman_prop_type, NULL, type);
329 * Get property "Security" value.
331 * If this property isn't found then @c EINA_FALSE is returned.
332 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
333 * values shall be considered invalid.
335 * If the service type is WiFi, then this property is
336 * present and contains the list of security method or key
337 * management setting.
339 * Possible values are "none", "wep", "wpa", "rsn", "psk", "ieee8021x" and "wps"
341 * This property might be only present for WiFi
344 * @param service path to get property.
345 * @param security where to store the property value, must be a pointer
346 * to E_Connman_Array, it will not be allocated or
347 * copied and references will be valid until element changes,
348 * so copy it if you want to use it later.
350 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
353 e_connman_service_security_get(const E_Connman_Element *service, const E_Connman_Array **security)
355 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
356 EINA_SAFETY_ON_NULL_RETURN_VAL(security, EINA_FALSE);
357 return e_connman_element_property_get_stringshared
358 (service, e_connman_prop_security, NULL, security);
362 * Get property "Passphrase" value.
364 * If this property isn't found then @c EINA_FALSE is returned.
365 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
366 * values shall be considered invalid.
368 * If the service type is WiFi, then this property
369 * can be used to store a passphrase.
371 * No PropertyChanged signals will be send for this
372 * property. The PassphraseRequired property should
373 * be monitored instead.
375 * This property might also not always be included
376 * since it is protected by a different security policy.
378 * @param service path to get property.
379 * @param passphrase where to store the property value, must be a pointer
380 * to string (const char **), it will not be allocated or
381 * copied and references will be valid until element changes,
382 * so copy it if you want to use it later.
384 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
385 * @see e_connman_service_passphrase_set()
388 e_connman_service_passphrase_get(const E_Connman_Element *service, const char **passphrase)
390 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
391 EINA_SAFETY_ON_NULL_RETURN_VAL(passphrase, EINA_FALSE);
392 return e_connman_element_property_get_stringshared
393 (service, e_connman_prop_passphrase, NULL, passphrase);
397 * Set property "Passphrase" value.
399 * If this property isn't found then @c EINA_FALSE is returned.
400 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
401 * values shall be considered invalid.
403 * If the service type is WiFi, then this property
404 * can be used to store a passphrase.
406 * No PropertyChanged signals will be send for this
407 * property. The PassphraseRequired property should
408 * be monitored instead.
410 * This property might also not always be included
411 * since it is protected by a different security policy.
413 * @param service path to get property.
414 * @param passphrase value to set.
415 * @param cb function to call when server replies or some error happens.
416 * @param data data to give to cb when it is called.
418 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
419 * @see e_connman_service_passphrase_get()
422 e_connman_service_passphrase_set(E_Connman_Element *service, const char *passphrase, E_DBus_Method_Return_Cb cb, const void *data)
424 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
425 return e_connman_element_property_set_full
426 (service, e_connman_prop_passphrase, DBUS_TYPE_STRING,
427 passphrase, cb, data);
431 * Get property "PassphraseRequired" value.
433 * If this property isn't found then @c EINA_FALSE is returned.
434 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
435 * values shall be considered invalid.
437 * If the service type is WiFi, then this property
438 * indicates if a passphrase is required.
440 * If a passphrase has been set already or if no
441 * passphrase is needed, then this property will
444 * @param service path to get property.
445 * @param passphrase_required where to store the property value, must be a
446 * pointer to Eina_Bool (Eina_Bool *).
448 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
451 e_connman_service_passphrase_required_get(const E_Connman_Element *service, Eina_Bool *passphrase_required)
453 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
454 EINA_SAFETY_ON_NULL_RETURN_VAL(passphrase_required, EINA_FALSE);
455 return e_connman_element_property_get_stringshared
456 (service, e_connman_prop_passphrase_required, NULL, passphrase_required);
460 * Get property "LoginRequired" value.
462 * If this property isn't found then @c EINA_FALSE is returned.
463 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
464 * values shall be considered invalid.
466 * Indicates that a manual configuration must be done to login the
467 * user, likely access an website using a browser.
469 * If a login has been set already or if no
470 * login is needed, then this property will
473 * @param service path to get property.
474 * @param login_required where to store the property value, must be a
475 * pointer to Eina_Bool (Eina_Bool *).
477 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
482 e_connman_service_login_required_get(const E_Connman_Element *service, Eina_Bool *login_required)
484 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
485 EINA_SAFETY_ON_NULL_RETURN_VAL(login_required, EINA_FALSE);
486 return e_connman_element_property_get_stringshared
487 (service, e_connman_prop_login_required, NULL, login_required);
491 * Get property "Strength" value.
493 * If this property isn't found then @c EINA_FALSE is returned.
494 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
495 * values shall be considered invalid.
497 * Indicates the signal strength of the service. This
498 * is a normalized value between 0 and 100.
500 * This property will not be present for Ethernet
503 * @param service path to get property.
504 * @param strength where to store the property value, must be a pointer
505 * to byte (unsigned char*).
507 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
510 e_connman_service_strength_get(const E_Connman_Element *service, unsigned char *strength)
512 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
513 EINA_SAFETY_ON_NULL_RETURN_VAL(strength, EINA_FALSE);
514 return e_connman_element_property_get_stringshared
515 (service, e_connman_prop_strength, NULL, strength);
519 * Get property "Favorite" value.
521 * If this property isn't found then @c EINA_FALSE is returned.
522 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
523 * values shall be considered invalid.
525 * Will be true if a cable is plugged in or the user
526 * selected and successfully connected to this service.
528 * This value is automatically changed and to revert
529 * it back to false the Remove() method needs to be
532 * @param service path to get property.
533 * @param favorite where to store the property value, must be a
534 * pointer to Eina_Bool (Eina_Bool *).
536 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
539 e_connman_service_favorite_get(const E_Connman_Element *service, Eina_Bool *favorite)
541 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
542 EINA_SAFETY_ON_NULL_RETURN_VAL(favorite, EINA_FALSE);
543 return e_connman_element_property_get_stringshared
544 (service, e_connman_prop_favorite, NULL, favorite);
548 * Get property "Immutable" value.
550 * This value will be set to true if the service is configured
551 * externally via a configuration file.
553 * The only valid operation are e_connman_service_connect() and
554 * e_connman_service_disconnect(). The e_connman_service_remove()
555 * method will result in an error.
557 * @param service path to get property.
558 * @param immutable where to store the property value, must be a
559 * pointer to Eina_Bool (Eina_Bool *).
561 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
564 e_connman_service_immutable_get(const E_Connman_Element *service, Eina_Bool *immutable)
566 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
567 EINA_SAFETY_ON_NULL_RETURN_VAL(immutable, EINA_FALSE);
568 return e_connman_element_property_get_stringshared
569 (service, e_connman_prop_immutable, NULL, immutable);
573 * Get property "AutoConnect" value.
575 * If this property isn't found then @c EINA_FALSE is returned.
576 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
577 * values shall be considered invalid.
579 * If set to true, this service will auto-connect
580 * when not other connection is available.
582 * For favorite services it is possible to change
583 * this value to prevent or permit automatic
584 * connection attempts.
586 * @param service path to get property.
587 * @param auto_connect where to store the property value, must be a
588 * pointer to Eina_Bool (Eina_Bool *).
590 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
591 * @see e_connman_service_auto_connect_set()
594 e_connman_service_auto_connect_get(const E_Connman_Element *service, Eina_Bool *auto_connect)
596 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
597 EINA_SAFETY_ON_NULL_RETURN_VAL(auto_connect, EINA_FALSE);
598 return e_connman_element_property_get_stringshared
599 (service, e_connman_prop_auto_connect, NULL, auto_connect);
603 * Set property "AutoConnect" value.
605 * If this property isn't found then @c EINA_FALSE is returned.
606 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
607 * values shall be considered invalid.
609 * If set to true, this service will auto-connect
610 * when not other connection is available.
612 * For favorite services it is possible to change
613 * this value to prevent or permit automatic
614 * connection attempts.
616 * @param service path to get property.
617 * @param service_favorite where to store the property value, must be a
618 * pointer to Eina_Bool (Eina_Bool *).
620 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
621 * @see e_connman_service_auto_connect_get()
624 e_connman_service_auto_connect_set(E_Connman_Element *service, Eina_Bool auto_connect, E_DBus_Method_Return_Cb cb, const void *data)
626 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
627 return e_connman_element_property_set_full
628 (service, e_connman_prop_auto_connect, DBUS_TYPE_BOOLEAN, &auto_connect, cb, data);
632 * Get property "Roaming" value.
634 * If this property isn't found then @c EINA_FALSE is returned.
635 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
636 * values shall be considered invalid.
638 * This property indicates if this service is roaming.
640 * In the case of Cellular services this normally
641 * indicates connections to a foreign provider when
644 * @param service path to get property.
645 * @param roaming where to store the property value, must be a
646 * pointer to Eina_Bool (Eina_Bool *).
648 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
651 e_connman_service_roaming_get(const E_Connman_Element *service, Eina_Bool *roaming)
653 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
654 EINA_SAFETY_ON_NULL_RETURN_VAL(roaming, EINA_FALSE);
655 return e_connman_element_property_get_stringshared
656 (service, e_connman_prop_roaming, NULL, roaming);
660 * Get property "Nameservers" value.
662 * If this property isn't found then @c EINA_FALSE is returned.
663 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
664 * values shall be considered invalid.
665 * The list of currently active nameservers for this service. If the server is
666 * not in READY or ONLINE state than this list will be empty.
668 * Global nameservers are automatically added to this list.
670 * The array represents a sorted list of the current nameservers. The first one
671 * has the highest priority and is used by default.
673 * When using DHCP this array represents the nameservers provided by the
674 * network. In case of manual settings, the ones from Nameservers.Configuration
677 * @param service path to get property.
678 * @param count return the number of elements in array.
679 * @param nameservers array with pointers to internal strings. These
680 * strings are not copied in any way, and they are granted to
681 * be eina_stringshare instances, so one can use
682 * eina_stringshare_ref() if he wants to save memory and cpu to
683 * get an extra reference. The array itself is allocated using
684 * malloc() and should be freed after usage is done. This
685 * pointer is just set if return is @c EINA_TRUE.
687 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
690 e_connman_service_nameservers_get(const E_Connman_Element *service, unsigned int *count, const char ***nameservers)
692 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
693 EINA_SAFETY_ON_NULL_RETURN_VAL(nameservers, EINA_FALSE);
694 EINA_SAFETY_ON_NULL_RETURN_VAL(count, EINA_FALSE);
695 return e_connman_element_strings_array_get_stringshared
696 (service, e_connman_prop_nameservers, count, nameservers);
700 * Get property "Nameservers.Configuration" value.
702 * If this property isn't found then @c EINA_FALSE is returned.
703 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
704 * values shall be considered invalid.
705 * The list of currently active nameservers for this service. If the server is
706 * not in READY or ONLINE state than this list will be empty.
708 * Unlike Nameservers, this is the user-set value, rather than the
711 * @param service path to get property.
712 * @param count return the number of elements in array.
713 * @param nameservers array with pointers to internal strings. These
714 * strings are not copied in any way, and they are granted to
715 * be eina_stringshare instances, so one can use
716 * eina_stringshare_ref() if he wants to save memory and cpu to
717 * get an extra reference. The array itself is allocated using
718 * malloc() and should be freed after usage is done. This
719 * pointer is just set if return is @c EINA_TRUE.
721 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
724 e_connman_service_nameservers_configuration_get(const E_Connman_Element *service, unsigned int *count, const char ***nameservers)
726 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
727 EINA_SAFETY_ON_NULL_RETURN_VAL(nameservers, EINA_FALSE);
728 EINA_SAFETY_ON_NULL_RETURN_VAL(count, EINA_FALSE);
729 return e_connman_element_strings_array_get_stringshared
730 (service, e_connman_prop_nameservers_configuration, count, nameservers);
734 * Set property "Nameservers.Configuration" value.
736 * If this property isn't found then @c EINA_FALSE is returned.
737 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
738 * values shall be considered invalid.
740 * Unlike Nameservers, this is the user-set value, rather than the actual value.
741 * It allows user to override the default setting. When using manual
742 * configuration and no global nameservers are configured, then it is useful to
743 * configure this setting as well.
745 * This list is sorted by priority and the first entry represents the nameserver
746 * with the highest priority.
748 * Changes to the domain name servers can be done at any time. It will not cause
749 * a disconnect of the service. However there might be small window where name
750 * resolution might fail.
752 * @param service path to set property.
753 * @param nameservers sorted list of the current nameservers. The first one has
754 * the highest priority and is used by default.
755 * @param cb function to call when server replies or some error happens.
756 * @param data data to give to cb when it is called.
758 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
759 * @see e_connman_service_nameservers_configuration_get()
762 e_connman_service_nameservers_configuration_set(E_Connman_Element *service, Eina_List *nameservers, E_DBus_Method_Return_Cb cb, const void *data)
764 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
765 EINA_SAFETY_ON_NULL_RETURN_VAL(nameservers, EINA_FALSE);
766 return e_connman_element_property_array_set_full
767 (service, e_connman_prop_nameservers_configuration,
768 DBUS_TYPE_STRING, nameservers, cb, data);
772 * Get property "Domains" value.
774 * If this property isn't found then @c EINA_FALSE is returned.
775 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
776 * values shall be considered invalid.
777 * The list of currently active domains for this service. If the server is
778 * not in READY or ONLINE state than this list will be empty.
780 * The list of currently used search domains.
782 * @param service path to get property.
783 * @param count return the number of elements in array.
784 * @param domains array with pointers to internal strings. These
785 * strings are not copied in any way, and they are granted to
786 * be eina_stringshare instances, so one can use
787 * eina_stringshare_ref() if he wants to save memory and cpu to
788 * get an extra reference. The array itself is allocated using
789 * malloc() and should be freed after usage is done. This
790 * pointer is just set if return is @c EINA_TRUE.
792 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
795 e_connman_service_domains_get(const E_Connman_Element *service, unsigned int *count, const char ***domains)
797 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
798 EINA_SAFETY_ON_NULL_RETURN_VAL(domains, EINA_FALSE);
799 EINA_SAFETY_ON_NULL_RETURN_VAL(count, EINA_FALSE);
800 return e_connman_element_strings_array_get_stringshared
801 (service, e_connman_prop_domains, count, domains);
804 * Get property "IPv4.Method" value.
806 * If this property isn't found then @c EINA_FALSE is returned.
807 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
808 * values shall be considered invalid.
810 * The IPv4 method in use. Possible values here are "dhcp" and
813 * @param service path to get property.
814 * @param method where to store the property value, must be a pointer
815 * to string (const char **), it will not be allocated or
816 * copied and references will be valid until element changes,
817 * so copy it if you want to use it later.
819 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
822 e_connman_service_ipv4_method_get(const E_Connman_Element *service, const char **method)
824 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
825 EINA_SAFETY_ON_NULL_RETURN_VAL(method, EINA_FALSE);
826 return e_connman_element_property_dict_get_stringshared
827 (service, e_connman_prop_ipv4, e_connman_prop_method, NULL, method);
831 * Get property "IPv4.Address" value.
833 * If this property isn't found then @c EINA_FALSE is returned.
834 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
835 * values shall be considered invalid.
837 * The current IPv4 address.
839 * @param service path to get property.
840 * @param address where to store the property value, must be a pointer
841 * to string (const char **), it will not be allocated or
842 * copied and references will be valid until element changes,
843 * so copy it if you want to use it later.
845 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
848 e_connman_service_ipv4_address_get(const E_Connman_Element *service, const char **address)
850 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
851 EINA_SAFETY_ON_NULL_RETURN_VAL(address, EINA_FALSE);
852 return e_connman_element_property_dict_get_stringshared
853 (service, e_connman_prop_ipv4, e_connman_prop_address, NULL, address);
857 * Get property "IPv4.Gateway" value.
859 * If this property isn't found then @c EINA_FALSE is returned.
860 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
861 * values shall be considered invalid.
863 * The current IPv4 gateway.
865 * @param service path to get property.
866 * @param gateway where to store the property value, must be a pointer
867 * to string (const char **), it will not be allocated or
868 * copied and references will be valid until element changes,
869 * so copy it if you want to use it later.
871 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
874 e_connman_service_ipv4_gateway_get(const E_Connman_Element *service, const char **gateway)
876 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
877 EINA_SAFETY_ON_NULL_RETURN_VAL(gateway, EINA_FALSE);
878 return e_connman_element_property_dict_get_stringshared
879 (service, e_connman_prop_ipv4, e_connman_prop_gateway, NULL, gateway);
883 * Get property "IPv4.Netmask" value.
885 * If this property isn't found then @c EINA_FALSE is returned.
886 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
887 * values shall be considered invalid.
889 * The current IPv4 netmask.
891 * @param service path to get property.
892 * @param netmask where to store the property value, must be a pointer
893 * to string (const char **), it will not be allocated or
894 * copied and references will be valid until element changes,
895 * so copy it if you want to use it later.
897 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
900 e_connman_service_ipv4_netmask_get(const E_Connman_Element *service, const char **netmask)
902 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
903 EINA_SAFETY_ON_NULL_RETURN_VAL(netmask, EINA_FALSE);
904 return e_connman_element_property_dict_get_stringshared
905 (service, e_connman_prop_ipv4, e_connman_prop_netmask, NULL, netmask);
909 * Get property "IPv4.Configuration.Method" value.
911 * Unlike IPv4.Method, this is the user-set value, rather than the
914 * If this property isn't found then @c EINA_FALSE is returned.
915 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
916 * values shall be considered invalid.
918 * The IPv4 configured method. Possible values here are "dhcp" and
921 * @param service path to get property.
922 * @param method where to store the property value, must be a pointer
923 * to string (const char **), it will not be allocated or
924 * copied and references will be valid until element changes,
925 * so copy it if you want to use it later.
927 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
930 e_connman_service_ipv4_configuration_method_get(const E_Connman_Element *service, const char **method)
932 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
933 EINA_SAFETY_ON_NULL_RETURN_VAL(method, EINA_FALSE);
934 return e_connman_element_property_dict_get_stringshared
935 (service, e_connman_prop_ipv4_configuration, e_connman_prop_method,
940 * Get property "IPv4.Configuration.Address" value.
942 * Unlike IPv4.Address, this is the user-set value, rather than the
945 * If this property isn't found then @c EINA_FALSE is returned.
946 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
947 * values shall be considered invalid.
949 * The current configured IPv4 address.
951 * @param service path to get property.
952 * @param address where to store the property value, must be a pointer
953 * to string (const char **), it will not be allocated or
954 * copied and references will be valid until element changes,
955 * so copy it if you want to use it later.
957 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
960 e_connman_service_ipv4_configuration_address_get(const E_Connman_Element *service, const char **address)
962 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
963 EINA_SAFETY_ON_NULL_RETURN_VAL(address, EINA_FALSE);
964 return e_connman_element_property_dict_get_stringshared
965 (service, e_connman_prop_ipv4_configuration, e_connman_prop_address,
970 * Get property "IPv4.Configuration.Gateway" value.
972 * Unlike IPv4.Gateway, this is the user-set value, rather than the
975 * If this property isn't found then @c EINA_FALSE is returned.
976 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
977 * values shall be considered invalid.
979 * The current configured IPv4 gateway.
981 * @param service path to get property.
982 * @param gateway where to store the property value, must be a pointer
983 * to string (const char **), it will not be allocated or
984 * copied and references will be valid until element changes,
985 * so copy it if you want to use it later.
987 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
990 e_connman_service_ipv4_configuration_gateway_get(const E_Connman_Element *service, const char **gateway)
992 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
993 EINA_SAFETY_ON_NULL_RETURN_VAL(gateway, EINA_FALSE);
994 return e_connman_element_property_dict_get_stringshared
995 (service, e_connman_prop_ipv4_configuration, e_connman_prop_gateway,
1000 * Get property "IPv4.Configuration.Netmask" value.
1002 * Unlike IPv4.Netmask, this is the user-set value, rather than the
1005 * If this property isn't found then @c EINA_FALSE is returned.
1006 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
1007 * values shall be considered invalid.
1009 * The current configured IPv4 netmask.
1011 * @param service path to get property.
1012 * @param netmask where to store the property value, must be a pointer
1013 * to string (const char **), it will not be allocated or
1014 * copied and references will be valid until element changes,
1015 * so copy it if you want to use it later.
1017 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
1020 e_connman_service_ipv4_configuration_netmask_get(const E_Connman_Element *service, const char **netmask)
1022 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
1023 EINA_SAFETY_ON_NULL_RETURN_VAL(netmask, EINA_FALSE);
1024 return e_connman_element_property_dict_get_stringshared
1025 (service, e_connman_prop_ipv4_configuration, e_connman_prop_netmask,
1030 * Set IPv4 to connect automatically using DHCP.
1032 * @param service path to set.
1033 * @param cb function to call when server replies or some error happens.
1034 * @param data data to give to cb when it is called.
1036 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
1039 e_connman_service_ipv4_configure_dhcp(E_Connman_Element *service, E_DBus_Method_Return_Cb cb, const void *data)
1041 const char method[] = "dhcp";
1042 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
1043 return e_connman_element_property_dict_set_full
1044 (service, e_connman_prop_ipv4_configuration, e_connman_prop_method,
1045 DBUS_TYPE_STRING, method, cb, data);
1049 * Set IPv4 to connect using manually set parameters.
1051 * @param service path to set.
1052 * @param address IPv4 address.
1053 * @param netmask IPv4 netmask, or @c NULL for "/32".
1054 * @param gateway IPv4 gateway address.
1055 * @param cb function to call when server replies or some error happens.
1056 * @param data data to give to cb when it is called.
1058 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
1061 e_connman_service_ipv4_configure_manual(E_Connman_Element *service, const char *address, const char *netmask, const char *gateway, E_DBus_Method_Return_Cb cb, const void *data)
1063 const char name[] = "SetProperty";
1064 const char *method = "manual"; /* not method[] as gcc screws it with dbus */
1066 DBusMessageIter itr, variant, dict, entry;
1068 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
1069 EINA_SAFETY_ON_NULL_RETURN_VAL(address, EINA_FALSE);
1071 msg = dbus_message_new_method_call
1072 (e_connman_system_bus_name_get(), service->path, service->interface, name);
1077 dbus_message_iter_init_append(msg, &itr);
1078 dbus_message_iter_append_basic
1079 (&itr, DBUS_TYPE_STRING, &e_connman_prop_ipv4_configuration);
1081 dbus_message_iter_open_container
1082 (&itr, DBUS_TYPE_VARIANT,
1083 (DBUS_TYPE_ARRAY_AS_STRING
1084 DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING
1085 DBUS_TYPE_STRING_AS_STRING
1086 DBUS_TYPE_STRING_AS_STRING
1087 DBUS_DICT_ENTRY_END_CHAR_AS_STRING),
1089 dbus_message_iter_open_container
1090 (&variant, DBUS_TYPE_ARRAY,
1091 (DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING
1092 DBUS_TYPE_STRING_AS_STRING
1093 DBUS_TYPE_STRING_AS_STRING
1094 DBUS_DICT_ENTRY_END_CHAR_AS_STRING),
1097 dbus_message_iter_open_container(&dict, DBUS_TYPE_DICT_ENTRY, NULL, &entry);
1098 dbus_message_iter_append_basic
1099 (&entry, DBUS_TYPE_STRING, &e_connman_prop_method);
1100 dbus_message_iter_append_basic(&entry, DBUS_TYPE_STRING, &method);
1101 dbus_message_iter_close_container(&dict, &entry);
1103 dbus_message_iter_open_container(&dict, DBUS_TYPE_DICT_ENTRY, NULL, &entry);
1104 dbus_message_iter_append_basic
1105 (&entry, DBUS_TYPE_STRING, &e_connman_prop_address);
1106 dbus_message_iter_append_basic(&entry, DBUS_TYPE_STRING, &address);
1107 dbus_message_iter_close_container(&dict, &entry);
1111 dbus_message_iter_open_container
1112 (&dict, DBUS_TYPE_DICT_ENTRY, NULL, &entry);
1113 dbus_message_iter_append_basic
1114 (&entry, DBUS_TYPE_STRING, &e_connman_prop_netmask);
1115 dbus_message_iter_append_basic(&entry, DBUS_TYPE_STRING, &netmask);
1116 dbus_message_iter_close_container(&dict, &entry);
1121 dbus_message_iter_open_container
1122 (&dict, DBUS_TYPE_DICT_ENTRY, NULL, &entry);
1123 dbus_message_iter_append_basic
1124 (&entry, DBUS_TYPE_STRING, &e_connman_prop_gateway);
1125 dbus_message_iter_append_basic(&entry, DBUS_TYPE_STRING, &gateway);
1126 dbus_message_iter_close_container(&dict, &entry);
1129 dbus_message_iter_close_container(&variant, &dict);
1130 dbus_message_iter_close_container(&itr, &variant);
1132 return e_connman_element_message_send
1133 (service, name, NULL, msg, &service->_pending.property_set, cb, data);
1137 * Get property "Proxy.Method" value.
1139 * If this property isn't found then @c EINA_FALSE is returned.
1140 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
1141 * values shall be considered invalid.
1143 * Possible values are "direct", "auto" and "manual".
1145 * @param service path to get property.
1146 * @param method where to store the property value, must be a pointer
1147 * to string (const char **), it will not be allocated or
1148 * copied and references will be valid until element changes,
1149 * so copy it if you want to use it later.
1151 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
1154 e_connman_service_proxy_method_get(const E_Connman_Element *service, const char **method)
1156 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
1157 EINA_SAFETY_ON_NULL_RETURN_VAL(method, EINA_FALSE);
1158 return e_connman_element_property_dict_get_stringshared
1159 (service, e_connman_prop_proxy, e_connman_prop_method, NULL, method);
1163 * Get property "Proxy.URL" value.
1165 * If this property isn't found then @c EINA_FALSE is returned.
1166 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
1167 * values shall be considered invalid.
1169 * Automatic proxy configuration URL. Used by "auto" method.
1171 * @param service path to get property.
1172 * @param url where to store the property value, must be a pointer
1173 * to string (const char **), it will not be allocated or
1174 * copied and references will be valid until element changes,
1175 * so copy it if you want to use it later.
1177 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
1180 e_connman_service_proxy_url_get(const E_Connman_Element *service, const char **url)
1182 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
1183 EINA_SAFETY_ON_NULL_RETURN_VAL(url, EINA_FALSE);
1184 return e_connman_element_property_dict_get_stringshared
1185 (service, e_connman_prop_proxy, e_connman_prop_url, NULL, url);
1189 * Get property "Proxy.Servers" value.
1191 * If this property isn't found then @c EINA_FALSE is returned.
1192 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
1193 * values shall be considered invalid.
1195 * List of proxy URIs. The URI without a protocol will be interpreted as the
1196 * generic proxy URI. All others will target a specific protocol and only once.
1197 * Example of generic proxy server entry would be like this:
1198 * "server.example.com:911".
1200 * Used when "manual" method is set.
1202 * @param service path to get property.
1203 * @param count return the number of elements in array.
1204 * @param servers array with pointers to internal strings. These
1205 * strings are not copied in any way, and they are granted to
1206 * be eina_stringshare instances, so one can use
1207 * eina_stringshare_ref() if he wants to save memory and cpu to
1208 * get an extra reference. The array itself is allocated using
1209 * malloc() and should be freed after usage is done. This
1210 * pointer is just set if return is @c EINA_TRUE.
1212 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
1215 e_connman_service_proxy_servers_get(const E_Connman_Element *service, unsigned int *count, const char ***servers)
1217 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
1218 EINA_SAFETY_ON_NULL_RETURN_VAL(servers, EINA_FALSE);
1219 EINA_SAFETY_ON_NULL_RETURN_VAL(count, EINA_FALSE);
1220 return e_connman_element_property_dict_strings_array_get_stringshared
1221 (service, e_connman_prop_proxy, e_connman_prop_servers, count, servers);
1225 * Get property "Proxy.Excludes" value.
1227 * If this property isn't found then @c EINA_FALSE is returned.
1228 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
1229 * values shall be considered invalid.
1231 * List of hosts which can be accessed directly.
1233 * Used when "manual" method is set.
1235 * @param service path to get property.
1236 * @param count return the number of elements in array.
1237 * @param excludes array with pointers to internal strings. These
1238 * strings are not copied in any way, and they are granted to
1239 * be eina_stringshare instances, so one can use
1240 * eina_stringshare_ref() if he wants to save memory and cpu to
1241 * get an extra reference. The array itself is allocated using
1242 * malloc() and should be freed after usage is done. This
1243 * pointer is just set if return is @c EINA_TRUE.
1245 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
1248 e_connman_service_proxy_excludes_get(const E_Connman_Element *service, unsigned int *count, const char ***excludes)
1250 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
1251 EINA_SAFETY_ON_NULL_RETURN_VAL(excludes, EINA_FALSE);
1252 EINA_SAFETY_ON_NULL_RETURN_VAL(count, EINA_FALSE);
1253 return e_connman_element_property_dict_strings_array_get_stringshared
1254 (service, e_connman_prop_proxy, e_connman_prop_excludes, count, excludes);
1258 * Get property "Proxy.Configuration.Method" value.
1260 * Unlike Proxy.Configuration.Method, this is the user-set value, rather than
1263 * If this property isn't found then @c EINA_FALSE is returned.
1264 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
1265 * values shall be considered invalid.
1267 * Possible values are "direct", "auto" and "manual".
1269 * @param service path to get property.
1270 * @param method where to store the property value, must be a pointer
1271 * to string (const char **), it will not be allocated or
1272 * copied and references will be valid until element changes,
1273 * so copy it if you want to use it later.
1275 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
1278 e_connman_service_proxy_configuration_method_get(const E_Connman_Element *service, const char **method)
1280 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
1281 EINA_SAFETY_ON_NULL_RETURN_VAL(method, EINA_FALSE);
1282 return e_connman_element_property_dict_get_stringshared
1283 (service, e_connman_prop_proxy_configuration, e_connman_prop_method, NULL, method);
1287 * Get property "Proxy.Configuration.URL" value.
1289 * Unlike Proxy.URL, this is the user-set value, rather than the
1292 * If this property isn't found then @c EINA_FALSE is returned.
1293 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
1294 * values shall be considered invalid.
1296 * Automatic proxy configuration URL. Used by "auto" method.
1298 * @param service path to get property.
1299 * @param url where to store the property value, must be a pointer
1300 * to string (const char **), it will not be allocated or
1301 * copied and references will be valid until element changes,
1302 * so copy it if you want to use it later.
1304 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
1307 e_connman_service_proxy_configuration_url_get(const E_Connman_Element *service, const char **url)
1309 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
1310 EINA_SAFETY_ON_NULL_RETURN_VAL(url, EINA_FALSE);
1311 return e_connman_element_property_dict_get_stringshared
1312 (service, e_connman_prop_proxy_configuration, e_connman_prop_url, NULL, url);
1316 * Get property "Proxy.Configuration.Servers" value.
1318 * Unlike Proxy.Servers, this is the user-set value, rather than the
1321 * If this property isn't found then @c EINA_FALSE is returned.
1322 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
1323 * values shall be considered invalid.
1325 * List of proxy URIs. The URI without a protocol will be interpreted as the
1326 * generic proxy URI. All others will target a specific protocol and only once.
1327 * Example of generic proxy server entry would be like this:
1328 * "server.example.com:911".
1330 * Used when "manual" method is set.
1332 * @param service path to get property.
1333 * @param count return the number of elements in array.
1334 * @param servers array with pointers to internal strings. These
1335 * strings are not copied in any way, and they are granted to
1336 * be eina_stringshare instances, so one can use
1337 * eina_stringshare_ref() if he wants to save memory and cpu to
1338 * get an extra reference. The array itself is allocated using
1339 * malloc() and should be freed after usage is done. This
1340 * pointer is just set if return is @c EINA_TRUE.
1342 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
1345 e_connman_service_proxy_configuration_servers_get(const E_Connman_Element *service, unsigned int *count, const char ***servers)
1347 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
1348 EINA_SAFETY_ON_NULL_RETURN_VAL(servers, EINA_FALSE);
1349 EINA_SAFETY_ON_NULL_RETURN_VAL(count, EINA_FALSE);
1350 return e_connman_element_property_dict_strings_array_get_stringshared
1351 (service, e_connman_prop_proxy_configuration, e_connman_prop_servers, count, servers);
1355 * Get property "Proxy.Configuration.Excludes" value.
1357 * Unlike Proxy.Excludes, this is the user-set value, rather than the
1360 * If this property isn't found then @c EINA_FALSE is returned.
1361 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
1362 * values shall be considered invalid.
1364 * List of hosts which can be accessed directly.
1366 * Used when "manual" method is set.
1368 * @param service path to get property.
1369 * @param count return the number of elements in array.
1370 * @param excludes array with pointers to internal strings. These
1371 * strings are not copied in any way, and they are granted to
1372 * be eina_stringshare instances, so one can use
1373 * eina_stringshare_ref() if he wants to save memory and cpu to
1374 * get an extra reference. The array itself is allocated using
1375 * malloc() and should be freed after usage is done. This
1376 * pointer is just set if return is @c EINA_TRUE.
1378 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
1381 e_connman_service_proxy_configuration_excludes_get(const E_Connman_Element *service, unsigned int *count, const char ***excludes)
1383 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
1384 EINA_SAFETY_ON_NULL_RETURN_VAL(excludes, EINA_FALSE);
1385 EINA_SAFETY_ON_NULL_RETURN_VAL(count, EINA_FALSE);
1386 return e_connman_element_property_dict_strings_array_get_stringshared
1387 (service, e_connman_prop_proxy_configuration, e_connman_prop_excludes, count, excludes);
1391 * Get property "Ethernet.Interface" value.
1393 * If this property isn't found then @c EINA_FALSE is returned.
1394 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
1395 * values shall be considered invalid.
1397 * Interface name (for example eth0).
1399 * @param service path to get property.
1400 * @param iface where to store the property value, must be a pointer
1401 * to string (const char **), it will not be allocated or
1402 * copied and references will be valid until element changes,
1403 * so copy it if you want to use it later.
1405 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
1408 e_connman_service_ethernet_interface_get(const E_Connman_Element *service, const char **iface)
1410 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
1411 EINA_SAFETY_ON_NULL_RETURN_VAL(iface, EINA_FALSE);
1412 return e_connman_element_property_dict_get_stringshared
1413 (service, e_connman_prop_ethernet, e_connman_prop_interface, NULL, iface);
1417 * Get property "Ethernet.Method" value.
1419 * If this property isn't found then @c EINA_FALSE is returned.
1420 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
1421 * values shall be considered invalid.
1423 * The Ethernet configuration method. Possible values here "auto" and "manual".
1425 * @param service path to get property.
1426 * @param method where to store the property value, must be a pointer
1427 * to string (const char **), it will not be allocated or
1428 * copied and references will be valid until element changes,
1429 * so copy it if you want to use it later.
1431 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
1434 e_connman_service_ethernet_method_get(const E_Connman_Element *service, const char **method)
1436 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
1437 EINA_SAFETY_ON_NULL_RETURN_VAL(method, EINA_FALSE);
1438 return e_connman_element_property_dict_get_stringshared
1439 (service, e_connman_prop_ethernet, e_connman_prop_method, NULL, method);
1443 * Get property "Ethernet.Speed" value.
1445 * If this property isn't found then @c EINA_FALSE is returned.
1446 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
1447 * values shall be considered invalid.
1449 * Selected speed of the line. This information might not always be available.
1451 * @param service path to get property.
1452 * @param speed where to store the property value.
1454 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
1457 e_connman_service_ethernet_speed_get(const E_Connman_Element *service, unsigned short *speed)
1459 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
1460 EINA_SAFETY_ON_NULL_RETURN_VAL(speed, EINA_FALSE);
1461 return e_connman_element_property_dict_get_stringshared
1462 (service, e_connman_prop_ethernet, e_connman_prop_speed, NULL, speed);
1466 * Get property "Ethernet.Address" value.
1468 * If this property isn't found then @c EINA_FALSE is returned.
1469 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
1470 * values shall be considered invalid.
1472 * The current configured Ethernet address (mac-address).
1474 * @param service path to get property.
1475 * @param address where to store the property value, must be a pointer
1476 * to string (const char **), it will not be allocated or
1477 * copied and references will be valid until element changes,
1478 * so copy it if you want to use it later.
1480 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
1483 e_connman_service_ethernet_address_get(const E_Connman_Element *service, const char **address)
1485 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
1486 EINA_SAFETY_ON_NULL_RETURN_VAL(address, EINA_FALSE);
1487 return e_connman_element_property_dict_get_stringshared
1488 (service, e_connman_prop_ethernet, e_connman_prop_address, NULL, address);
1492 * Get property "Ethernet.Duplex" value.
1494 * If this property isn't found then @c EINA_FALSE is returned.
1495 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
1496 * values shall be considered invalid.
1498 * Selected duplex settings of the line. Possible values are "half" and "full".
1499 * This information might not always be available.
1501 * @param service path to get property.
1502 * @param duplex where to store the property value, must be a pointer
1503 * to string (const char **), it will not be allocated or
1504 * copied and references will be valid until element changes,
1505 * so copy it if you want to use it later.
1507 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
1510 e_connman_service_ethernet_duplex_get(const E_Connman_Element *service, const char **duplex)
1512 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
1513 EINA_SAFETY_ON_NULL_RETURN_VAL(duplex, EINA_FALSE);
1514 return e_connman_element_property_dict_get_stringshared
1515 (service, e_connman_prop_ethernet, e_connman_prop_duplex, NULL, duplex);
1519 * Get property "Ethernet.MTU" value.
1521 * If this property isn't found then @c EINA_FALSE is returned.
1522 * If @c EINA_FALSE is returned, then this call failed and parameter-returned
1523 * values shall be considered invalid.
1525 * The current configured Ethernet MTU.
1527 * @param service path to get property.
1528 * @param gateway where to store the property value, must be a pointer
1529 * to string (const char **), it will not be allocated or
1530 * copied and references will be valid until element changes,
1531 * so copy it if you want to use it later.
1533 * @return @c EINA_TRUE on success, @c EINA_FALSE otherwise.
1536 e_connman_service_ethernet_mtu_get(const E_Connman_Element *service, unsigned short *mtu)
1538 EINA_SAFETY_ON_NULL_RETURN_VAL(service, EINA_FALSE);
1539 EINA_SAFETY_ON_NULL_RETURN_VAL(mtu, EINA_FALSE);
1540 return e_connman_element_property_dict_get_stringshared
1541 (service, e_connman_prop_ethernet, e_connman_prop_mtu, NULL, mtu);