#include <dpl/log/log.h>
#include <Commons/plugin_initializer_def.h>
-#include <Commons/WrtWrapper/WrtWrappersMgr.h>
+#include <Commons/WrtAccess/WrtAccess.h>
#include <Commons/Exception.h>
#include "JSCalendarManager.h"
#include "JSCalendarEvent.h"
namespace Tizen1_0 {
namespace Calendar {
-void on_widget_start_callback(int widgetId,
- JavaScriptContext context,
- const engine_interface_t *interface)
+using namespace WrtDeviceApis;
+using namespace WrtDeviceApis::Commons;
+
+void on_widget_start_callback(int widgetId)
{
LogDebug("[Tizen\\Calendar] on_widget_start_callback (" << widgetId << ")");
+
+ Try {
+ WrtAccessSingleton::Instance().initialize(widgetId);
+ } Catch (Commons::Exception) {
+ LogError("WrtAccess initialization failed");
+ }
}
void on_widget_stop_callback(int widgetId)
{
LogDebug("[Tizen\\Calendar] on_widget_stop_callback (" << widgetId << ")");
+
+ Try {
+ WrtAccessSingleton::Instance().deinitialize(widgetId);
+ } Catch (Commons::Exception) {
+ LogError("WrtAccess deinitialization failed");
+ }
}
PLUGIN_ON_WIDGET_START(on_widget_start_callback)
NULL)
PLUGIN_CLASS_MAP_ADD_CLASS(WRT_JS_EXTENSION_OBJECT_TIZEN,
TIZEN_INTERFACE_CALENDAR_TASK,
- JSCalendarEvent::getClassRef(),
+ JSCalendarTask::getClassRef(),
NULL)
PLUGIN_CLASS_MAP_ADD_CLASS(WRT_JS_EXTENSION_OBJECT_TIZEN,
TIZEN_INTERFACE_CALENDAR_ATTENDEE,