#include <sys/types.h>
#include <unistd.h>
#include <TimeTracer.h>
+#include <Security.h>
#include "JSApplicationManager.h"
#include "JSApplicationControl.h"
#include "ApplicationAsyncCallbackManager.h"
#include "ApplicationListenerManager.h"
#include "AppManagerWrapper.h"
+#include "plugin_config.h"
#include <Logger.h>
using namespace WrtDeviceApis;
namespace DeviceAPI {
namespace Application {
+AceSecurityStatus applicationAceCheckAccessFunction(const char* functionName)
+{
+ return APPLICATION_CHECK_ACCESS(functionName);
+}
+
+DEFINE_GLOBAL_SECURITY_ACCESSOR(gSecurityAccessor);
+
+DEFINE_SECURITY_ACCESSOR_SETTER(AceCheckerApplicationSetter, ApplicationController, gSecurityAccessor);
+
class_definition_options_t ApplicationOptions =
{
+ JS_CLASS,
+ NONE,
+ ALWAYS_NOTICE,
+ IGNORED,
+ AceCheckerApplicationSetter,
+ NULL,
+ NULL
+};
+
+class_definition_options_t ApplicationConstructorOptions =
+{
JS_INTERFACE,
CREATE_INSTANCE,
NONE_NOTICE,
} Catch(WrtDeviceApis::Commons::Exception) {
LoggerE("WrtAccess initialization failed");
}
+
+ INITAILIZE_GLOBAL_SECURITY_ACCESSOR(gSecurityAccessor, applicationAceCheckAccessFunction);
}
void on_widget_stop_callback(int widgetId) {
} Catch(WrtDeviceApis::Commons::Exception) {
LoggerE("WrtAccess deinitialization failed");
}
+
+ FINALIZE_GLOBAL_SECURITY_ACCESSOR(gSecurityAccessor);
}
void on_frame_load_callback(const void * context)
WRT_JS_EXTENSION_OBJECT_TIZEN,
"application",
(js_class_template_getter)DeviceAPI::Application::JSApplicationManager::getClassRef,
- NULL)
+ &ApplicationOptions)
PLUGIN_CLASS_MAP_ADD_INTERFACE(
WRT_JS_EXTENSION_OBJECT_TIZEN,
TIZEN_INTERFACE_APPLICATION_CONTROL,
(js_class_template_getter)DeviceAPI::Application::JSApplicationControl::getClassRef,
reinterpret_cast<js_class_constructor_cb_t>(JSApplicationControl::constructor),
- &ApplicationOptions)
+ &ApplicationConstructorOptions)
PLUGIN_CLASS_MAP_ADD_INTERFACE(
WRT_JS_EXTENSION_OBJECT_TIZEN,
TIZEN_INTERFACE_APPLICATION_CONTROL_DATA,
(js_class_template_getter)DeviceAPI::Application::JSApplicationControlData::getClassRef,
reinterpret_cast<js_class_constructor_cb_t>(JSApplicationControlData::constructor),
- &ApplicationOptions)
+ &ApplicationConstructorOptions)
PLUGIN_CLASS_MAP_END