#include "JSMessageAttachment.h"
#include "MessageAsyncCallbackManager.h"
#include "MessageListenerManager.h"
+#include "plugin_config.h"
#include <GlobalContextManager.h>
#include <Logger.h>
namespace DeviceAPI {
namespace Messaging {
+using namespace WrtDeviceApis;
+using namespace WrtDeviceApis::Commons;
+
+AceSecurityStatus messagingAceCheckAccessFunction(const char* functionName)
+{
+ return MESSAGING_CHECK_ACCESS(functionName);
+}
+
+DEFINE_GLOBAL_SECURITY_ACCESSOR(gSecurityAccessor);
+
+DEFINE_SECURITY_ACCESSOR_SETTER(AceCheckerMessagingSetter, JSMessagingServiceManagerPriv, gSecurityAccessor);
+
namespace Options{
class_definition_options_t MessagingOptions =
{
JS_CLASS,
CREATE_INSTANCE,
- NONE_NOTICE,
+ ALWAYS_NOTICE,
USE_OVERLAYED, //ignored
+ AceCheckerMessagingSetter,
NULL,
NULL
};
}
-using namespace WrtDeviceApis;
-using namespace WrtDeviceApis::Commons;
-
void on_widget_start_callback(int widgetId) {
LoggerD("[Tizen\\MessagingServiceManager] on_widget_start_callback ("<<widgetId<<")");
Try {
} Catch(Commons::Exception) {
LoggerE("WrtAccess initialization failed");
}
+
+ INITAILIZE_GLOBAL_SECURITY_ACCESSOR(gSecurityAccessor, messagingAceCheckAccessFunction);
}
void on_widget_stop_callback(int widgetId) {
} Catch(Commons::Exception) {
LoggerE("WrtAccess deinitialization failed");
}
+
+ FINALIZE_GLOBAL_SECURITY_ACCESSOR(gSecurityAccessor);
}
void on_frame_load_callback(const void * context)