provider: Function to set the immutable flag
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Tue, 5 Mar 2013 14:06:17 +0000 (16:06 +0200)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Fri, 8 Mar 2013 11:09:26 +0000 (13:09 +0200)
include/provider.h
src/provider.c

index c9a3b917f645a19ac6b8857cddabfe9a20176658..bfefaed3735367af1f33e1b0568e6a6a18402104 100644 (file)
@@ -101,6 +101,8 @@ int connman_provider_set_ipaddress(struct connman_provider *provider,
 int connman_provider_set_pac(struct connman_provider *provider,
                                const char *pac);
 int connman_provider_create_service(struct connman_provider *provider);
+int connman_provider_set_immutable(struct connman_provider *provider,
+                                               connman_bool_t immutable);
 struct connman_provider *connman_provider_get(const char *identifier);
 void connman_provider_put(struct connman_provider *provider);
 int connman_provider_set_domain(struct connman_provider *provider,
index fa3bc4855810be77c7d6d95bdc1fe38ec5778b88..ca868803769dd33fc1beb33b6509f80a27837bb6 100644 (file)
@@ -334,6 +334,19 @@ int connman_provider_create_service(struct connman_provider *provider)
        return 0;
 }
 
+int connman_provider_set_immutable(struct connman_provider *provider,
+                                               connman_bool_t immutable)
+{
+       if (provider == NULL)
+               return -EINVAL;
+
+       if (provider->vpn_service == NULL)
+               return -ESRCH;
+
+       return __connman_service_set_immutable(provider->vpn_service,
+                                               immutable);
+}
+
 static struct connman_provider *provider_lookup(const char *identifier)
 {
        return g_hash_table_lookup(provider_hash, identifier);