service: Add a getter for the passphrase
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Mon, 28 May 2012 11:20:21 +0000 (14:20 +0300)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Fri, 15 Jun 2012 11:46:33 +0000 (14:46 +0300)
src/connman.h
src/service.c

index adfdcea..cbf88fc 100644 (file)
@@ -666,6 +666,7 @@ void __connman_service_set_agent_identity(struct connman_service *service,
                                                const char *agent_identity);
 int __connman_service_set_passphrase(struct connman_service *service,
                                        const char *passphrase);
+const char *__connman_service_get_passphrase(struct connman_service *service);
 void __connman_service_set_agent_passphrase(struct connman_service *service,
                                                const char *agent_passphrase);
 
index 90ae252..0059688 100644 (file)
@@ -2690,6 +2690,14 @@ int __connman_service_set_passphrase(struct connman_service *service,
        return err;
 }
 
+const char *__connman_service_get_passphrase(struct connman_service *service)
+{
+       if (service == NULL)
+               return NULL;
+
+       return service->passphrase;
+}
+
 void __connman_service_set_agent_passphrase(struct connman_service *service,
                                                const char *agent_passphrase)
 {