#include "BoxData.h"
#include "BoxManager.h"
-#define UPDATE_REQUEST_MIN_TIME 60 // seconds
-
BoxManager::BoxManager(IBoxPluginFactoryPtr factory)
: m_boxFactory(factory)
{
continue;
}
box = it->second;
- int interval = requestTime - box->getLastUpdateRequestTime();
- if (interval < UPDATE_REQUEST_MIN_TIME) {
- LogD("this update request is skipped");
- continue;
- }
- // set last request time to new one
box->update(requestTime, contentInfo);
}
static const std::string OPERATION_UPDATE_BOX(
"http://tizen.org/appcontrol/operation/dynamicbox/web/update");
static const std::string CONTENT_INFO_KEY("content-info");
+static const std::string ALARM_CALLER_KEY("__ALARM_MGR_CALLER_APPID");
BoxDaemonImpl::BoxDaemonImpl()
: m_pluginConnector(BoxPluginConnector::create())
char* caller = NULL;
ret = service_get_caller(service, &caller);
if (ret != SERVICE_ERROR_NONE) {
- return false;
+ ret = service_get_extra_data(
+ service, ALARM_CALLER_KEY.c_str(), &caller);
+ if (ret != SERVICE_ERROR_NONE) {
+ LogD("failed to get caller's appid from service");
+ return false;
+ }
}
std::string callerAppId(caller);