// limitations under the License.
//
-
-#include <dpl/log/log.h>
-
#include <CommonsJavaScript/Validator.h>
#include <CommonsJavaScript/Converter.h>
#include <Commons/Exception.h>
#include "SEListenerManager.h"
#include "SEConverter.h"
#include "plugin_config.h"
+#include <Logger.h>
using namespace DeviceAPI::Common;
using namespace WrtDeviceApis::Commons;
ISEServicePtr seService( SEFactory::getInstance().createSEServiceObject() );
priv = new SEServicePrivObject(context, seService);
if(!JSObjectSetPrivate(object, static_cast<void*>(priv))) {
- LogError("Object can't store private data.");
+ LoggerE("Object can't store private data.");
delete priv;
}
} Catch (UnsupportedException) {
- LogError("UnsupportedException: " << _rethrown_exception.GetMessage());
+ LoggerE("UnsupportedException: " << _rethrown_exception.GetMessage());
} Catch (WrtDeviceApis::Commons::UnknownException) {
- LogError("UnknownExceptionException: " << _rethrown_exception.GetMessage());
+ LoggerE("UnknownExceptionException: " << _rethrown_exception.GetMessage());
} Catch (PlatformException) {
- LogError("PlatformExceptionException: " << _rethrown_exception.GetMessage());
+ LoggerE("PlatformExceptionException: " << _rethrown_exception.GetMessage());
} Catch (WrtDeviceApis::Commons::Exception) {
- LogError("Exception: " << _rethrown_exception.GetMessage());
+ LoggerE("Exception: " << _rethrown_exception.GetMessage());
}
}
}
void JSSEService::finalize(JSObjectRef object)
{
- LogDebug( "entered" );
+ LoggerD( "entered" );
SEServicePrivObject *priv = static_cast<SEServicePrivObject*>( JSObjectGetPrivate( object ) ) ;
JSObjectSetPrivate(object, NULL);
- LogDebug("Deleting SEService object");
+ LoggerD("Deleting SEService object");
delete priv;
}
const JSValueRef arguments[],
JSValueRef* exception)
{
- LogDebug("Entered ");
+ LoggerD("Entered ");
AceSecurityStatus status = SECURE_ELEMENT_CHECK_ACCESS(SECUREELEMENT_FUNCTION_API_FUNCS);
TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);
onErrorForCbm = arguments[1];
}
} catch (const BasePlatformException &err) {
- LogError(err.getName() << ": " << err.getMessage());
+ LoggerE(err.getName() << ": " << err.getMessage());
return JSWebAPIException::throwException(context, exception, err);
}
SEServicePrivObject* privateObject = static_cast<SEServicePrivObject*>(JSObjectGetPrivate(thisObject));
if (NULL == privateObject) {
- LogError("private object is null");
+ LoggerE("private object is null");
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, "Type Mismatch");
}
SEAsyncCallbackManagerSingleton::Instance().registerCallbackManager(callbackManager, privateObject->getContext());
return JSValueMakeUndefined(context);
} Catch (ConversionException) {
- LogError("ConversionException");
+ LoggerE("ConversionException");
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, "Type Mismatch");
} Catch (WrtDeviceApis::Commons::UnknownException) {
- LogError("UnknownException: " << _rethrown_exception.GetMessage());
+ LoggerE("UnknownException: " << _rethrown_exception.GetMessage());
} Catch (WrtDeviceApis::Commons::Exception) {
- LogError("Exception: " << _rethrown_exception.GetMessage());
+ LoggerE("Exception: " << _rethrown_exception.GetMessage());
}
callbackManager->callOnError(JSTizenExceptionFactory::makeErrorObject(context, JSTizenException::UNKNOWN_ERROR,"Unknown Error"));
const JSValueRef arguments[],
JSValueRef* exception)
{
- LogDebug("Entered ");
+ LoggerD("Entered ");
AceSecurityStatus status = SECURE_ELEMENT_CHECK_ACCESS(SECUREELEMENT_FUNCTION_API_FUNCS);
TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);
seListener = convert.toSEListener(arguments[0]);
} else {
/* 1st argument must be SEListener. */
- LogError("SEListener must has onSEReady and onSENotReady");
+ LoggerE("SEListener must has onSEReady and onSENotReady");
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, "Type Mismatch");
}
SEServicePrivObject* privateObject = static_cast<SEServicePrivObject*>(JSObjectGetPrivate(thisObject));
if (NULL == privateObject) {
- LogError("private object is null");
+ LoggerE("private object is null");
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, "Type Mismatch");
}
return convert.toJSValueRefLong(static_cast<long>(emitter->getId()));
} Catch (ConversionException) {
- LogError("ConversionException");
+ LoggerE("ConversionException");
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, "Type Mismatch");
} Catch (WrtDeviceApis::Commons::UnknownException) {
- LogError("UnknownException: " << _rethrown_exception.GetMessage());
+ LoggerE("UnknownException: " << _rethrown_exception.GetMessage());
} Catch (WrtDeviceApis::Commons::Exception) {
- LogError("Exception: " << _rethrown_exception.GetMessage());
+ LoggerE("Exception: " << _rethrown_exception.GetMessage());
}
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR,"Unknown Error");
JSValueRef JSSEService::unregisterSEListener(JSContextRef context, JSObjectRef object, JSObjectRef thisObject,
size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception) {
- LogDebug("Enter");
+ LoggerD("Enter");
AceSecurityStatus status = SECURE_ELEMENT_CHECK_ACCESS(SECUREELEMENT_FUNCTION_API_FUNCS);
TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);
SEServicePrivObject* privateObject = static_cast<SEServicePrivObject*>(JSObjectGetPrivate(thisObject));
if (NULL == privateObject) {
- LogError("private object is null");
+ LoggerE("private object is null");
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, "Type Mismatch");
}
return JSValueMakeUndefined(context);
} Catch (ConversionException) {
- LogError("ConversionException");
+ LoggerE("ConversionException");
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, "Type Mismatch");
} Catch (NullPointerException) {
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, "Type Mismatch");
} Catch (WrtDeviceApis::Commons::NotFoundException) {
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::INVALID_VALUES_ERROR, "Not Found ID");
} Catch (WrtDeviceApis::Commons::Exception) {
- LogError("Exception: " << _rethrown_exception.GetMessage());
+ LoggerE("Exception: " << _rethrown_exception.GetMessage());
}
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, "Unknown Error");
}
const JSValueRef arguments[],
JSValueRef* exception)
{
- LogDebug("Entered ");
+ LoggerD("Entered ");
AceSecurityStatus status = SECURE_ELEMENT_CHECK_ACCESS(SECUREELEMENT_FUNCTION_API_FUNCS);
TIZEN_SYNC_ACCESS_HANDLER(status, context, exception);
SEServicePrivObject* privateObject = static_cast<SEServicePrivObject*>(JSObjectGetPrivate(thisObject));
if (NULL == privateObject) {
- LogError("private object is null");
+ LoggerE("private object is null");
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::TYPE_MISMATCH_ERROR, "Type Mismatch");
}
seService->shutdown();
return JSValueMakeUndefined(context);
} Catch (WrtDeviceApis::Commons::UnknownException) {
- LogError("Exception: " << _rethrown_exception.GetMessage());
+ LoggerE("Exception: " << _rethrown_exception.GetMessage());
} Catch (WrtDeviceApis::Commons::Exception) {
- LogError("Exception: " << _rethrown_exception.GetMessage());
+ LoggerE("Exception: " << _rethrown_exception.GetMessage());
}
return JSTizenExceptionFactory::postException(context, exception, JSTizenException::UNKNOWN_ERROR, "Unknown Error");
}