Rename classes to denote their roles clearly 22/115522/1
authorMu-Woong Lee <muwoong.lee@samsung.com>
Mon, 20 Feb 2017 08:13:35 +0000 (17:13 +0900)
committerMu-Woong Lee <muwoong.lee@samsung.com>
Mon, 20 Feb 2017 08:13:35 +0000 (17:13 +0900)
Change-Id: Ida84bc00909c2b895133b61246e72591b1e62fe8
Signed-off-by: Mu-Woong Lee <muwoong.lee@samsung.com>
include/ClientBase.h [moved from include/ClientProxy.h with 77% similarity]
include/IServiceResultListener.h [moved from include/IClientResultListener.h with 81% similarity]
include/IServiceSignalListener.h [moved from include/IClientSignalListener.h with 79% similarity]
include/MethodCall.h
include/ServiceBase.h [moved from include/DBusService.h with 80% similarity]
include/ServiceProxy.h [moved from include/DBusClient.h with 71% similarity]
src/client/ServiceProxy.cpp [moved from src/client/DBusClient.cpp with 72% similarity]
src/server/ClientBase.cpp [moved from src/server/ClientProxy.cpp with 75% similarity]
src/server/MethodCall.cpp
src/server/ServiceBase.cpp [moved from src/server/DBusService.cpp with 71% similarity]

