*/
#include <string>
#include <map>
+#include <ctime>
#include <ewk_context.h>
#include <Plugin/IBoxPluginFactory.h>
#include <Plugin/box_plugin_interface.h>
result = requestChangePeriod(boxInfo->instanceId, boxInfo->period);
break;
case REQUEST_CMD_UPDATE_BOX:
- result = requestUpdateBox(boxInfo->boxId);
+ result = requestUpdateBox(boxInfo->boxId, boxInfo->contentInfo);
break;
default:
LogD("not available request type");
return box->changePeriod(period);
}
-bool BoxManager::requestUpdateBox(std::string& boxId)
+bool BoxManager::requestUpdateBox(std::string& boxId, std::string& contentInfo)
{
LogD("enter");
IBoxPtr box;
box.reset();
+
+ time_t requestTime = time(NULL);
+
for (auto it = m_boxMap.begin(); it != m_boxMap.end(); ++it) {
if (it->first.find(boxId) == std::string::npos) {
continue;
}
box = it->second;
- box->update();
+ box->update(requestTime, contentInfo);
}
return true;