Replace method registeration with expose interface 70/105570/1 accepted/tizen/3.0/common/20161221.180425 accepted/tizen/3.0/ivi/20161221.005020 accepted/tizen/3.0/mobile/20161221.005108 accepted/tizen/3.0/tv/20161221.004826 accepted/tizen/3.0/wearable/20161221.004859 accepted/tizen/common/20161219.152227 accepted/tizen/ivi/20161219.225515 accepted/tizen/mobile/20161219.225427 accepted/tizen/tv/20161219.225438 accepted/tizen/wearable/20161219.225456 submit/tizen/20161219.072944 submit/tizen_3.0/20161219.020755
authorSungbae Yoo <sungbae.yoo@samsung.com>
Mon, 19 Dec 2016 04:46:58 +0000 (13:46 +0900)
committerSungbae Yoo <sungbae.yoo@samsung.com>
Mon, 19 Dec 2016 04:46:58 +0000 (13:46 +0900)
Change-Id: I5e356d7304f34482fa6a9b42cbf08323175c076c
Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
server/app-proxy.cpp
server/manager.cpp
server/package-proxy.cpp
server/server.cpp

index 75801c1..48b031c 100644 (file)
@@ -49,17 +49,17 @@ int newIteratorId = 0;
 AppProxy::AppProxy(KrateControlContext& ctx) :
        context(ctx)
 {
-       context.registerParametricMethod(this, "", (AppProxy::AppInfo)(AppProxy::getAppInfo)(std::string, std::string));
+       context.expose(this, "", (AppProxy::AppInfo)(AppProxy::getAppInfo)(std::string, std::string));
 
-       context.registerParametricMethod(this, "", (int)(AppProxy::createIterator)(std::string));
-       context.registerParametricMethod(this, "", (AppProxy::AppInfo)(AppProxy::getIteratorValue)(int));
-       context.registerParametricMethod(this, "", (bool)(AppProxy::nextIterator)(int));
-       context.registerParametricMethod(this, "", (int)(AppProxy::destroyIterator)(int));
+       context.expose(this, "", (int)(AppProxy::createIterator)(std::string));
+       context.expose(this, "", (AppProxy::AppInfo)(AppProxy::getIteratorValue)(int));
+       context.expose(this, "", (bool)(AppProxy::nextIterator)(int));
+       context.expose(this, "", (int)(AppProxy::destroyIterator)(int));
 
-       context.registerParametricMethod(this, PRIVILEGE_APP_LAUNCH, (int)(AppProxy::launch)(std::string, AppProxy::Bundle));
-       context.registerParametricMethod(this, PRIVILEGE_APP_LAUNCH, (int)(AppProxy::resume)(std::string, std::string));
-       context.registerParametricMethod(this, PRIVILEGE_APP_KILL, (int)(AppProxy::terminate)(std::string, std::string));
-       context.registerParametricMethod(this, "", (int)(AppProxy::isRunning)(std::string, std::string));
+       context.expose(this, PRIVILEGE_APP_LAUNCH, (int)(AppProxy::launch)(std::string, AppProxy::Bundle));
+       context.expose(this, PRIVILEGE_APP_LAUNCH, (int)(AppProxy::resume)(std::string, std::string));
+       context.expose(this, PRIVILEGE_APP_KILL, (int)(AppProxy::terminate)(std::string, std::string));
+       context.expose(this, "", (int)(AppProxy::isRunning)(std::string, std::string));
 }
 
 AppProxy::~AppProxy()
