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 1 on success, 0 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, 0);
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 1 on success, 0 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, 0);
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 1 on success, 0 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, 0);
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 1 on success, 0 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, 0);
135 EINA_SAFETY_ON_NULL_RETURN_VAL(property, 0);
141 * Move service before in favorites list.
143 * Call method MoveBefore(object service) at the given service on server.
145 * If a service has been used before, this allows a
146 * reorder of the favorite services.
148 * The target service object must be part of this
149 * profile. Moving between profiles is not supported.
151 * @param service_path to call method on server.
152 * @param object_path object service.
153 * @param cb function to call when server replies or some error happens.
154 * @param data data to give to cb when it is called.
156 * @return 1 on success, 0 otherwise.
159 e_connman_service_move_before(E_Connman_Element *service, const char *object_path, E_DBus_Method_Return_Cb cb, const void *data)
161 const char name[] = "MoveBefore";
163 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
164 EINA_SAFETY_ON_NULL_RETURN_VAL(object_path, 0);
165 return e_connman_element_call_with_path
166 (service, name, object_path, NULL,
167 &service->_pending.service_move_before, cb, data);
171 * Move service after in favorites list.
173 * Call method MoveAfter(object service) at the given service on server.
175 * If a service has been used before, this allows a
176 * reorder of the favorite services.
178 * The target service object must be part of this
179 * profile. Moving between profiles is not supported.
181 * @param service_path to call method on server.
182 * @param cb function to call when server replies or some error happens.
183 * @param data data to give to cb when it is called.
185 * @return 1 on success, 0 otherwise.
188 e_connman_service_move_after(E_Connman_Element *service, const char *object_path, E_DBus_Method_Return_Cb cb, const void *data)
190 const char name[] = "MoveAfter";
192 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
193 EINA_SAFETY_ON_NULL_RETURN_VAL(object_path, 0);
194 return e_connman_element_call_with_path
195 (service, name, object_path, NULL,
196 &service->_pending.service_move_after, cb, data);
200 * Get property "State" value.
202 * If this property isn't found then 0 is returned.
203 * If zero is returned, then this call failed and parameter-returned
204 * values shall be considered invalid.
206 * The service state information.
208 * Valid states are "idle", "failure", "association",
209 * "configuration" and "ready".
211 * @param service_path to get property.
212 * @param state where to store the property value, must be a pointer
213 * to string (const char **), it will not be allocated or
214 * copied and references will be valid until element changes,
215 * so copy it if you want to use it later.
217 * @return 1 on success, 0 otherwise.
220 e_connman_service_state_get(const E_Connman_Element *service, const char **state)
222 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
223 EINA_SAFETY_ON_NULL_RETURN_VAL(state, 0);
224 return e_connman_element_property_get_stringshared
225 (service, e_connman_prop_state, NULL, state);
229 * Get property "Error" value.
231 * If this property isn't found then 0 is returned.
232 * If zero is returned, then this call failed and parameter-returned
233 * values shall be considered invalid.
235 * The service error status details.
237 * When error occur during connection or disconnection
238 * the detailed information are represented in this
239 * property to help the user interface to present the
240 * user with alternate options.
242 * This property is only valid when the service is in
243 * the "failure" state. Otherwise it might be empty or
244 * not present at all.
246 * Current defined error code is "dhcp-failed".
248 * @param service_path to get property.
249 * @param error where to store the property value, must be a pointer
250 * to string (const char **), it will not be allocated or
251 * copied and references will be valid until element changes,
252 * so copy it if you want to use it later.
254 * @return 1 on success, 0 otherwise.
257 e_connman_service_error_get(const E_Connman_Element *service, const char **error)
259 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
260 EINA_SAFETY_ON_NULL_RETURN_VAL(error, 0);
261 return e_connman_element_property_get_stringshared
262 (service, e_connman_prop_error, NULL, error);
266 * Get property "Name" value.
268 * If this property isn't found then 0 is returned.
269 * If zero is returned, then this call failed and parameter-returned
270 * values shall be considered invalid.
272 * The service name (for example "Wireless" etc.)
274 * This name can be used for directly displaying it in
275 * the application. It has pure informational purpose.
277 * For Ethernet devices and hidden WiFi networks it is
278 * not guaranteed that this property is present.
280 * @param service_path to get property.
281 * @param name where to store the property value, must be a pointer
282 * to string (const char **), it will not be allocated or
283 * copied and references will be valid until element changes,
284 * so copy it if you want to use it later.
286 * @return 1 on success, 0 otherwise.
289 e_connman_service_name_get(const E_Connman_Element *service, const char **name)
291 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
292 EINA_SAFETY_ON_NULL_RETURN_VAL(name, 0);
293 return e_connman_element_property_get_stringshared
294 (service, e_connman_prop_name, NULL, name);
298 * Get property "Type" value.
300 * If this property isn't found then 0 is returned.
301 * If zero is returned, then this call failed and parameter-returned
302 * values shall be considered invalid.
304 * The service type (for example "ethernet", "wifi" etc.)
306 * This information should only be used to determine
307 * advanced properties or showing the correct icon
310 * @param service_path to get property.
311 * @param type where to store the property value, must be a pointer
312 * to string (const char **), it will not be allocated or
313 * copied and references will be valid until element changes,
314 * so copy it if you want to use it later.
316 * @return 1 on success, 0 otherwise.
319 e_connman_service_type_get(const E_Connman_Element *service, const char **type)
321 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
322 EINA_SAFETY_ON_NULL_RETURN_VAL(type, 0);
323 return e_connman_element_property_get_stringshared
324 (service, e_connman_prop_type, NULL, type);
328 * Get property "Mode" value.
330 * If this property isn't found then 0 is returned.
331 * If zero is returned, then this call failed and parameter-returned
332 * values shall be considered invalid.
334 * If the service type is WiFi or Cellular, then this
335 * property is present and contains the mode of the
338 * For WiFi services the possible values are "managed"
339 * and "adhoc". For Cellular services it describes the
340 * network technology. Possible values are "gprs", "edge"
343 * This property might be only present for WiFi and
346 * @param service_path to get property.
347 * @param mode where to store the property value, must be a pointer
348 * to string (const char **), it will not be allocated or
349 * copied and references will be valid until element changes,
350 * so copy it if you want to use it later.
352 * @return 1 on success, 0 otherwise.
355 e_connman_service_mode_get(const E_Connman_Element *service, const char **mode)
357 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
358 EINA_SAFETY_ON_NULL_RETURN_VAL(mode, 0);
359 return e_connman_element_property_get_stringshared
360 (service, e_connman_prop_mode, NULL, mode);
364 * Get property "Security" value.
366 * If this property isn't found then 0 is returned.
367 * If zero is returned, then this call failed and parameter-returned
368 * values shall be considered invalid.
370 * If the service type is WiFi, then this property is
371 * present and contains the security method or key
372 * management setting.
374 * Possible values are "none", "wep", "wpa" and "rsn".
376 * This property might be only present for WiFi
379 * @param service_path to get property.
380 * @param security where to store the property value, must be a pointer
381 * to string (const char **), it will not be allocated or
382 * copied and references will be valid until element changes,
383 * so copy it if you want to use it later.
385 * @return 1 on success, 0 otherwise.
388 e_connman_service_security_get(const E_Connman_Element *service, const char **security)
390 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
391 EINA_SAFETY_ON_NULL_RETURN_VAL(security, 0);
392 return e_connman_element_property_get_stringshared
393 (service, e_connman_prop_security, NULL, security);
397 * Get property "Passphrase" value.
399 * If this property isn't found then 0 is returned.
400 * If zero 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 where to store the property value, must be a pointer
415 * to string (const char **), it will not be allocated or
416 * copied and references will be valid until element changes,
417 * so copy it if you want to use it later.
419 * @return 1 on success, 0 otherwise.
420 * @see e_connman_service_passphrase_set()
423 e_connman_service_passphrase_get(const E_Connman_Element *service, const char **passphrase)
425 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
426 EINA_SAFETY_ON_NULL_RETURN_VAL(passphrase, 0);
427 return e_connman_element_property_get_stringshared
428 (service, e_connman_prop_passphrase, NULL, passphrase);
432 * Set property "Passphrase" value.
434 * If this property isn't found then 0 is returned.
435 * If zero is returned, then this call failed and parameter-returned
436 * values shall be considered invalid.
438 * If the service type is WiFi, then this property
439 * can be used to store a passphrase.
441 * No PropertyChanged signals will be send for this
442 * property. The PassphraseRequired property should
443 * be monitored instead.
445 * This property might also not always be included
446 * since it is protected by a different security policy.
448 * @param service_path to get property.
449 * @param passphrase value to set.
450 * @param cb function to call when server replies or some error happens.
451 * @param data data to give to cb when it is called.
453 * @return 1 on success, 0 otherwise.
454 * @see e_connman_service_passphrase_get()
457 e_connman_service_passphrase_set(E_Connman_Element *service, const char *passphrase, E_DBus_Method_Return_Cb cb, const void *data)
459 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
460 return e_connman_element_property_set_full
461 (service, e_connman_prop_passphrase, DBUS_TYPE_STRING,
462 passphrase, cb, data);
466 * Get property "PassphraseRequired" value.
468 * If this property isn't found then 0 is returned.
469 * If zero is returned, then this call failed and parameter-returned
470 * values shall be considered invalid.
472 * If the service type is WiFi, then this property
473 * indicates if a passphrase is required.
475 * If a passphrase has been set already or if no
476 * passphrase is needed, then this property will
479 * @param service_path to get property.
480 * @param passphrase_required where to store the property value, must be a
481 * pointer to boolean (bool *).
483 * @return 1 on success, 0 otherwise.
486 e_connman_service_passphrase_required_get(const E_Connman_Element *service, bool *passphrase_required)
488 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
489 EINA_SAFETY_ON_NULL_RETURN_VAL(passphrase_required, 0);
490 return e_connman_element_property_get_stringshared
491 (service, e_connman_prop_passphrase_required, NULL, passphrase_required);
495 * Get property "Strength" value.
497 * If this property isn't found then 0 is returned.
498 * If zero is returned, then this call failed and parameter-returned
499 * values shall be considered invalid.
501 * Indicates the signal strength of the service. This
502 * is a normalized value between 0 and 100.
504 * This property will not be present for Ethernet
507 * @param service_path to get property.
508 * @param strength where to store the property value, must be a pointer
509 * to byte (unsigned char*).
511 * @return 1 on success, 0 otherwise.
514 e_connman_service_strength_get(const E_Connman_Element *service, unsigned char *strength)
516 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
517 EINA_SAFETY_ON_NULL_RETURN_VAL(strength, 0);
518 return e_connman_element_property_get_stringshared
519 (service, e_connman_prop_strengh, NULL, strength);
523 * Get property "Favorite" value.
525 * If this property isn't found then 0 is returned.
526 * If zero is returned, then this call failed and parameter-returned
527 * values shall be considered invalid.
529 * Will be true if a cable is plugged in or the user
530 * selected and successfully connected to this service.
532 * This value is automatically changed and to revert
533 * it back to false the Remove() method needs to be
536 * @param service_path to get property.
537 * @param favorite where to store the property value, must be a
538 * pointer to boolean (bool *).
540 * @return 1 on success, 0 otherwise.
543 e_connman_service_favorite_get(const E_Connman_Element *service, bool *favorite)
545 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
546 EINA_SAFETY_ON_NULL_RETURN_VAL(favorite, 0);
547 return e_connman_element_property_get_stringshared
548 (service, e_connman_prop_favorite, NULL, favorite);
552 * Get property "AutoConnect" value.
554 * If this property isn't found then 0 is returned.
555 * If zero is returned, then this call failed and parameter-returned
556 * values shall be considered invalid.
558 * If set to true, this service will auto-connect
559 * when not other connection is available.
561 * For favorite services it is possible to change
562 * this value to prevent or permit automatic
563 * connection attempts.
565 * @param service_path to get property.
566 * @param auto_connect where to store the property value, must be a
567 * pointer to boolean (bool *).
569 * @return 1 on success, 0 otherwise.
570 * @see e_connman_service_auto_connect_set()
573 e_connman_service_auto_connect_get(const E_Connman_Element *service, bool *auto_connect)
575 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
576 EINA_SAFETY_ON_NULL_RETURN_VAL(auto_connect, 0);
577 return e_connman_element_property_get_stringshared
578 (service, e_connman_prop_auto_connect, NULL, auto_connect);
582 * Set property "AutoConnect" value.
584 * If this property isn't found then 0 is returned.
585 * If zero is returned, then this call failed and parameter-returned
586 * values shall be considered invalid.
588 * If set to true, this service will auto-connect
589 * when not other connection is available.
591 * For favorite services it is possible to change
592 * this value to prevent or permit automatic
593 * connection attempts.
595 * @param service_path to get property.
596 * @param service_favorite where to store the property value, must be a
597 * pointer to boolean (bool *).
599 * @return 1 on success, 0 otherwise.
600 * @see e_connman_service_auto_connect_get()
603 e_connman_service_auto_connect_set(E_Connman_Element *service, bool auto_connect, E_DBus_Method_Return_Cb cb, const void *data)
605 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
606 return e_connman_element_property_set_full
607 (service, e_connman_prop_auto_connect, DBUS_TYPE_BOOLEAN, &auto_connect, cb, data);
611 * Get property "SetupRequired" value.
613 * If this property isn't found then 0 is returned.
614 * If zero is returned, then this call failed and parameter-returned
615 * values shall be considered invalid.
617 * If the service is Cellular, then this property
618 * indicates that some extra setup steps are required.
620 * In most cases it is required to fill in the APN
623 * @param service_path to get property.
624 * @param setup_required where to store the property value, must be a
625 * pointer to boolean (bool *).
627 * @return 1 on success, 0 otherwise.
630 e_connman_service_setup_required_get(const E_Connman_Element *service, bool *setup_required)
632 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
633 EINA_SAFETY_ON_NULL_RETURN_VAL(setup_required, 0);
634 return e_connman_element_property_get_stringshared
635 (service, e_connman_prop_setup_required, NULL, setup_required);
639 * Get property "APN" value.
641 * If this property isn't found then 0 is returned.
642 * If zero is returned, then this call failed and parameter-returned
643 * values shall be considered invalid.
645 * If the service is Cellular, then this property
646 * contains the APN details.
648 * The APN is network provider specific and even
649 * sometimes data plan specific. Possible examples
650 * are "isp.cingular" or "internet.t-mobile".
652 * This property might also not always be included
653 * since it is protected by a different security policy.
655 * @param service_path to get property.
656 * @param apn where to store the property value, must be a pointer
657 * to string (const char **), it will not be allocated or
658 * copied and references will be valid until element changes,
659 * so copy it if you want to use it later.
661 * @return 1 on success, 0 otherwise.
662 * @see e_connman_service_apn_set()
665 e_connman_service_apn_get(const E_Connman_Element *service, const char **apn)
667 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
668 EINA_SAFETY_ON_NULL_RETURN_VAL(apn, 0);
669 return e_connman_element_property_get_stringshared
670 (service, e_connman_prop_apn, NULL, apn);
674 * Set property "APN" value.
676 * If this property isn't found then 0 is returned.
677 * If zero is returned, then this call failed and parameter-returned
678 * values shall be considered invalid.
680 * If the service is Cellular, then this property
681 * contains the APN details.
683 * The APN is network provider specific and even
684 * sometimes data plan specific. Possible examples
685 * are "isp.cingular" or "internet.t-mobile".
687 * This property might also not always be included
688 * since it is protected by a different security policy.
690 * @param service_path to get property.
691 * @param passphrase value to set.
692 * @param cb function to call when server replies or some error happens.
693 * @param data data to give to cb when it is called.
695 * @return 1 on success, 0 otherwise.
696 * @see e_connman_service_apn_get()
699 e_connman_service_apn_set(E_Connman_Element *service, const char *apn, E_DBus_Method_Return_Cb cb, const void *data)
701 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
702 return e_connman_element_property_set_full
703 (service, e_connman_prop_apn, DBUS_TYPE_STRING,
708 * Get property "MCC" value.
710 * If this property isn't found then 0 is returned.
711 * If zero is returned, then this call failed and parameter-returned
712 * values shall be considered invalid.
714 * If the service is Cellular, then this property
715 * contains the Mobile Country Code.
717 * @param service_path to get property.
718 * @param mcc where to store the property value, must be a pointer
719 * to string (const char **), it will not be allocated or
720 * copied and references will be valid until element changes,
721 * so copy it if you want to use it later.
723 * @return 1 on success, 0 otherwise.
726 e_connman_service_mcc_get(const E_Connman_Element *service, const char **mcc)
728 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
729 EINA_SAFETY_ON_NULL_RETURN_VAL(mcc, 0);
730 return e_connman_element_property_get_stringshared
731 (service, e_connman_prop_mcc, NULL, mcc);
735 * Get property "MNC" value.
737 * If this property isn't found then 0 is returned.
738 * If zero is returned, then this call failed and parameter-returned
739 * values shall be considered invalid.
741 * If the service is Cellular, then this property
742 * contains the Mobile Network Code.
744 * @param service_path to get property.
745 * @param mnc where to store the property value, must be a pointer
746 * to string (const char **), it will not be allocated or
747 * copied and references will be valid until element changes,
748 * so copy it if you want to use it later.
750 * @return 1 on success, 0 otherwise.
753 e_connman_service_mnc_get(const E_Connman_Element *service, const char **mnc)
755 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
756 EINA_SAFETY_ON_NULL_RETURN_VAL(mnc, 0);
757 return e_connman_element_property_get_stringshared
758 (service, e_connman_prop_mnc, NULL, mnc);
762 * Get property "Roaming" value.
764 * If this property isn't found then 0 is returned.
765 * If zero is returned, then this call failed and parameter-returned
766 * values shall be considered invalid.
768 * This property indicates if this service is roaming.
770 * In the case of Cellular services this normally
771 * indicates connections to a foreign provider when
774 * @param service_path to get property.
775 * @param roaming where to store the property value, must be a
776 * pointer to boolean (bool *).
778 * @return 1 on success, 0 otherwise.
781 e_connman_service_roaming_get(const E_Connman_Element *service, bool *roaming)
783 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
784 EINA_SAFETY_ON_NULL_RETURN_VAL(roaming, 0);
785 return e_connman_element_property_get_stringshared
786 (service, e_connman_prop_roaming, NULL, roaming);
790 * Get property "IPv4.Method" value.
792 * If this property isn't found then 0 is returned.
793 * If zero is returned, then this call failed and parameter-returned
794 * values shall be considered invalid.
796 * The IPv4 configuration method. Possible values here
797 * are "dhcp" and "static".
799 * @param service_path to get property.
800 * @param method where to store the property value, must be a pointer
801 * to string (const char **), it will not be allocated or
802 * copied and references will be valid until element changes,
803 * so copy it if you want to use it later.
805 * @return 1 on success, 0 otherwise.
806 * @see e_connman_service_ipv4_method_set()
809 e_connman_service_ipv4_method_get(const E_Connman_Element *service, const char **method)
811 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
812 EINA_SAFETY_ON_NULL_RETURN_VAL(method, 0);
813 return e_connman_element_property_get_stringshared
814 (service, e_connman_prop_ipv4_method, NULL, method);
818 * Set property "IPv4.Method" value.
820 * If this property isn't found then 0 is returned.
821 * If zero is returned, then this call failed and parameter-returned
822 * values shall be considered invalid.
824 * The IPv4 configuration method. Possible values here
825 * are "dhcp" and "static".
827 * @param service_path to get property.
828 * @param method value to set.
829 * @param cb function to call when server replies or some error happens.
830 * @param data data to give to cb when it is called.
832 * @return 1 on success, 0 otherwise.
833 * @see e_connman_service_ipv4_method_get()
836 e_connman_service_ipv4_method_set(E_Connman_Element *service, const char *method, E_DBus_Method_Return_Cb cb, const void *data)
838 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
839 return e_connman_element_property_set_full
840 (service, e_connman_prop_ipv4_method, DBUS_TYPE_STRING,
845 * Get property "IPv4.Address" value.
847 * If this property isn't found then 0 is returned.
848 * If zero is returned, then this call failed and parameter-returned
849 * values shall be considered invalid.
851 * The current configured IPv4 address.
853 * @param service_path to get property.
854 * @param address where to store the property value, must be a pointer
855 * to string (const char **), it will not be allocated or
856 * copied and references will be valid until element changes,
857 * so copy it if you want to use it later.
859 * @return 1 on success, 0 otherwise.
860 * @see e_connman_service_ipv4_address_set()
863 e_connman_service_ipv4_address_get(const E_Connman_Element *service, const char **address)
865 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
866 EINA_SAFETY_ON_NULL_RETURN_VAL(address, 0);
867 return e_connman_element_property_get_stringshared
868 (service, e_connman_prop_ipv4_address, NULL, address);
872 * Set property "IPv4.Address" value.
874 * If this property isn't found then 0 is returned.
875 * If zero is returned, then this call failed and parameter-returned
876 * values shall be considered invalid.
878 * The current configured IPv4 address.
880 * @param service_path to get property.
881 * @param address value to set.
882 * @param cb function to call when server replies or some error happens.
883 * @param data data to give to cb when it is called.
885 * @return 1 on success, 0 otherwise.
886 * @see e_connman_service_ipv4_address_get()
889 e_connman_service_ipv4_address_set(E_Connman_Element *service, const char *address, E_DBus_Method_Return_Cb cb, const void *data)
891 EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
892 return e_connman_element_property_set_full
893 (service, e_connman_prop_ipv4_address, DBUS_TYPE_STRING,