Update the service code skeleton w.r.t. the change of the active user monitoring... 56/117256/1
authorMu-Woong Lee <muwoong.lee@samsung.com>
Fri, 3 Mar 2017 11:05:37 +0000 (20:05 +0900)
committerMu-Woong Lee <muwoong.lee@samsung.com>
Fri, 3 Mar 2017 11:05:37 +0000 (20:05 +0900)
Change-Id: Iad79d4539e2ea668954acf1343296e6a01fef286
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
include/ContextStoreService.h
src/server-dummy/ContextStoreService.cpp
src/server/ContextStoreService.cpp

index a599af9..ca384dc 100644 (file)
@@ -29,11 +29,16 @@ namespace ctx {
                ContextStoreService(GDBusConnection* conn);
                ~ContextStoreService();
 
+               bool isUserService();
+
        protected:
                bool prepare();
                void cleanup();
-               void onUserActivated(uid_t uid);
+
                ClientBase* createClient(const std::string& busName);
+
+               void onUserActivated();
+               void onUserDeactivated();
        };
 
 }
index 3c66f49..d5ef3b2 100644 (file)
@@ -29,16 +29,17 @@ ContextStoreService::~ContextStoreService()
 {
 }
 
-bool ContextStoreService::prepare()
+bool ContextStoreService::isUserService()
 {
        return false;
 }
 
-void ContextStoreService::cleanup()
+bool ContextStoreService::prepare()
 {
+       return false;
 }
 
-void ContextStoreService::onUserActivated(uid_t uid)
+void ContextStoreService::cleanup()
 {
 }
 
@@ -46,3 +47,11 @@ ClientBase* ContextStoreService::createClient(const std::string& busName)
 {
        return NULL;
 }
+
+void ContextStoreService::onUserActivated()
+{
+}
+
+void ContextStoreService::onUserDeactivated()
+{
+}
index e435fd0..c8dce21 100644 (file)
@@ -29,6 +29,11 @@ ContextStoreService::~ContextStoreService()
 {
 }
 
+bool ContextStoreService::isUserService()
+{
+       return false;
+}
+
 bool ContextStoreService::prepare()
 {
        /* Service-specific initialization tasks */
@@ -39,11 +44,15 @@ void ContextStoreService::cleanup()
 {
 }
 
-void ContextStoreService::onUserActivated(uid_t uid)
+ClientBase* ContextStoreService::createClient(const std::string& busName)
+{
+       return new(std::nothrow) ContextStoreClient(this, busName);
+}
+
+void ContextStoreService::onUserActivated()
 {
 }
 
-ClientBase* ContextStoreService::createClient(const std::string& busName)
+void ContextStoreService::onUserDeactivated()
 {
-       return new(std::nothrow) ContextStoreClient(this, busName);
 }