#include "JSNFCAdapter.h"
#include "NFCConverter.h"
#include "NFCFactory.h"
-#include "plugin_config.h"
+#include "plugin_config_impl.h"
#include "NFCDefaultAdapter.h"
#include <Logger.h>
LoggerD("Enter");
Try {
- AceSecurityStatus status = NFC_CHECK_ACCESS(NFC_FUNCTION_API_COMMON_FUNCS);
- TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);
-
NFCManagerPrivObject* privateObject = static_cast<NFCManagerPrivObject*>(JSObjectGetPrivate(thisObject));
if (!privateObject) {
LoggerE("private object is null");
ThrowMsg(UnsupportedException, "private object is null");
}
- return JSNFCAdapter::createJSObject(GlobalContextManager::getInstance()->getGlobalContext(context));
+
+ TIZEN_CHECK_ACCESS(context, exception, privateObject,
+ NFC_FUNCTION_API_COMMON_FUNCS);
+
+ return JSNFCAdapter::createJSObject(GlobalContextManager::getInstance()->getGlobalContext(context), privateObject);
} Catch (UnsupportedException) {
LoggerE("UnsupportedException: " << _rethrown_exception.GetMessage());
return JSWebAPIErrorFactory::postException(context, exception, JSWebAPIErrorFactory::NOT_SUPPORTED_ERROR, "Not Supported");
LoggerD("Enter");
Try {
- AceSecurityStatus status = NFC_CHECK_ACCESS(NFC_FUNCTION_API_COMMON_FUNCS);
- TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);
-
- ArgumentValidator validator(context, argumentCount, arguments);
- // mode
- bool mode = validator.toBool(0);
- LoggerD("mode : " << mode);
NFCManagerPrivObject* privateObject = static_cast<NFCManagerPrivObject*>(JSObjectGetPrivate(thisObject));
if (!privateObject) {
LoggerE("private object is null");
throw TypeMismatchException("private object is null");
}
+
+ TIZEN_CHECK_ACCESS(context, exception, privateObject,
+ NFC_FUNCTION_API_COMMON_FUNCS);
+
+ ArgumentValidator validator(context, argumentCount, arguments);
+ // mode
+ bool mode = validator.toBool(0);
+ LoggerD("mode : " << mode);
+
NFCDefaultAdapterSingleton::Instance().setExclusiveMode(mode);
return JSValueMakeUndefined(context);
} Catch (BasePlatformException) {