#include <IService.h>
#include <IServiceRunner.h>
+#include <IClient.h>
#include <IMethodCallHandler.h>
namespace ctx {
void onUserActivated();
void onUserDeactivated();
- IMethodCallHandler* createMethodCallHandler();
+ IMethodCallHandler* createMethodCallHandler(IClient* client);
GDBusConnection* getConnection();
{
}
-IMethodCallHandler* SensorRecorderService::createMethodCallHandler()
+IMethodCallHandler* SensorRecorderService::createMethodCallHandler(IClient* client)
{
return NULL;
}
using namespace ctx;
-MethodCallHandler::MethodCallHandler() :
- __caller(NULL)
+MethodCallHandler::MethodCallHandler(IClient* client) :
+ __caller(client)
{
}
{
}
-void MethodCallHandler::setCaller(IClient* client)
-{
- __caller = client;
-}
-
void MethodCallHandler::onMethodCalled(IMethodCall* methodCall)
{
try {
class MethodCallHandler : public IMethodCallHandler {
public:
- MethodCallHandler();
+ MethodCallHandler(IClient* client);
~MethodCallHandler();
- void setCaller(IClient* client);
void onMethodCalled(IMethodCall* methodCall);
void onDisconnected();
{
}
-IMethodCallHandler* SensorRecorderService::createMethodCallHandler()
+IMethodCallHandler* SensorRecorderService::createMethodCallHandler(IClient* client)
{
- return new MethodCallHandler();
+ return new MethodCallHandler(client);
}
GDBusConnection* SensorRecorderService::getConnection()