diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2009-12-20 13:32:05 -0800 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2009-12-20 13:32:05 -0800 |
commit | ca1df4353f0ed7873fbc6e835f1f2972bbb55feb (patch) | |
tree | e6929821dfc2462ebc275090c64ca47c3502e91f | |
parent | 5b1c118c543bb2bde58878cadb509558c28acbb8 (diff) | |
download | connman-ca1df4353f0ed7873fbc6e835f1f2972bbb55feb.tar.gz connman-ca1df4353f0ed7873fbc6e835f1f2972bbb55feb.tar.bz2 connman-ca1df4353f0ed7873fbc6e835f1f2972bbb55feb.zip |
Add basic support for immutable services
-rw-r--r-- | doc/service-api.txt | 9 | ||||
-rw-r--r-- | src/service.c | 7 |
2 files changed, 15 insertions, 1 deletions
diff --git a/doc/service-api.txt b/doc/service-api.txt index caf1dbe8..1fe37ea4 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 dec86224..d3089a0d 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; |