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()
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");
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()
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));