From: Marcel Holtmann Date: Sun, 20 Dec 2009 21:32:05 +0000 (-0800) Subject: Add basic support for immutable services X-Git-Tag: 0.48~45 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca1df4353f0ed7873fbc6e835f1f2972bbb55feb;p=platform%2Fupstream%2Fconnman.git Add basic support for immutable services --- diff --git a/doc/service-api.txt b/doc/service-api.txt index caf1dbe..1fe37ea 100644 --- a/doc/service-api.txt +++ b/doc/service-api.txt @@ -214,6 +214,15 @@ Properties string State [readonly] it back to false the Remove() method needs to be used. + boolean Immutable [readonly] + + This value will be set to true if the service is + configured externally via a configuration file. + + The only valid operation are Connect() and of + course Disconnect(). The Remove() method will + result in an error. + boolean AutoConnect [readwrite] If set to true, this service will auto-connect diff --git a/src/service.c b/src/service.c index dec8622..d3089a0 100644 --- a/src/service.c +++ b/src/service.c @@ -47,6 +47,7 @@ struct connman_service { enum connman_service_error error; connman_uint8_t strength; connman_bool_t favorite; + connman_bool_t immutable; connman_bool_t hidden; connman_bool_t ignore; connman_bool_t autoconnect; @@ -489,6 +490,9 @@ static DBusMessage *get_properties(DBusConnection *conn, connman_dbus_dict_append_basic(&dict, "Favorite", DBUS_TYPE_BOOLEAN, &service->favorite); + connman_dbus_dict_append_basic(&dict, "Immutable", + DBUS_TYPE_BOOLEAN, &service->immutable); + if (service->favorite == TRUE) connman_dbus_dict_append_basic(&dict, "AutoConnect", DBUS_TYPE_BOOLEAN, &service->autoconnect); @@ -1216,7 +1220,8 @@ static void __connman_service_initialize(struct connman_service *service) service->security = CONNMAN_SERVICE_SECURITY_UNKNOWN; service->state = CONNMAN_SERVICE_STATE_UNKNOWN; - service->favorite = FALSE; + service->favorite = FALSE; + service->immutable = FALSE; service->hidden = FALSE; service->ignore = FALSE;