/* This header SHOULD NOT be included by other headers in this directory. */
-#include <DBusService.h>
+#include <ServiceBase.h>
#include <ContextStoreTypes.h>
namespace ctx {
- class EXPORT_API ContextStoreService : public DBusService {
+ class EXPORT_API ContextStoreService : public ServiceBase {
public:
ContextStoreService(GDBusConnection* conn);
~ContextStoreService();
bool prepare();
void cleanup();
void onUserActivated(uid_t uid);
- ClientProxy* createProxy(const std::string& busName);
+ ClientBase* createClient(const std::string& busName);
};
}
*/
#include <ContextStoreTypesPrivate.h>
-#include <DBusClient.h>
+#include <ServiceProxy.h>
#include <ContextStore.h>
using namespace ctx;
/* TODO: Remove this test code */
EXPORT_API int context_store_test()
{
- // DBusClient object can be maintained as a static object.
- DBusClient client(CTX_CONTEXT_STORE);
+ // ServiceProxy object can be maintained as a static object.
+ ServiceProxy proxy(CTX_CONTEXT_STORE);
GVariant* output = NULL;
- int err = client.call("test", g_variant_new("(i)", 100), &output);
+ int err = proxy.call("test", g_variant_new("(i)", 100), &output);
_I(YELLOW("Return: %d (%s)"), err, CTX_ERROR_STR(err));
using namespace ctx;
ContextStoreService::ContextStoreService(GDBusConnection* conn) :
- DBusService(conn, CTX_CONTEXT_STORE, CTX_CONTEXT_STORE_SPEC)
+ ServiceBase(conn, CTX_CONTEXT_STORE, CTX_CONTEXT_STORE_SPEC)
{
throw std::runtime_error("Context Store is not supported");
}
{
}
-ClientProxy* ContextStoreService::createProxy(const std::string& busName)
+ClientBase* ContextStoreService::createClient(const std::string& busName)
{
return NULL;
}
* limitations under the License.
*/
-#include <DBusService.h>
+#include <ServiceBase.h>
#include <MethodCall.h>
-#include "ContextStoreClientProxy.h"
+#include "ContextStoreClient.h"
using namespace ctx;
-ContextStoreClientProxy::ContextStoreClientProxy(DBusService* hostService, const std::string& busName) :
- ClientProxy(hostService, busName)
+ContextStoreClient::ContextStoreClient(ServiceBase* hostService, const std::string& busName) :
+ ClientBase(hostService, busName)
{
}
-ContextStoreClientProxy::~ContextStoreClientProxy()
+ContextStoreClient::~ContextStoreClient()
{
}
-void ContextStoreClientProxy::onMethodCalled(MethodCall* methodCall)
+void ContextStoreClient::onMethodCalled(MethodCall* methodCall)
{
// 'methodCall' should be deleted.
delete methodCall;
}
-void ContextStoreClientProxy::onDisconnected()
+void ContextStoreClient::onDisconnected()
{
}
* limitations under the License.
*/
-#ifndef __CONTEXT_STORE_CLIENT_PROXY_H__
-#define __CONTEXT_STORE_CLIENT_PROXY_H__
+#ifndef __CONTEXT_STORE_CLIENT_H__
+#define __CONTEXT_STORE_CLIENT_H__
-#include <ClientProxy.h>
+#include <ClientBase.h>
namespace ctx {
- class ContextStoreClientProxy : public ClientProxy {
+ class ContextStoreClient : public ClientBase {
public:
- ContextStoreClientProxy(DBusService* hostService, const std::string& busName);
- ~ContextStoreClientProxy();
+ ContextStoreClient(ServiceBase* hostService, const std::string& busName);
+ ~ContextStoreClient();
void onMethodCalled(MethodCall* methodCall);
void onDisconnected();
}
-#endif /* __CONTEXT_STORE_CLIENT_PROXY_H__ */
+#endif /* __CONTEXT_STORE_CLIENT_H__ */
#include <ContextStoreTypesPrivate.h>
#include <ContextStoreService.h>
-#include "ContextStoreClientProxy.h"
+#include "ContextStoreClient.h"
using namespace ctx;
ContextStoreService::ContextStoreService(GDBusConnection* conn) :
- DBusService(conn, CTX_CONTEXT_STORE, CTX_CONTEXT_STORE_SPEC)
+ ServiceBase(conn, CTX_CONTEXT_STORE, CTX_CONTEXT_STORE_SPEC)
{
}
{
}
-ClientProxy* ContextStoreService::createProxy(const std::string& busName)
+ClientBase* ContextStoreService::createClient(const std::string& busName)
{
- return new(std::nothrow) ContextStoreClientProxy(this, busName);
+ return new(std::nothrow) ContextStoreClient(this, busName);
}