similarity index 77%
rename from include/ClientProxy.h
rename to include/ClientBase.h
index 969844c..aa358c9 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef __CONTEXT_CLIENT_PROXY_H__
-#define __CONTEXT_CLIENT_PROXY_H__
+#ifndef __CONTEXT_CLIENT_BASE_H__
+#define __CONTEXT_CLIENT_BASE_H__
 
 #include <string>
 #include <ContextTypes.h>
 namespace ctx {
 
        /* Forward declarations */
-       class DBusService;
+       class ServiceBase;
        class MethodCall;
        class Credential;
 
-       class EXPORT_API ClientProxy {
+       class EXPORT_API ClientBase {
        public:
-               virtual ~ClientProxy();
+               virtual ~ClientBase();
 
                virtual void onMethodCalled(MethodCall* methodCall) = 0;
 
@@ -39,20 +39,20 @@ namespace ctx {
 
                Credential* getCredential();
 
-               DBusService* getHostService();
+               ServiceBase* getHostService();
 
                // If the GVariant 'param' is floating, it is consumed.
                void publish(const std::string& signalName, GVariant* param);
 
        protected:
-               ClientProxy(DBusService* hostService, const std::string& busName);
+               ClientBase(ServiceBase* hostService, const std::string& busName);
 
        private:
-               DBusService* __hostService;
+               ServiceBase* __hostService;
                std::string __busName;
                Credential* __credential;
        };
 
 }
 
-#endif /* __CONTEXT_CLIENT_PROXY_H__ */
+#endif /* __CONTEXT_CLIENT_BASE_H__ */
similarity index 81%
rename from include/IClientResultListener.h
rename to include/IServiceResultListener.h
index 66cccbe..9466ba3 100644 (file)
  * limitations under the License.
  */
 
-#ifndef __CONTEXT_I_CLIENT_RESULT_LISTENER_H__
-#define __CONTEXT_I_CLIENT_RESULT_LISTENER_H__
+#ifndef __CONTEXT_I_SERVICE_RESULT_LISTENER_H__
+#define __CONTEXT_I_SERVICE_RESULT_LISTENER_H__
 
 #include <string>
 #include <ContextTypes.h>
 
 namespace ctx {
 
-       class IClientResultListener {
+       class IServiceResultListener {
        public:
-               virtual ~IClientResultListener() {}
+               virtual ~IServiceResultListener() {}
 
                // The GVariant 'param' is released automatically.
                // To keep accessing it, its reference count needs to be increased.
@@ -35,4 +35,4 @@ namespace ctx {
 
 }
 
-#endif /* _CONTEXT_I_CLIENT_RESULT_LISTENER_H_ */
+#endif /* _CONTEXT_I_SERVICE_RESULT_LISTENER_H_ */
similarity index 79%
rename from include/IClientSignalListener.h
rename to include/IServiceSignalListener.h
index c063d17..bc67725 100644 (file)
  * limitations under the License.
  */
 
-#ifndef __CONTEXT_I_CLIENT_SIGNAL_LISTENER_H__
-#define __CONTEXT_I_CLIENT_SIGNAL_LISTENER_H__
+#ifndef __CONTEXT_I_SERVICE_SIGNAL_LISTENER_H__
+#define __CONTEXT_I_SERVICE_SIGNAL_LISTENER_H__
 
 #include <string>
 #include <ContextTypes.h>
 
 namespace ctx {
 
-       class IClientSignalListener {
+       class IServiceSignalListener {
        public:
-               virtual ~IClientSignalListener() {}
+               virtual ~IServiceSignalListener() {}
 
                // The GVariant 'param' is released automatically.
                virtual void onSignal(const std::string& signalName, GVariant* param) = 0;
@@ -32,4 +32,4 @@ namespace ctx {
 
 }
 
-#endif /* _CONTEXT_I_CLIENT_SIGNAL_LISTENER_H_ */
+#endif /* _CONTEXT_I_SERVICE_SIGNAL_LISTENER_H_ */
index 771501a..da7a7d1 100644 (file)
 namespace ctx {
 
        /* Forward declaration */
-       class ClientProxy;
+       class ClientBase;
 
        class EXPORT_API MethodCall {
        public:
-               MethodCall(ClientProxy* proxy, const std::string& methodName, GVariant* param, GDBusMethodInvocation* invocation);
+               MethodCall(ClientBase* client, const std::string& methodName, GVariant* param, GDBusMethodInvocation* invocation);
                ~MethodCall();
 
-               ClientProxy* getSender();
+               ClientBase* getSender();
                const std::string& getMethodName() const;
 
                // The returned GVariant object should be not freed.
@@ -40,7 +40,7 @@ namespace ctx {
                bool reply(int error);
 
        private:
-               ClientProxy* __clientProxy;
+               ClientBase* __client;
                std::string __methodName;
                GVariant* __param;
                GDBusMethodInvocation* __invocation;
similarity index 80%
rename from include/DBusService.h
rename to include/ServiceBase.h
index 9dbf54c..9a0bae5 100644 (file)
@@ -14,8 +14,8 @@
  * limitations under the License.
  */
 
-#ifndef __CONTEXT_DBUS_SERVICE_H__
-#define __CONTEXT_DBUS_SERVICE_H__
+#ifndef __CONTEXT_SERVICE_BASE_H__
+#define __CONTEXT_SERVICE_BASE_H__
 
 #include <string>
 #include <map>
 namespace ctx {
 
        /* Forward declarations */
-       class ClientProxy;
+       class ClientBase;
        class MethodCall;
 
-       class EXPORT_API DBusService {
+       class EXPORT_API ServiceBase {
        public:
-               virtual ~DBusService();
+               virtual ~ServiceBase();
 
                GDBusConnection* getConnection();
 
@@ -43,7 +43,7 @@ namespace ctx {
                uid_t getActiveUser();
 
        protected:
-               DBusService(GDBusConnection* conn, const char* serviceName, const char* methodSpecs);
+               ServiceBase(GDBusConnection* conn, const char* serviceName, const char* methodSpecs);
 
                virtual bool prepare() = 0;
 
@@ -51,7 +51,7 @@ namespace ctx {
 
                virtual void onUserActivated(uid_t uid) = 0;
 
-               virtual ClientProxy* createProxy(const std::string& busName) = 0;
+               virtual ClientBase* createClient(const std::string& busName) = 0;
 
        private:
                static gpointer __threadFunc(gpointer data);
@@ -77,9 +77,9 @@ namespace ctx {
                bool __init();
                void __release();
 
-               ClientProxy* __getClientProxy(const std::string& busName);
-               void __removeClientProxy(const std::string& busName);
-               unsigned int __watch(const std::string& busName, ClientProxy* proxy);
+               ClientBase* __getClient(const std::string& busName);
+               void __removeClient(const std::string& busName);
+               unsigned int __watch(const std::string& busName, ClientBase* client);
                void __unwatch(unsigned int watchId);
 
                const char* __serviceName;
@@ -98,14 +98,14 @@ namespace ctx {
                guint __userNewSignalId;
                uid_t __activeUid;
 
-               struct ProxyInfo {
-                       ClientProxy* proxy;
+               struct ClientInfo {
+                       ClientBase* client;
                        unsigned int watchId;
                };
 
-               std::map<std::string, ProxyInfo> __proxies;
+               std::map<std::string, ClientInfo> __clients;
        };
 
 }
 
-#endif /* __CONTEXT_DBUS_SERVICE_H__ */
+#endif /* __CONTEXT_SERVICE_BASE_H__ */
similarity index 71%
rename from include/DBusClient.h
rename to include/ServiceProxy.h
index 873a50f..97e3ed7 100644 (file)
  * limitations under the License.
  */
 
-#ifndef __CONTEXT_DBUS_CLIENT_H__
-#define __CONTEXT_DBUS_CLIENT_H__
+#ifndef __CONTEXT_SERVICE_PROXY_H__
+#define __CONTEXT_SERVICE_PROXY_H__
 
 #include <string>
 #include <ContextTypes.h>
 
 namespace ctx {
 
-       class IClientResultListener;
-       class IClientSignalListener;
+       class IServiceResultListener;
+       class IServiceSignalListener;
 
-       class EXPORT_API DBusClient {
+       class EXPORT_API ServiceProxy {
        public:
-               DBusClient(const char* serviceName);
-               ~DBusClient();
+               ServiceProxy(const char* serviceName);
+               ~ServiceProxy();
 
                // The GVariant 'inParam' is consumed, if it is floating.
                // If succeeded, the GVariant 'outParam' contains return values. Free with g_variant_unref().
                int call(const std::string& methodName, GVariant* inParam, GVariant** outParam);
-               int call(const std::string& methodName, GVariant* inParam, IClientResultListener* listener);
+               int call(const std::string& methodName, GVariant* inParam, IServiceResultListener* listener);
 
-               unsigned int subscribe(const std::string& signalName, IClientSignalListener* listener);
+               unsigned int subscribe(const std::string& signalName, IServiceSignalListener* listener);
                void unsubscribe(unsigned int subscriptionId);
 
        private:
@@ -43,8 +43,8 @@ namespace ctx {
                static void __signalCb(GDBusConnection* conn, const gchar* sender, const gchar* path,
                                const gchar* iface, const gchar* name, GVariant* param, gpointer userData);
 
-               void __onSuccess(const std::string& methodName, GVariant* param, IClientResultListener* listener);
-               void __onError(const std::string& methodName, GError* gerr, IClientResultListener* listener);
+               void __onSuccess(const std::string& methodName, GVariant* param, IServiceResultListener* listener);
+               void __onError(const std::string& methodName, GError* gerr, IServiceResultListener* listener);
 
                const char* __serviceName;
                std::string __objPath;
@@ -54,4 +54,4 @@ namespace ctx {
 
 }      /* namespace ctx */
 
-#endif /* __CONTEXT_DBUS_CLIENT_H__ */
+#endif /* __CONTEXT_SERVICE_PROXY_H__ */
similarity index 72%
rename from src/client/DBusClient.cpp
rename to src/client/ServiceProxy.cpp
index 5357947..ca90c15 100644 (file)
  * limitations under the License.
  */
 
-#include <IClientResultListener.h>
-#include <IClientSignalListener.h>
-#include <DBusClient.h>
+#include <IServiceResultListener.h>
+#include <IServiceSignalListener.h>
+#include <ServiceProxy.h>
 
 using namespace ctx;
 
 struct ResultCbData {
-       DBusClient* client;
+       ServiceProxy* proxy;
        std::string name;
-       IClientResultListener* resultListener;
+       IServiceResultListener* resultListener;
 };
 
-DBusClient::DBusClient(const char* serviceName) :
+ServiceProxy::ServiceProxy(const char* serviceName) :
        __serviceName(serviceName),
        __objPath(CTX_DBUS_PATH),
        __interface(CTX_DBUS_IFACE),
@@ -52,7 +52,7 @@ DBusClient::DBusClient(const char* serviceName) :
        _I("Connection established (%s)", g_dbus_connection_get_unique_name(__connection));
 }
 
-DBusClient::~DBusClient()
+ServiceProxy::~ServiceProxy()
 {
        if (!__connection)
                return;
@@ -64,7 +64,7 @@ DBusClient::~DBusClient()
        _I("Connection released");
 }
 
-int DBusClient::call(const std::string& methodName, GVariant* inParam, GVariant** outParam)
+int ServiceProxy::call(const std::string& methodName, GVariant* inParam, GVariant** outParam)
 {
        IF_FAIL_RETURN_TAG(__connection, E_FAILED, _E, "Not connected");
        _D("Call '%s' (sync)", methodName.c_str());
@@ -89,7 +89,7 @@ int DBusClient::call(const std::string& methodName, GVariant* inParam, GVariant*
        return ret;
 }
 
-int DBusClient::call(const std::string& methodName, GVariant* inParam, IClientResultListener* listener)
+int ServiceProxy::call(const std::string& methodName, GVariant* inParam, IServiceResultListener* listener)
 {
        IF_FAIL_RETURN_TAG(__connection, E_FAILED, _E, "Not connected");
        _D("Call '%s' (async)", methodName.c_str());
@@ -97,7 +97,7 @@ int DBusClient::call(const std::string& methodName, GVariant* inParam, IClientRe
        ResultCbData* cbData = new(std::nothrow) ResultCbData;
        IF_FAIL_RETURN_TAG(cbData, E_NO_MEM, _E, "Memory allocation failed");
 
-       cbData->client = this;
+       cbData->proxy = this;
        cbData->name = methodName;
        cbData->resultListener = listener;
 
@@ -108,7 +108,7 @@ int DBusClient::call(const std::string& methodName, GVariant* inParam, IClientRe
        return E_NONE;
 }
 
-unsigned int DBusClient::subscribe(const std::string& signalName, IClientSignalListener* listener)
+unsigned int ServiceProxy::subscribe(const std::string& signalName, IServiceSignalListener* listener)
 {
        IF_FAIL_RETURN_TAG(__connection, 0, _E, "Not connected");
 
@@ -119,32 +119,32 @@ unsigned int DBusClient::subscribe(const std::string& signalName, IClientSignalL
        return sid;
 }
 
-void DBusClient::unsubscribe(unsigned int subscriptionId)
+void ServiceProxy::unsubscribe(unsigned int subscriptionId)
 {
        g_dbus_connection_signal_unsubscribe(__connection, subscriptionId);
 }
 
-void DBusClient::__asyncReadyCb(GObject* srcObj, GAsyncResult* res, gpointer userData)
+void ServiceProxy::__asyncReadyCb(GObject* srcObj, GAsyncResult* res, gpointer userData)
 {
        ResultCbData* cbData = static_cast<ResultCbData*>(userData);
        GError *gerr = NULL;
-       GVariant* param = g_dbus_connection_call_finish(cbData->client->__connection, res, &gerr);
+       GVariant* param = g_dbus_connection_call_finish(cbData->proxy->__connection, res, &gerr);
 
        if (param)
-               cbData->client->__onSuccess(cbData->name, param, cbData->resultListener);
+               cbData->proxy->__onSuccess(cbData->name, param, cbData->resultListener);
        else
-               cbData->client->__onError(cbData->name, gerr, cbData->resultListener);
+               cbData->proxy->__onError(cbData->name, gerr, cbData->resultListener);
 
        delete cbData;
 }
 
-void DBusClient::__signalCb(GDBusConnection* conn, const gchar* sender, const gchar* path, const gchar* iface, const gchar* name, GVariant* param, gpointer userData)
+void ServiceProxy::__signalCb(GDBusConnection* conn, const gchar* sender, const gchar* path, const gchar* iface, const gchar* name, GVariant* param, gpointer userData)
 {
-       IClientSignalListener* listener = static_cast<IClientSignalListener*>(userData);
+       IServiceSignalListener* listener = static_cast<IServiceSignalListener*>(userData);
        listener->onSignal(name, param);
 }
 
-void DBusClient::__onSuccess(const std::string& methodName, GVariant* param, IClientResultListener* listener)
+void ServiceProxy::__onSuccess(const std::string& methodName, GVariant* param, IServiceResultListener* listener)
 {
        _D("Reply to %s.%s", __serviceName, methodName.c_str());
 
@@ -152,7 +152,7 @@ void DBusClient::__onSuccess(const std::string& methodName, GVariant* param, ICl
        g_variant_unref(param);
 }
 
-void DBusClient::__onError(const std::string& methodName, GError* gerr, IClientResultListener* listener)
+void ServiceProxy::__onError(const std::string& methodName, GError* gerr, IServiceResultListener* listener)
 {
        _D("Error on %s.%s", __serviceName, methodName.c_str());
 
similarity index 75%
rename from src/server/ClientProxy.cpp
rename to src/server/ClientBase.cpp
index 80dc2e2..a8efcdc 100644 (file)
  * limitations under the License.
  */
 
-#include <DBusService.h>
+#include <ServiceBase.h>
 #include <Credential.h>
 #include <MethodCall.h>
-#include <ClientProxy.h>
+#include <ClientBase.h>
 
 using namespace ctx;
 
-ClientProxy::ClientProxy(DBusService* hostService, const std::string& busName) :
+ClientBase::ClientBase(ServiceBase* hostService, const std::string& busName) :
        __hostService(hostService),
        __busName(busName),
        __credential(NULL)
 {
 }
 
-ClientProxy::~ClientProxy()
+ClientBase::~ClientBase()
 {
        delete __credential;
 }
 
-const std::string& ClientProxy::getBusName() const
+const std::string& ClientBase::getBusName() const
 {
        return __busName;
 }
 
-Credential* ClientProxy::getCredential()
+Credential* ClientBase::getCredential()
 {
        if (__credential)
                return __credential;
@@ -49,12 +49,12 @@ Credential* ClientProxy::getCredential()
        return __credential;
 }
 
-DBusService* ClientProxy::getHostService()
+ServiceBase* ClientBase::getHostService()
 {
        return __hostService;
 }
 
-void ClientProxy::publish(const std::string& signalName, GVariant* param)
+void ClientBase::publish(const std::string& signalName, GVariant* param)
 {
        __hostService->publish(__busName, signalName, param);
 }
index 7ec1d82..9e7e8ee 100644 (file)
  * limitations under the License.
  */
 
-#include <ClientProxy.h>
+#include <ClientBase.h>
 #include <MethodCall.h>
 
 using namespace ctx;
 
-MethodCall::MethodCall(ClientProxy* proxy, const std::string& methodName, GVariant* param, GDBusMethodInvocation* invocation) :
-       __clientProxy(proxy),
+MethodCall::MethodCall(ClientBase* client, const std::string& methodName, GVariant* param, GDBusMethodInvocation* invocation) :
+       __client(client),
        __methodName(methodName),
        __param(param),
        __invocation(invocation)
@@ -35,14 +35,14 @@ MethodCall::~MethodCall()
        if (!__invocation)
                return;
 
-       _E("Method call '%s' from '%s' is not handled yet", __methodName.c_str(), __clientProxy->getBusName().c_str());
+       _E("Method call '%s' from '%s' is not handled yet", __methodName.c_str(), __client->getBusName().c_str());
 
        g_dbus_method_invocation_return_error_literal(__invocation, CTX_ERROR_DOMAIN, E_FAILED, "");
 }
 
-ClientProxy* MethodCall::getSender()
+ClientBase* MethodCall::getSender()
 {
-       return __clientProxy;
+       return __client;
 }
 
 const std::string& MethodCall::getMethodName() const
similarity index 71%
rename from src/server/DBusService.cpp
rename to src/server/ServiceBase.cpp
index 1b440ae..b79c986 100644 (file)
 
 #include <systemd/sd-login.h>
 #include <ScopeMutex.h>
-#include <ClientProxy.h>
+#include <ClientBase.h>
 #include <MethodCall.h>
-#include <DBusService.h>
+#include <ServiceBase.h>
 
 using namespace ctx;
 
-DBusService::DBusService(GDBusConnection* conn, const char* serviceName, const char* methodSpecs) :
+ServiceBase::ServiceBase(GDBusConnection* conn, const char* serviceName, const char* methodSpecs) :
        __serviceName(serviceName),
        __mainContext(NULL),
        __mainLoop(NULL),
@@ -40,16 +40,16 @@ DBusService::DBusService(GDBusConnection* conn, const char* serviceName, const c
        __interface += serviceName;
 }
 
-DBusService::~DBusService()
+ServiceBase::~ServiceBase()
 {
 }
 
-GDBusConnection* DBusService::getConnection()
+GDBusConnection* ServiceBase::getConnection()
 {
        return __connection;
 }
 
-bool DBusService::start()
+bool ServiceBase::start()
 {
        _I("Preparing '%s'", __serviceName);
 
@@ -64,7 +64,7 @@ bool DBusService::start()
        return true;
 }
 
-void DBusService::stop()
+void ServiceBase::stop()
 {
 #ifndef SINGLE_THREADING
        if (__mainLoop && g_main_loop_is_running(__mainLoop)) {
@@ -88,15 +88,15 @@ void DBusService::stop()
 #endif
 }
 
-gboolean DBusService::__stopMainLoop(gpointer data)
+gboolean ServiceBase::__stopMainLoop(gpointer data)
 {
-       DBusService* svc = static_cast<DBusService*>(data);
+       ServiceBase* svc = static_cast<ServiceBase*>(data);
        _I(PURPLE("Stopping '%s'"), svc->__serviceName);
        g_main_loop_quit(svc->__mainLoop);
        return G_SOURCE_REMOVE;
 }
 
-void DBusService::publish(const std::string& busName, const std::string& signalName, GVariant* param)
+void ServiceBase::publish(const std::string& busName, const std::string& signalName, GVariant* param)
 {
        GError* gerr = NULL;
        g_dbus_connection_emit_signal(__connection,
@@ -105,7 +105,7 @@ void DBusService::publish(const std::string& busName, const std::string& signalN
        HANDLE_GERROR(gerr);
 }
 
-uid_t DBusService::getActiveUser()
+uid_t ServiceBase::getActiveUser()
 {
        if (__activeUid == 0) {
                uid_t* users = NULL;
@@ -117,14 +117,14 @@ uid_t DBusService::getActiveUser()
        return __activeUid;
 }
 
-gpointer DBusService::__threadFunc(gpointer data)
+gpointer ServiceBase::__threadFunc(gpointer data)
 {
-       DBusService* service = static_cast<DBusService*>(data);
+       ServiceBase* service = static_cast<ServiceBase*>(data);
        service->__run();
        return NULL;
 }
 
-void DBusService::__run()
+void ServiceBase::__run()
 {
        if (!__init()) {
                _E("Starting failed");
@@ -138,7 +138,7 @@ void DBusService::__run()
        __release();
 }
 
-bool DBusService::__init()
+bool ServiceBase::__init()
 {
        GError* gerr = NULL;
        GDBusInterfaceVTable vtable;
@@ -175,16 +175,16 @@ bool DBusService::__init()
        return prepare();
 }
 
-void DBusService::__release()
+void ServiceBase::__release()
 {
        _D("Releasing '%s'", __serviceName);
 
-       for (auto iter = __proxies.begin(); iter != __proxies.end(); ++iter) {
-               iter->second.proxy->onDisconnected();
-               delete iter->second.proxy;
+       for (auto iter = __clients.begin(); iter != __clients.end(); ++iter) {
+               iter->second.client->onDisconnected();
+               delete iter->second.client;
        }
 
-       __proxies.clear();
+       __clients.clear();
 
        cleanup();
 
@@ -204,7 +204,7 @@ void DBusService::__release()
                g_main_context_unref(__mainContext);
 }
 
-void DBusService::__onUserNew(GDBusConnection* conn, const gchar* sender,
+void ServiceBase::__onUserNew(GDBusConnection* conn, const gchar* sender,
                const gchar* path, const gchar* iface, const gchar* name,
                GVariant* param, gpointer userData)
 {
@@ -212,7 +212,7 @@ void DBusService::__onUserNew(GDBusConnection* conn, const gchar* sender,
        g_variant_get_child(param, 0, "u", &uid);
        IF_FAIL_VOID_TAG(uid > 0, _W, "UID == 0");
 
-       DBusService* svc = static_cast<DBusService*>(userData);
+       ServiceBase* svc = static_cast<ServiceBase*>(userData);
 
        if (svc->__activeUid == static_cast<uid_t>(uid))
                return;
@@ -221,75 +221,75 @@ void DBusService::__onUserNew(GDBusConnection* conn, const gchar* sender,
        svc->onUserActivated(svc->__activeUid);
 }
 
-void DBusService::__onMethodCalled(GDBusConnection* conn, const gchar* sender,
+void ServiceBase::__onMethodCalled(GDBusConnection* conn, const gchar* sender,
                const gchar* path, const gchar* iface, const gchar* name,
                GVariant* param, GDBusMethodInvocation* invocation, gpointer userData)
 {
-       DBusService* service = static_cast<DBusService*>(userData);
+       ServiceBase* service = static_cast<ServiceBase*>(userData);
        service->__onMethodCalled(sender, name, param, invocation);
 }
 
-void DBusService::__onMethodCalled(const std::string& sender,
+void ServiceBase::__onMethodCalled(const std::string& sender,
                const std::string& name, GVariant* param, GDBusMethodInvocation* invocation)
 {
        _I("'%s' called '%s.%s'", sender.c_str(), __serviceName, name.c_str());
 
-       ClientProxy* proxy = __getClientProxy(sender);
-       IF_FAIL_VOID(proxy);
+       ClientBase* client = __getClient(sender);
+       IF_FAIL_VOID(client);
 
-       MethodCall* methodCall = new(std::nothrow) MethodCall(proxy, name, param, invocation);
+       MethodCall* methodCall = new(std::nothrow) MethodCall(client, name, param, invocation);
        IF_FAIL_VOID_TAG(methodCall, _E, "Memory allocation failed");
 
-       proxy->onMethodCalled(methodCall);
+       client->onMethodCalled(methodCall);
 }
 
-ClientProxy* DBusService::__getClientProxy(const std::string& busName)
+ClientBase* ServiceBase::__getClient(const std::string& busName)
 {
-       auto iter = __proxies.find(busName);
+       auto iter = __clients.find(busName);
 
-       if (iter != __proxies.end())
-               return iter->second.proxy;
+       if (iter != __clients.end())
+               return iter->second.client;
 
-       ClientProxy* proxy = createProxy(busName);
-       IF_FAIL_RETURN_TAG(proxy, NULL, _E, "Memory allocation failed");
+       ClientBase* client = createClient(busName);
+       IF_FAIL_RETURN_TAG(client, NULL, _E, "Memory allocation failed");
 
-       ProxyInfo info = {proxy, __watch(busName, proxy)};
-       __proxies[busName] = info;
+       ClientInfo info = {client, __watch(busName, client)};
+       __clients[busName] = info;
 
-       return proxy;
+       return client;
 }
 
-void DBusService::__onNameOwnerChanged(GDBusConnection* conn, const gchar* sender,
+void ServiceBase::__onNameOwnerChanged(GDBusConnection* conn, const gchar* sender,
                const gchar* path, const gchar* iface, const gchar* name,
                GVariant* param, gpointer userData)
 {
-       ClientProxy* proxy = static_cast<ClientProxy*>(userData);
-       proxy->getHostService()->__removeClientProxy(proxy->getBusName());
+       ClientBase* client = static_cast<ClientBase*>(userData);
+       client->getHostService()->__removeClient(client->getBusName());
 }
 
-void DBusService::__removeClientProxy(const std::string& busName)
+void ServiceBase::__removeClient(const std::string& busName)
 {
        _I("'%s' lost '%s'", __serviceName, busName.c_str());
 
-       auto iter = __proxies.find(busName);
-       IF_FAIL_VOID(iter != __proxies.end());
+       auto iter = __clients.find(busName);
+       IF_FAIL_VOID(iter != __clients.end());
 
-       ProxyInfo info = iter->second;
-       __proxies.erase(iter);
+       ClientInfo info = iter->second;
+       __clients.erase(iter);
 
        __unwatch(info.watchId);
-       info.proxy->onDisconnected();
-       delete info.proxy;
+       info.client->onDisconnected();
+       delete info.client;
 }
 
-unsigned int DBusService::__watch(const std::string& busName, ClientProxy* proxy)
+unsigned int ServiceBase::__watch(const std::string& busName, ClientBase* client)
 {
        return g_dbus_connection_signal_subscribe(__connection,
                        "org.freedesktop.DBus", "org.freedesktop.DBus", "NameOwnerChanged", "/org/freedesktop/DBus",
-                       busName.c_str(), G_DBUS_SIGNAL_FLAGS_NONE, __onNameOwnerChanged, proxy, NULL);
+                       busName.c_str(), G_DBUS_SIGNAL_FLAGS_NONE, __onNameOwnerChanged, client, NULL);
 }
 
-void DBusService::__unwatch(unsigned int watchId)
+void ServiceBase::__unwatch(unsigned int watchId)
 {
        g_dbus_connection_signal_unsubscribe(__connection, watchId);
 }