index 70de04d..93c953c 100644 (file)
@@ -507,13 +507,13 @@ void notiProxyCallback(void *data, notification_type_e type, notification_op *op
 Manager::Manager(KrateControlContext& ctx) :
        context(ctx)
 {
-       context.registerParametricMethod(this, PRIVILEGE_INTERNAL_PLATFORM, (int)(Manager::createKrate)(std::string, std::string));
-       context.registerParametricMethod(this, PRIVILEGE_INTERNAL_PLATFORM, (int)(Manager::removeKrate)(std::string));
-       context.registerParametricMethod(this, PRIVILEGE_INTERNAL_PLATFORM, (int)(Manager::lockKrate)(std::string));
-       context.registerParametricMethod(this, PRIVILEGE_INTERNAL_PLATFORM, (int)(Manager::unlockKrate)(std::string));
-       context.registerParametricMethod(this, "", (int)(Manager::getKrateState)(std::string));
-       context.registerParametricMethod(this, "", (std::vector<std::string>)(Manager::getKrateList)(int));
-       context.registerParametricMethod(this, PRIVILEGE_INTERNAL_PLATFORM, (int)(Manager::resetKratePassword)(std::string, std::string));
+       context.expose(this, PRIVILEGE_INTERNAL_PLATFORM, (int)(Manager::createKrate)(std::string, std::string));
+       context.expose(this, PRIVILEGE_INTERNAL_PLATFORM, (int)(Manager::removeKrate)(std::string));
+       context.expose(this, PRIVILEGE_INTERNAL_PLATFORM, (int)(Manager::lockKrate)(std::string));
+       context.expose(this, PRIVILEGE_INTERNAL_PLATFORM, (int)(Manager::unlockKrate)(std::string));
+       context.expose(this, "", (int)(Manager::getKrateState)(std::string));
+       context.expose(this, "", (std::vector<std::string>)(Manager::getKrateList)(int));
+       context.expose(this, PRIVILEGE_INTERNAL_PLATFORM, (int)(Manager::resetKratePassword)(std::string, std::string));
 
        context.createNotification("Manager::created");
        context.createNotification("Manager::removed");
index 3a5c7e8..15ad13a 100644 (file)
@@ -31,11 +31,11 @@ namespace Krate {
 PackageProxy::PackageProxy(KrateControlContext& ctx) :
        context(ctx)
 {
-       context.registerParametricMethod(this, "", (PackageProxy::PackageInfo)(PackageProxy::getPackageInfo)(std::string, std::string));
-       context.registerParametricMethod(this, "", (std::vector<std::string>)(PackageProxy::getPackageList)(std::string));
+       context.expose(this, "", (PackageProxy::PackageInfo)(PackageProxy::getPackageInfo)(std::string, std::string));
+       context.expose(this, "", (std::vector<std::string>)(PackageProxy::getPackageList)(std::string));
 
-       context.registerParametricMethod(this, PRIVLEGE_PACKAGE_ADMIN, (int)(PackageProxy::install)(std::string, std::string));
-       context.registerParametricMethod(this, PRIVLEGE_PACKAGE_ADMIN, (int)(PackageProxy::uninstall)(std::string, std::string));
+       context.expose(this, PRIVLEGE_PACKAGE_ADMIN, (int)(PackageProxy::install)(std::string, std::string));
+       context.expose(this, PRIVLEGE_PACKAGE_ADMIN, (int)(PackageProxy::uninstall)(std::string, std::string));
 }
 
 PackageProxy::~PackageProxy()
index 227429f..db3af1a 100644 (file)
@@ -43,8 +43,8 @@ Server::Server()
 
        service->setPrivilegeChecker(std::bind(&Server::checkPeerPrivilege, this, _1, _2));
 
-       service->registerParametricMethod(this, "", (runtime::FileDescriptor)(Server::registerNotificationSubscriber)(std::string));
-       service->registerParametricMethod(this, "", (int)(Server::unregisterNotificationSubscriber)(std::string, int));
+       service->expose(this, "", (runtime::FileDescriptor)(Server::registerNotificationSubscriber)(std::string));
+       service->expose(this, "", (int)(Server::unregisterNotificationSubscriber)(std::string, int));
 
        manager.reset(new Krate::Manager(*this));
        appProxy.reset(new Krate::AppProxy(*this));