AppWidgetManager::InitSingleton(void)
{
std::unique_ptr<AppWidgetManager> pInst(new (std::nothrow) AppWidgetManager());
- SysTryReturnVoidResult(NID_APP, pInst, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ SysTryReturnVoidResult(NID_SHELL, pInst, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
result r = pInst->Construct();
- SysTryReturnVoidResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_SHELL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
__pTheInstance = pInst.release();
std::atexit(DestroySingleton);
{
SysAssert(__pAppWidgetManagerImpl == null);
- SysLog(NID_APP, "Enter.");
+ SysLog(NID_SHELL, "Enter.");
__pAppWidgetManagerImpl = _AppWidgetManagerImpl::GetInstance();
SysAssertf(__pAppWidgetManagerImpl, "Failed to construct _AppWidgetManagerImpl!!");
- SysLog(NID_APP, "Exit.");
+ SysLog(NID_SHELL, "Exit.");
return E_SUCCESS;
}
AppWidgetPopupProvider::AppWidgetPopupProvider()
{
- SysLog(NID_APP, "");
+ SysLog(NID_SHELL, "");
}
AppWidgetPopupProvider::~AppWidgetPopupProvider()
{
- SysLog(NID_APP, "AppWidgetPopupProvider is destroyed.");
+ SysLog(NID_SHELL, "AppWidgetPopupProvider is destroyed.");
}
result
AppWidgetPopupProvider::Construct(const String& instanceId, double x, double y)
{
__pAppWidgetPopupProviderImpl = new (std::nothrow) _AppWidgetPopupProviderImpl(instanceId, x, y);
- SysTryReturnResult(NID_APP, __pAppWidgetPopupProviderImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY]");
+ SysTryReturnResult(NID_SHELL, __pAppWidgetPopupProviderImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY]");
- SysLog(NID_APP, "AppWidgetPopupProvider is constructed.");
+ SysLog(NID_SHELL, "AppWidgetPopupProvider is constructed.");
return E_SUCCESS;
}
AppWidgetProvider::~AppWidgetProvider()
{
- SysLog(NID_APP, "AppWidgetProvider is destroyed.");
+ SysLog(NID_SHELL, "AppWidgetProvider is destroyed.");
}
result
AppWidgetProvider::Construct(const String& instanceId)
{
__pAppWidgetProviderImpl = new (std::nothrow) _AppWidgetProviderImpl(instanceId);
- SysTryReturnResult(NID_APP, __pAppWidgetProviderImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY]");
+ SysTryReturnResult(NID_SHELL, __pAppWidgetProviderImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY]");
- SysLog(NID_APP, "AppWidgetProvider is constructed.");
+ SysLog(NID_SHELL, "AppWidgetProvider is constructed.");
return E_SUCCESS;
}
AppWidgetProviderManager::~AppWidgetProviderManager()
{
- SysLog(NID_APP, "AppWidgetProviderManager is destroyed.");
+ SysLog(NID_SHELL, "AppWidgetProviderManager is destroyed.");
}
AppWidgetProviderManager*
if( pAppWidgetManager == null)
{
pAppWidgetManager = new (std::nothrow) AppWidgetProviderManager;
- SysTryReturn(NID_APP, pAppWidgetManager, null, E_OUT_OF_MEMORY, "E_OUT_OF_MEMORY" );
+ SysTryReturn(NID_SHELL, pAppWidgetManager, null, E_OUT_OF_MEMORY, "E_OUT_OF_MEMORY" );
result r = pAppWidgetManager->Construct();
-// SysTryReturn(NID_APP, !IsFailed(r), null, r, "[%s] Propagating.", GetErrorMessage(r));
+// SysTryReturn(NID_SHELL, !IsFailed(r), null, r, "[%s] Propagating.", GetErrorMessage(r));
SysAssertf(!IsFailed(r), "Failed to construct AppWidgetProviderManager!!");
}
__pAppWidgetProviderManagerImpl = _AppWidgetProviderManagerImpl::GetInstance();
SysAssertf(__pAppWidgetProviderManagerImpl, "Failed to construct _AppWidgetProviderManagerImpl!!");
- SysLog(NID_APP, "AppWidgetProviderManager instance is constructed.");
+ SysLog(NID_SHELL, "AppWidgetProviderManager instance is constructed.");
return E_SUCCESS;
}
result
AppWidgetProviderManager::RequestUpdate(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Base::String& argument)
{
- SysLog(NID_APP, "Enter.");
+ SysLog(NID_SHELL, "Enter.");
return __pAppWidgetProviderManagerImpl->RequestUpdate(appId, providerName, argument);
}
_AppWidgetManagerImpl::_AppWidgetManagerImpl()
:__pAppWidgetRequestEventListener(null)
{
- SysLog(NID_APP, "");
+ SysLog(NID_SHELL, "");
}
_AppWidgetManagerImpl::~_AppWidgetManagerImpl()
{
- SysLog(NID_APP, "");
+ SysLog(NID_SHELL, "");
livebox_service_fini();
}
if( __pAppWidgetManagerImpl == null)
{
__pAppWidgetManagerImpl = new (std::nothrow)_AppWidgetManagerImpl;
- SysTryReturn(NID_APP, __pAppWidgetManagerImpl, null, E_OUT_OF_MEMORY, "Allocating new _AppWidgetManagerProxy failed.");
+ SysTryReturn(NID_SHELL, __pAppWidgetManagerImpl, null, E_OUT_OF_MEMORY, "Allocating new _AppWidgetManagerProxy failed.");
result r = __pAppWidgetManagerImpl->Construct();
- SysTryReturn(NID_APP, !IsFailed(r), null, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_SHELL, !IsFailed(r), null, r, "[%s] Propagating.", GetErrorMessage(r));
}
return __pAppWidgetManagerImpl;
}
result
_AppWidgetManagerImpl::Construct()
{
- SysLog(NID_APP, "Enter.");
+ SysLog(NID_SHELL, "Enter.");
int ret = livebox_service_init();
- SysTryReturnResult(NID_APP, ret == 0, E_SYSTEM, "[E_SYSTEM] Failed to invoke livebox_service_init, ret (%d)", ret);
+ SysTryReturnResult(NID_SHELL, ret == 0, E_SYSTEM, "[E_SYSTEM] Failed to invoke livebox_service_init, ret (%d)", ret);
- SysLog(NID_APP, "Exit.");
+ SysLog(NID_SHELL, "Exit.");
return E_SUCCESS;
}
// c style callback for livebox_service_get_pkglist
int GetAppWidgetProviderInfoCallback(const char *pPackageId, const char *pProviderId, int is_prime, void *data)
{
- SysLog(NID_APP, "%s, %s", pPackageId, pProviderId);
+ SysLog(NID_SHELL, "%s, %s", pPackageId, pProviderId);
IList* pAppWidgetProviderInfos = static_cast<IList*>(data);
- SysTryReturn(NID_APP, pAppWidgetProviderInfos, 0, E_SYSTEM, "[E_SYSTEM] system error.");
+ SysTryReturn(NID_SHELL, pAppWidgetProviderInfos, 0, E_SYSTEM, "[E_SYSTEM] system error.");
String providerId(pProviderId);
String appId;
_AppWidgetManagerImpl::GetAppWidgetProviderInfoListN()
{
std::unique_ptr<ArrayList> pAppWidgetProviders(new (std::nothrow) ArrayList());
- SysTryReturn(NID_APP, pAppWidgetProviders.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
+ SysTryReturn(NID_SHELL, pAppWidgetProviders.get(), null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
pAppWidgetProviders->Construct();
int ret = livebox_service_get_pkglist(GetAppWidgetProviderInfoCallback, pAppWidgetProviders.get());
if (ret < 0)
{
- SysLog(NID_APP, "Failed to invoke livebox_service_get_pkglist, ret (%d)", ret);
+ SysLog(NID_SHELL, "Failed to invoke livebox_service_get_pkglist, ret (%d)", ret);
}
if (pAppWidgetProviders->GetCount() <= 0)
{
std::unique_ptr<char[]> pPackageId(_StringConverter::CopyToCharArrayN(packageId) );
std::unique_ptr<char[]> pDefaultProviderId(livebox_service_pkgname(pPackageId.get()) );
- SysTryReturn(NID_APP, pDefaultProviderId.get(), null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND]");
+ SysTryReturn(NID_SHELL, pDefaultProviderId.get(), null, E_OBJ_NOT_FOUND, "[E_OBJ_NOT_FOUND]");
String providerId(pDefaultProviderId.get());
String appId;
// c - style callback for shortcut_set_request_cb
int AppWidgetRequestHandlerCallback(const char* providerId, const char* text, int type, const char* content_info, const char* icon, int pid, double period, int allowDuplication, void *data)
{
- SysLog(NID_APP, "Enter");
- SysTryReturn(NID_APP, providerId, 0, E_SYSTEM, "[E_SYSTEM] providerId is null!");
+ SysLog(NID_SHELL, "Enter");
+ SysTryReturn(NID_SHELL, providerId, 0, E_SYSTEM, "[E_SYSTEM] providerId is null!");
_AppWidgetManagerImpl* pAppWidgetManager = static_cast<_AppWidgetManagerImpl*>(data);
- SysTryReturn(NID_APP, pAppWidgetManager, 0, E_SYSTEM, "[E_SYSTEM] pAppWidgetManager is null!");
+ SysTryReturn(NID_SHELL, pAppWidgetManager, 0, E_SYSTEM, "[E_SYSTEM] pAppWidgetManager is null!");
String appId;
String providerName;
_AppWidgetManagerImpl::ExtractAppIdAndProviderName(providerId, appId, providerName);
IAppWidgetRequestListener* pListener = _AppWidgetManagerImpl::GetInstance()->GetAddRequestListener();
- SysTryReturn(NID_APP, pAppWidgetManager, 0, E_SYSTEM, "[E_SYSTEM] pListener is null!");
+ SysTryReturn(NID_SHELL, pAppWidgetManager, 0, E_SYSTEM, "[E_SYSTEM] pListener is null!");
pListener->OnAppWidgetAddRequested(appId, providerName, text, content_info);
return 0;
}
_AppWidgetManagerImpl::SetAppWidgetRequestListener(IAppWidgetRequestListener* pListener)
{
// int ret = shortcut_set_request_cb(AppWidgetRequestHandlerCallback, this );
-// SysTryReturnResult(NID_APP, ret == 0, E_SYSTEM, "failed to shortcut_set_request_cb (%d)", ret);
+// SysTryReturnResult(NID_SHELL, ret == 0, E_SYSTEM, "failed to shortcut_set_request_cb (%d)", ret);
_ShortcutManagerImpl::GetInstance()->SetAppWidgetRequestHandlerCallback(AppWidgetRequestHandlerCallback);
__pAppWidgetRequestEventListener = pListener;
_AppWidgetManagerProxy::_AppWidgetManagerProxy()
: __pIpcClient(null)
{
- SysLog(NID_APP, "");
+ SysLog(NID_SHELL, "");
}
_AppWidgetManagerProxy::~_AppWidgetManagerProxy()
if( __pAppWidgetProxy.get() == null)
{
std::unique_ptr<_AppWidgetManagerProxy> pAppWidgetProxy(new (std::nothrow)_AppWidgetManagerProxy);
- SysTryReturn(NID_APP, pAppWidgetProxy.get(), null, E_OUT_OF_MEMORY, "Allocating new _AppWidgetManagerProxy failed!");
+ SysTryReturn(NID_SHELL, pAppWidgetProxy.get(), null, E_OUT_OF_MEMORY, "Allocating new _AppWidgetManagerProxy failed!");
result r = pAppWidgetProxy->Construct();
- SysTryReturn(NID_APP, !IsFailed(r), null, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_SHELL, !IsFailed(r), null, r, "[%s] Propagating.", GetErrorMessage(r));
__pAppWidgetProxy = std::move(pAppWidgetProxy);
}
result
_AppWidgetManagerProxy::Construct(void)
{
- SysLog(NID_APP, "Enter.");
+ SysLog(NID_SHELL, "Enter.");
__pIpcClient = new (std::nothrow) _IpcClient();
- SysTryReturnResult(NID_APP, __pIpcClient != null, E_OUT_OF_MEMORY, "_IpcClient creation failed.");
+ SysTryReturnResult(NID_SHELL, __pIpcClient != null, E_OUT_OF_MEMORY, "_IpcClient creation failed.");
result r = __pIpcClient->Construct(IPC_SERVER_NAME, this);
- SysTryReturn(NID_APP, !IsFailed(r), r, r, "_IpcClient constructing faliied [%s].", GetErrorMessage(r));
+ SysTryReturn(NID_SHELL, !IsFailed(r), r, r, "_IpcClient constructing faliied [%s].", GetErrorMessage(r));
- SysLog(NID_APP, "Exit.");
+ SysLog(NID_SHELL, "Exit.");
return E_SUCCESS;
}
result
_AppWidgetManagerProxy::RequestUpdate(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Base::String& argument)
{
- SysTryReturnResult(NID_APP, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
- SysLog(NID_APP, "Enter.");
+ SysTryReturnResult(NID_SHELL, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
+ SysLog(NID_SHELL, "Enter.");
// String providerId;
// if( providerName.IsEmpty() == true)
// {
result ret = E_SUCCESS;
std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) AppWidgetManager_RequestUpdate(appId, providerName, argument, &ret));
result r = __pIpcClient->SendRequest(*pMsg.get());
- SysTryReturn(NID_APP, !IsFailed(r), r, r, "SendRequest is failed.");
+ SysTryReturn(NID_SHELL, !IsFailed(r), r, r, "SendRequest is failed.");
return ret;
}
result
_AppWidgetManagerProxy::RequestUpdateInstance(const Tizen::Base::String& instanceId, const Tizen::Base::String& argument)
{
- SysTryReturnResult(NID_APP, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
- SysLog(NID_APP, "Enter.");
+ SysTryReturnResult(NID_SHELL, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
+ SysLog(NID_SHELL, "Enter.");
result ret = E_SUCCESS;
std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) AppWidgetManager_RequestUpdateInstance(instanceId, argument, &ret));
result r = __pIpcClient->SendRequest(*pMsg.get());
- SysTryReturn(NID_APP, !IsFailed(r), r, r, "SendRequest is failed.");
+ SysTryReturn(NID_SHELL, !IsFailed(r), r, r, "SendRequest is failed.");
return ret;
}
result
_AppWidgetManagerProxy::RequestSharedMemoryId(const Tizen::Base::String& instanceId, int width, int height, int& shmId )
{
- SysTryReturnResult(NID_APP, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
+ SysTryReturnResult(NID_SHELL, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) AppWidgetManager_RequestSharedMemoryId(instanceId, width, height, &shmId));
result r = __pIpcClient->SendRequest(*pMsg.get());
- SysTryReturn(NID_APP, !IsFailed(r), r, r, "SendRequest is failed.");
- SysLog(NID_APP, "shmId(%d) is retrieved from appwidget-service", shmId);
+ SysTryReturn(NID_SHELL, !IsFailed(r), r, r, "SendRequest is failed.");
+ SysLog(NID_SHELL, "shmId(%d) is retrieved from appwidget-service", shmId);
return E_SUCCESS;
}
result
_AppWidgetManagerProxy::RequestSharedMemoryIdForPD(const Tizen::Base::String& instanceId, int width, int height, int& shmId )
{
- SysTryReturnResult(NID_APP, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
+ SysTryReturnResult(NID_SHELL, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) AppWidgetManager_RequestSharedMemoryIdForPD(instanceId, width, height, &shmId));
result r = __pIpcClient->SendRequest(*pMsg.get());
- SysTryReturn(NID_APP, !IsFailed(r), r, r, "SendRequest is failed.");
- SysLog(NID_APP, "shmId(%d) is retrieved from appwidget-service", shmId);
+ SysTryReturn(NID_SHELL, !IsFailed(r), r, r, "SendRequest is failed.");
+ SysLog(NID_SHELL, "shmId(%d) is retrieved from appwidget-service", shmId);
return E_SUCCESS;
}
result
_AppWidgetManagerProxy::RequestSyncSharedMemory(const Tizen::Base::String& instanceId, int width, int height)
{
- SysTryReturnResult(NID_APP, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
- SysLog(NID_APP, "");
+ SysTryReturnResult(NID_SHELL, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
+ SysLog(NID_SHELL, "");
result ret = E_FAILURE;
std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) AppWidgetManager_RequestSyncSharedMemory(instanceId, width, height, &ret));
result r = __pIpcClient->SendRequest(*pMsg.get());
- SysTryReturn(NID_APP, !IsFailed(r), r, r, "SendRequest is failed.");
+ SysTryReturn(NID_SHELL, !IsFailed(r), r, r, "SendRequest is failed.");
return E_SUCCESS;
}
result
_AppWidgetManagerProxy::RequestSyncSharedMemoryForPD(const Tizen::Base::String& instanceId)
{
- SysTryReturnResult(NID_APP, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
- SysLog(NID_APP, "");
+ SysTryReturnResult(NID_SHELL, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
+ SysLog(NID_SHELL, "");
result ret = E_FAILURE;
std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) AppWidgetManager_RequestSyncSharedMemoryForPD(instanceId, &ret));
result r = __pIpcClient->SendRequest(*pMsg.get());
- SysTryReturn(NID_APP, !IsFailed(r), r, r, "SendRequest is failed.");
+ SysTryReturn(NID_SHELL, !IsFailed(r), r, r, "SendRequest is failed.");
return E_SUCCESS;
}
result
_AppWidgetManagerProxy::RequestReleaseSharedMemory(const Tizen::Base::String& instanceId)
{
- SysTryReturnResult(NID_APP, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
- SysLog(NID_APP, "");
+ SysTryReturnResult(NID_SHELL, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
+ SysLog(NID_SHELL, "");
result ret = E_FAILURE;
std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) AppWidgetManager_RequestReleaseSharedMemory(instanceId, &ret));
result r = __pIpcClient->SendRequest(*pMsg.get());
- SysTryReturn(NID_APP, !IsFailed(r), r, r, "SendRequest is failed.");
+ SysTryReturn(NID_SHELL, !IsFailed(r), r, r, "SendRequest is failed.");
return E_SUCCESS;
}
result
_AppWidgetManagerProxy::RequestReleaseSharedMemoryForPD(const Tizen::Base::String& instanceId)
{
- SysTryReturnResult(NID_APP, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
- SysLog(NID_APP, "");
+ SysTryReturnResult(NID_SHELL, __pIpcClient != null, E_INVALID_STATE, "__pIpcClient instance must not be null.");
+ SysLog(NID_SHELL, "");
result ret = E_FAILURE;
std::auto_ptr<IPC::Message> pMsg (new (std::nothrow) AppWidgetManager_RequestReleaseSharedMemoryForPD(instanceId, &ret));
result r = __pIpcClient->SendRequest(*pMsg.get());
- SysTryReturn(NID_APP, !IsFailed(r), r, r, "SendRequest is failed.");
+ SysTryReturn(NID_SHELL, !IsFailed(r), r, r, "SendRequest is failed.");
return E_SUCCESS;
}
void
_AppWidgetManagerProxy::OnIpcResponseReceived(_IpcClient& client, const IPC::Message& message)
{
- SysLog(NID_APP, "Enter.");
+ SysLog(NID_SHELL, "Enter.");
IPC_BEGIN_MESSAGE_MAP(_AppWidgetManagerProxy, message)
IPC_MESSAGE_HANDLER_EX(AppWidgetManager_SendTouchEvent, &client, OnTouchEventReceived )
IPC_MESSAGE_HANDLER_EX(AppWidgetManager_SendTouchEventForPD, &client, OnTouchEventReceivedForPD )
IPC_END_MESSAGE_MAP()
- SysLog(NID_APP, "Exit.");
+ SysLog(NID_SHELL, "Exit.");
}
}} // Tizen::Shell
}
_AppWidgetPopupImpl* pAppWidgetPopupImpl = _AppWidgetPopupImpl::GetInstance(*pAppWidgetPopup);
- SysTryReturnResult(NID_APP, pAppWidgetPopupImpl, E_INVALID_OPERATION, "Not-yet constructed! AppWidgetPopup::Construct() should be called before use.");
+ SysTryReturnResult(NID_SHELL, pAppWidgetPopupImpl, E_INVALID_OPERATION, "Not-yet constructed! AppWidgetPopup::Construct() should be called before use.");
pAppWidgetPopupImpl->SetAnchorPosition(FloatPoint(__x, __y));
pAppWidgetPopupImpl->SetProviderId(GetInstanceId());
_AppWidgetFrameImpl* pAppWidgetFrameImpl = _AppWidgetFrameImpl::GetInstance(*pAppWidgetFrame);
// SysAssertf(pAppWidgetFrameImpl != null, "Not-yet constructed! Construct() should be called before use.");
- SysTryReturnResult(NID_APP, pAppWidgetFrameImpl, E_INVALID_OPERATION, "Not-yet constructed! AppWidgetFrame::Construct() should be called before use.");
+ SysTryReturnResult(NID_SHELL, pAppWidgetFrameImpl, E_INVALID_OPERATION, "Not-yet constructed! AppWidgetFrame::Construct() should be called before use.");
result r = pAppWidgetFrameImpl->SetProviderId(GetInstanceId());
- SysTryReturnResult(NID_APP, !IsFailed(r), E_SYSTEM, "Failed to invoke _AppWidgetFrameImpl::SetProviderId.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_SYSTEM, "Failed to invoke _AppWidgetFrameImpl::SetProviderId.");
return E_SUCCESS;
}
__displayName = livebox_service_i18n_name(pProviderId.get(), null);
__configurationAppControlAppId = livebox_service_setup_appid(pProviderId.get());
- SysLog(NID_APP, "appId(%ls), name(%ls), providerId(%ls), displayName(%ls), configuration(%ls)", appId.GetPointer(), name.GetPointer(), __providerId.GetPointer(), __displayName.GetPointer(), __configurationAppControlAppId.GetPointer() );
+ SysLog(NID_SHELL, "appId(%ls), name(%ls), providerId(%ls), displayName(%ls), configuration(%ls)", appId.GetPointer(), name.GetPointer(), __providerId.GetPointer(), __displayName.GetPointer(), __configurationAppControlAppId.GetPointer() );
}
/*_AppWidgetProviderInfoImpl::_AppWidgetProviderInfoImpl(const _AppWidgetProviderInfoImpl& rhs)
std::unique_ptr<char[]> pPackageId(_StringConverter::CopyToCharArrayN(__providerId));
livebox_service_get_supported_sizes(pPackageId.get(), &supportedSizeCount , widthArray, heightArray);
- SysTryReturn(NID_APP, supportedSizeCount > 0, null, E_INVALID_ARG, "[E_INVALID_ARG] There is no appwidget of provider(%ls)",__providerId.GetPointer() );
+ SysTryReturn(NID_SHELL, supportedSizeCount > 0, null, E_INVALID_ARG, "[E_INVALID_ARG] There is no appwidget of provider(%ls)",__providerId.GetPointer() );
std::unique_ptr<ArrayList> pSizes(new (std::nothrow) ArrayList);
- SysTryReturn(NID_APP, pSizes, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory for ArrayList." );
+ SysTryReturn(NID_SHELL, pSizes, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory for ArrayList." );
pSizes->Construct();
FloatDimension size(0, 0);
size.SetSize(widthArray[i], heightArray[i]);
previewImagePath = livebox_service_preview(pPackageId.get(), livebox_service_size_type(static_cast<int>(size.width), static_cast<int>(size.height) ) );
std::unique_ptr<AppWidgetSizeInfo> pAppWidgetSizeInfo(_AppWidgetSizeInfoImpl::CreateAppWidgetSizeInfo(size, previewImagePath) );
- SysTryReturn(NID_APP, pAppWidgetSizeInfo, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory for AppWidgetSizeInfo." );
+ SysTryReturn(NID_SHELL, pAppWidgetSizeInfo, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory for AppWidgetSizeInfo." );
pSizes->Add( *pAppWidgetSizeInfo.release() );
}
return pSizes.release();
_AppWidgetProviderInfoImpl::GetAppWidgetProviderInfoN(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, bool isDefault)
{
AppWidgetProviderInfo* pInfo = new (std::nothrow) AppWidgetProviderInfo(appId, providerName);
- SysTryReturn(NID_APP, pInfo, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory for AppWidgetProviderInfo." );
+ SysTryReturn(NID_SHELL, pInfo, null, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Failed to allocate memory for AppWidgetProviderInfo." );
_AppWidgetProviderInfoImpl::GetImpl(*pInfo)->__isDefault = isDefault;
,__pAppWidgetPopupProvider(null)
,__AppWidgetPopupTouchEventListener(null)
{
- SysLog(NID_APP, "");
+ SysLog(NID_SHELL, "");
}
_AppWidgetProviderManagerImpl::~_AppWidgetProviderManagerImpl()
{
- SysLog(NID_APP, "");
+ SysLog(NID_SHELL, "");
}
if( __pAppWidgetManagerImpl == null)
{
__pAppWidgetManagerImpl = new (std::nothrow)_AppWidgetProviderManagerImpl;
- SysTryReturn(NID_APP, __pAppWidgetManagerImpl, null, E_OUT_OF_MEMORY, "Allocating new _AppWidgetManagerProxy failed.");
+ SysTryReturn(NID_SHELL, __pAppWidgetManagerImpl, null, E_OUT_OF_MEMORY, "Allocating new _AppWidgetManagerProxy failed.");
result r = __pAppWidgetManagerImpl->Construct();
- SysTryReturn(NID_APP, !IsFailed(r), null, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_SHELL, !IsFailed(r), null, r, "[%s] Propagating.", GetErrorMessage(r));
}
return __pAppWidgetManagerImpl;
}
result
_AppWidgetProviderManagerImpl::Construct()
{
- SysLog(NID_APP, "Enter.");
+ SysLog(NID_SHELL, "Enter.");
__appwidgetProviders.Construct();
__touchEventListeners.Construct();
Tizen::App::_AppImpl::GetInstance()->SetAppControlProviderInternalEventListener(this);
- SysLog(NID_APP, "Exit.");
+ SysLog(NID_SHELL, "Exit.");
return E_SUCCESS;
}
_AppWidgetProviderManagerImpl::SetAppWidgetProviderFactory(IAppWidgetProviderFactory& factory)
{
result r = ValidateApplicationAttributeForAppWidget();
- SysTryReturnResult(NID_APP, !IsFailed(r), E_INVALID_OPERATION, "This application can't export AppWidget provider.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_INVALID_OPERATION, "This application can't export AppWidget provider.");
__pAppWidgetFactory = &factory;
return E_SUCCESS;
_AppWidgetProviderManagerImpl::ValidateApplicationAttributeForAppWidget(void)
{
HashMapT<String, _AppFeatureInfoImpl*>* pInfo = _PackageManagerImpl::GetInstance()->GetPackageAppFeatureMapN(_AppInfo::GetPackageId(), _AppInfo::GetAppExecutableName());
- SysTryReturnResult(NID_APP, pInfo, E_SYSTEM, "Failed to invoke _PackageManagerImpl::GetPackageAppFeatureMapN()");
+ SysTryReturnResult(NID_SHELL, pInfo, E_SYSTEM, "Failed to invoke _PackageManagerImpl::GetPackageAppFeatureMapN()");
_AppFeatureInfoImpl* pFeature = null;
result r = pInfo->GetValue(USE_UI_KEY, pFeature);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_INVALID_OPERATION, "Can't find %ls attribute for the ServiceApp in package information.", USE_UI_KEY );
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_INVALID_OPERATION, "Can't find %ls attribute for the ServiceApp in package information.", USE_UI_KEY );
const String& useUi = pFeature->GetValue();
- SysTryReturnResult(NID_APP, useUi == USE_UI_VAL_TRUE, E_INVALID_OPERATION, "%ls attribute value should be '%ls' to be an application that providing AppWidget, but value is %ls", USE_UI_KEY, USE_UI_VAL_TRUE, useUi.GetPointer() );
+ SysTryReturnResult(NID_SHELL, useUi == USE_UI_VAL_TRUE, E_INVALID_OPERATION, "%ls attribute value should be '%ls' to be an application that providing AppWidget, but value is %ls", USE_UI_KEY, USE_UI_VAL_TRUE, useUi.GetPointer() );
r = pInfo->GetValue(LIFE_DURATION_KEY, pFeature);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_INVALID_OPERATION, "Can't find %ls attribute for the ServiceApp in package information.", LIFE_DURATION_KEY );
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_INVALID_OPERATION, "Can't find %ls attribute for the ServiceApp in package information.", LIFE_DURATION_KEY );
const String& lifeDurationValue = pFeature->GetValue();
int lifeDuration = 0;
r = Tizen::Base::Integer::Parse(lifeDurationValue, lifeDuration);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_INVALID_OPERATION, "Failed to parse %ls attribute for the ServiceApp in package information.", LIFE_DURATION_KEY );
-// SysTryReturnResult(NID_APP, lifeDuration <= LIFE_DURATION_MIN, E_INVALID_OPERATION, "%ls attribute value should be less than '%d' to be an application that providing AppWidget, but value is %d", LIFE_DURATION_KEY, LIFE_DURATION_MIN, lifeDuration );
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_INVALID_OPERATION, "Failed to parse %ls attribute for the ServiceApp in package information.", LIFE_DURATION_KEY );
+// SysTryReturnResult(NID_SHELL, lifeDuration <= LIFE_DURATION_MIN, E_INVALID_OPERATION, "%ls attribute value should be less than '%d' to be an application that providing AppWidget, but value is %d", LIFE_DURATION_KEY, LIFE_DURATION_MIN, lifeDuration );
return E_SUCCESS;
}
_AppWidgetProviderManagerImpl::SetAppWidgetPopupProviderFactory(IAppWidgetPopupProviderFactory& factory)
{
result r = ValidateApplicationAttributeForAppWidget();
- SysTryReturnResult(NID_APP, !IsFailed(r), E_INVALID_OPERATION, "This application can't export AppWidget provider.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_INVALID_OPERATION, "This application can't export AppWidget provider.");
__pAppWidgetPopupProviderFactory = &factory;
return E_SUCCESS;
_AppWidgetProviderManagerImpl::RequestUpdate(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Base::String& argument)
{
- SysLog(NID_APP, "Enter.");
+ SysLog(NID_SHELL, "Enter.");
// if( appId == App::App::GetInstance()->GetAppId())
// {
// //TODO: optimizing for local request
// else
{
_AppWidgetManagerProxy* pProxy = _AppWidgetManagerProxy::GetInstance();
- SysTryReturnResult(NID_APP, pProxy, E_SYSTEM, "Failed to get proxy instance!");
+ SysTryReturnResult(NID_SHELL, pProxy, E_SYSTEM, "Failed to get proxy instance!");
return pProxy->RequestUpdate(appId, providerName, argument);
}
__appwidgetProviders.GetValue(instanceId, pAppWidgetProvider);
AppWidgetFrame* pAppWidgetFrame = pAppWidgetProvider->GetAppWidgetFrame();
- SysTryReturnResult(NID_APP, pAppWidgetFrame, E_SYSTEM, "Failed to GetAppWidgetFrame");
+ SysTryReturnResult(NID_SHELL, pAppWidgetFrame, E_SYSTEM, "Failed to GetAppWidgetFrame");
pAppWidgetProvider->OnAppWidgetProviderUpdating(argument);
}
else
{
_AppWidgetManagerProxy* pProxy = _AppWidgetManagerProxy::GetInstance();
- SysTryReturnResult(NID_APP, pProxy, E_SYSTEM, "Failed to get proxy instance!");
+ SysTryReturnResult(NID_SHELL, pProxy, E_SYSTEM, "Failed to get proxy instance!");
return pProxy->RequestUpdateInstance(instanceId, argument);
}
{
if( ret != 0)
{
- SysLog(NID_APP, "Error.(%d)", ret);
+ SysLog(NID_SHELL, "Error.(%d)", ret);
}
return 0;
_AppWidgetProviderManagerImpl::AddAppWidget(const Tizen::App::AppId& providerAppId, const Tizen::Base::String& providerName, const Tizen::Base::String& text, const Tizen::Base::String& userInfo)
{
result r = _AccessController::CheckUserPrivilege(_PRV_SHORTCUT_INSTALL);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
- SysTryReturnResult(NID_APP, providerAppId.IsEmpty()==false, E_INVALID_ARG, "The providerAppId is empty.");
- SysTryReturnResult(NID_APP, providerAppId.GetLength() < NATIVE_APP_MAX_APPID_LENGTH, E_INVALID_ARG, "The providerAppId is too long (Maximum %d bytes).", NATIVE_APP_MAX_APPID_LENGTH);
- SysTryReturnResult(NID_APP, Tizen::App::_Aul::IsInstalled(providerAppId) == true, E_APP_NOT_INSTALLED, "The application(%ls) is not installed.", providerAppId.GetPointer());
+ SysTryReturnResult(NID_SHELL, providerAppId.IsEmpty()==false, E_INVALID_ARG, "The providerAppId is empty.");
+ SysTryReturnResult(NID_SHELL, providerAppId.GetLength() < NATIVE_APP_MAX_APPID_LENGTH, E_INVALID_ARG, "The providerAppId is too long (Maximum %d bytes).", NATIVE_APP_MAX_APPID_LENGTH);
+ SysTryReturnResult(NID_SHELL, Tizen::App::_Aul::IsInstalled(providerAppId) == true, E_APP_NOT_INSTALLED, "The application(%ls) is not installed.", providerAppId.GetPointer());
String providerId;
if( providerAppId.StartsWith(L"com.samsung", 0) == true )
{
- SysLog(NID_APP, "[E_INVALID_OPERATION] but allowed to test");
+ SysLog(NID_SHELL, "[E_INVALID_OPERATION] but allowed to test");
//TODO:return E_INVALID_OPERATION
providerId = providerAppId;
}
String appwidgetProviderPackageId = _PackageManagerImpl::GetPackageIdByAppId(providerAppId);
if( localPackageId != appwidgetProviderPackageId)
{
- SysLog(NID_APP, "[E_INVALID_OPERATION] but allowed to test");
+ SysLog(NID_SHELL, "[E_INVALID_OPERATION] but allowed to test");
//TODO:return E_INVALID_OPERATION
}
providerId = providerAppId + "." + providerName;
}
PackageAppInfo* pPackageInfo = _PackageManagerImpl::GetInstance()->GetPackageAppInfoN(providerAppId);
- SysTryReturn(NID_APP, pPackageInfo != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_SHELL, pPackageInfo != null, GetLastResult(), GetLastResult(), "[%s] Propagating.", GetErrorMessage(r));
String iconPath = pPackageInfo->GetAppMenuIconPath();
delete pPackageInfo;
std::unique_ptr<char[]> pIcon(_StringConverter::CopyToCharArrayN(iconPath));
int ret = add_to_home_livebox(pProviderId.get(), pName.get(), LIVEBOX_TYPE_DEFAULT, pContent.get(), pIcon.get(), -1.0l, true, AddAppWidgetCallback, this);
- SysTryReturnResult(NID_APP, ret != -ENOTCONN, E_CONNECTION_FAILED, "[E_CONNECTION_FAILED] failed to add_to_home_livebox");
- SysTryReturnResult(NID_APP, ret == 0, E_SYSTEM, "[E_SYSTEM] failed to add_to_home_livebox (%s)", strerror(r));
+ SysTryReturnResult(NID_SHELL, ret != -ENOTCONN, E_CONNECTION_FAILED, "[E_CONNECTION_FAILED] failed to add_to_home_livebox");
+ SysTryReturnResult(NID_SHELL, ret == 0, E_SYSTEM, "[E_SYSTEM] failed to add_to_home_livebox (%s)", strerror(r));
return E_SUCCESS;
}
// __messageReceived = true;
- SysLog(NID_APP, "operationId(%ls), argc(%d)", operationId.GetPointer(), pArgs->GetCount());
+ SysLog(NID_SHELL, "operationId(%ls), argc(%d)", operationId.GetPointer(), pArgs->GetCount());
const String* pInstanceId = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_INSTANCE_ID));
- SysTryReturnVoidResult(NID_APP, pInstanceId, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_INSTANCE_ID.GetPointer() );
+ SysTryReturnVoidResult(NID_SHELL, pInstanceId, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_INSTANCE_ID.GetPointer() );
const String* pName = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_PROVIDER_NAME));
- SysTryReturnVoidResult(NID_APP, pName, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_PROVIDER_NAME.GetPointer() );
+ SysTryReturnVoidResult(NID_SHELL, pName, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_PROVIDER_NAME.GetPointer() );
const String* pParam = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_USER_INFO));
- SysTryReturnVoidResult(NID_APP, pParam, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_USER_INFO.GetPointer() );
+ SysTryReturnVoidResult(NID_SHELL, pParam, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_USER_INFO.GetPointer() );
- SysLog(NID_APP, "id(%ls), name(%ls), param(%ls)", pInstanceId->GetPointer(), pName->GetPointer(), pParam->GetPointer());
+ SysLog(NID_SHELL, "id(%ls), name(%ls), param(%ls)", pInstanceId->GetPointer(), pName->GetPointer(), pParam->GetPointer());
if(operationId.StartsWith(APPWIDGET_POPUP_PREFIX, 0) == true)
{
- SysTryReturnVoidResult(NID_APP, __pAppWidgetPopupProviderFactory, E_FAILURE, "[E_FAILURE] __pAppWidgetPopupProviderFactory is null");
+ SysTryReturnVoidResult(NID_SHELL, __pAppWidgetPopupProviderFactory, E_FAILURE, "[E_FAILURE] __pAppWidgetPopupProviderFactory is null");
HandleAppWidgetPopupRequest(operationId, pArgs);
}
else
{
if(this->ContainsAppWidget(*pInstanceId) == false)
{
- SysLog(NID_APP, "no appwidget instance, creating..");
+ SysLog(NID_SHELL, "no appwidget instance, creating..");
int width = 0;
const String* pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_WIDTH));
- SysTryReturnVoidResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_WIDTH.GetPointer() );
+ SysTryReturnVoidResult(NID_SHELL, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_WIDTH.GetPointer() );
Integer::Parse(*pValue, width);
int height = 0;
pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_HEIGHT));
- SysTryReturnVoidResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_HEIGHT.GetPointer() );
+ SysTryReturnVoidResult(NID_SHELL, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_HEIGHT.GetPointer() );
Integer::Parse(*pValue, height);
this->CreateAppWidget( *pName, *pInstanceId, width, height, *pParam);
if(operationId == APPWIDGET_ON_RESIZE)
{
- SysLog(NID_APP, "operation is resize, but appwidget is already recreated with new size, so OnSize won't be called.");
+ SysLog(NID_SHELL, "operation is resize, but appwidget is already recreated with new size, so OnSize won't be called.");
return;
}
}
- SysTryReturnVoidResult(NID_APP, __pAppWidgetFactory, E_FAILURE, "[E_FAILURE] __pAppWidgetFactory is null");
+ SysTryReturnVoidResult(NID_SHELL, __pAppWidgetFactory, E_FAILURE, "[E_FAILURE] __pAppWidgetFactory is null");
HandleAppWidgetRequest(operationId, pArgs);
}
- SysLog(NID_APP, "Exit");
+ SysLog(NID_SHELL, "Exit");
}
result
return E_SYSTEM;
}
- SysLog(NID_APP, "operationId(%ls), argc(%d)", operationId.GetPointer(), pArgs->GetCount());
+ SysLog(NID_SHELL, "operationId(%ls), argc(%d)", operationId.GetPointer(), pArgs->GetCount());
const String* pInstanceId = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_INSTANCE_ID));
- SysTryReturnResult(NID_APP, pInstanceId, E_FAILURE, "[E_FAILURE] pId is null.");
+ SysTryReturnResult(NID_SHELL, pInstanceId, E_FAILURE, "[E_FAILURE] pId is null.");
/*String *pName = dynamic_cast<String*>(pArgs->GetAt(1));
- SysTryReturnResult(NID_APP, pInstanceId, E_FAILURE, "[E_FAILURE] pName is null");
+ SysTryReturnResult(NID_SHELL, pInstanceId, E_FAILURE, "[E_FAILURE] pName is null");
String *pParam = dynamic_cast<String*>(pArgs->GetAt(2));
- SysTryReturnResult(NID_APP, pParam, E_FAILURE, "[E_FAILURE] pName is null");
+ SysTryReturnResult(NID_SHELL, pParam, E_FAILURE, "[E_FAILURE] pName is null");
- SysLog(NID_APP, "id(%ls), name(%d)", pInstanceId->GetPointer(), pName->GetPointer());*/
+ SysLog(NID_SHELL, "id(%ls), name(%d)", pInstanceId->GetPointer(), pName->GetPointer());*/
/*if( operationId == APPWIDGET_ON_ADD )
{
int w = 0;
int h = 0;
String* pValue = dynamic_cast<String*>(pArgs->GetAt(2));
- SysTryReturnResult(NID_APP, pValue, E_FAILURE, "[E_FAILURE]");
+ SysTryReturnResult(NID_SHELL, pValue, E_FAILURE, "[E_FAILURE]");
Integer::Parse(*pValue, w);
pValue = dynamic_cast<String*>(pArgs->GetAt(3));
- SysTryReturnResult(NID_APP, pValue, E_FAILURE, "[E_FAILURE]");
+ SysTryReturnResult(NID_SHELL, pValue, E_FAILURE, "[E_FAILURE]");
Integer::Parse(*pValue, h);
this->__pAppWidgetEventListener->OnAppWidgetAdded(*pId, width, height, pArgs);
int width = 0;
int height = 0;
const String* pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_WIDTH));
- SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_WIDTH.GetPointer() );
+ SysTryReturnResult(NID_SHELL, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_WIDTH.GetPointer() );
Integer::Parse(*pValue, width);
pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_HEIGHT));
- SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_HEIGHT.GetPointer() );
+ SysTryReturnResult(NID_SHELL, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_HEIGHT.GetPointer() );
Integer::Parse(*pValue, height);
this->ResizeAppWidget(*pInstanceId, width, height);
int width = 0;
int height = 0;
const String* pValue = dynamic_cast<const String*>( pArgs->GetValue(ARG_KEY_WIDTH));
- SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_WIDTH.GetPointer() );
+ SysTryReturnResult(NID_SHELL, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_WIDTH.GetPointer() );
Integer::Parse(*pValue, width);
pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_HEIGHT));
- SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_HEIGHT.GetPointer() );
+ SysTryReturnResult(NID_SHELL, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_HEIGHT.GetPointer() );
Integer::Parse(*pValue, height);
pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_ARGUMENT));
- SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_ARGUMENT.GetPointer() );
+ SysTryReturnResult(NID_SHELL, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_ARGUMENT.GetPointer() );
this->UpdateAppWidget(*pInstanceId, width, height, *pValue);
}
}
else if (operationId == APPWIDGET_ON_TOUCH)
{
- SysLog(NID_APP, "[APPWIDGET_ON_TOUCH] touch events will be delivered after provider is initialized");
+ SysLog(NID_SHELL, "[APPWIDGET_ON_TOUCH] touch events will be delivered after provider is initialized");
// int eventType = 0;
// double timeStamp = 0.0f;
// double x = 0.0f;
// double y = 0.0f;
// const String* pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_EVENT_TYPE));
-// SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_EVENT_TYPE.GetPointer() );
+// SysTryReturnResult(NID_SHELL, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_EVENT_TYPE.GetPointer() );
// Integer::Parse(*pValue, eventType);
//
// pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_TIME_STAMP));
-// SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_TIME_STAMP.GetPointer() );
+// SysTryReturnResult(NID_SHELL, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_TIME_STAMP.GetPointer() );
// Double::Parse(*pValue, timeStamp);
//
// pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_X));
-// SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_X.GetPointer() );
+// SysTryReturnResult(NID_SHELL, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_X.GetPointer() );
// Double::Parse(*pValue, x);
//
// pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_Y));
-// SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_Y.GetPointer() );
+// SysTryReturnResult(NID_SHELL, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_Y.GetPointer() );
// Double::Parse(*pValue, y);
//
// this->ForwardTouchEvent(*pInstanceId, eventType, timeStamp, x, y);
}
- SysLog(NID_APP, "Exit");
+ SysLog(NID_SHELL, "Exit");
return E_SUCCESS;
}
result
_AppWidgetProviderManagerImpl::HandleAppWidgetPopupRequest(const Tizen::Base::String& operationId, const Tizen::Base::Collection::IMap* pArgs)
{
- SysTryReturnResult(NID_APP, __pAppWidgetPopupProviderFactory, E_FAILURE, "[E_FAILURE] __pAppWidgetPopupProviderFactory is null");
+ SysTryReturnResult(NID_SHELL, __pAppWidgetPopupProviderFactory, E_FAILURE, "[E_FAILURE] __pAppWidgetPopupProviderFactory is null");
if( pArgs == null || pArgs->GetCount() < 3)
{
SysAssertf(pArgs, "[E_SYSTEN] pArgs should not be null.");
}
const String* pInstanceId = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_INSTANCE_ID));
- SysTryReturnResult(NID_APP, pInstanceId, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_INSTANCE_ID.GetPointer() );
+ SysTryReturnResult(NID_SHELL, pInstanceId, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_INSTANCE_ID.GetPointer() );
if (operationId == APPWIDGET_POPUP_ON_CREATE)
{
int height = 0;
const String* pName = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_PROVIDER_NAME));
- SysTryReturnResult(NID_APP, pName, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_PROVIDER_NAME.GetPointer() );
+ SysTryReturnResult(NID_SHELL, pName, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_PROVIDER_NAME.GetPointer() );
const String* pUserInfo = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_USER_INFO));
- SysTryReturnResult(NID_APP, pUserInfo, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_USER_INFO.GetPointer() );
+ SysTryReturnResult(NID_SHELL, pUserInfo, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_USER_INFO.GetPointer() );
const String* pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_X));
- SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_X.GetPointer() );
+ SysTryReturnResult(NID_SHELL, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_X.GetPointer() );
Double::Parse(*pValue, x);
pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_Y));;
- SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_Y.GetPointer() );
+ SysTryReturnResult(NID_SHELL, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_Y.GetPointer() );
Double::Parse(*pValue, y);
pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_WIDTH));
- SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_WIDTH.GetPointer() );
+ SysTryReturnResult(NID_SHELL, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_WIDTH.GetPointer() );
Integer::Parse(*pValue, width);
pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_HEIGHT));;
- SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_HEIGHT.GetPointer() );
+ SysTryReturnResult(NID_SHELL, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_HEIGHT.GetPointer() );
Integer::Parse(*pValue, height);
this->CreateAppWidgetPopupProvider(*pInstanceId, *pName, *pUserInfo, x, y, width, height);
// double y = 0.0f;
//
// const String* pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_EVENT_TYPE));
-// SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_EVENT_TYPE.GetPointer() );
+// SysTryReturnResult(NID_SHELL, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_EVENT_TYPE.GetPointer() );
// Integer::Parse(*pValue, eventType);
//
// pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_TIME_STAMP));
-// SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_TIME_STAMP.GetPointer() );
+// SysTryReturnResult(NID_SHELL, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_TIME_STAMP.GetPointer() );
// Double::Parse(*pValue, timeStamp);
//
// pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_X));
-// SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_X.GetPointer() );
+// SysTryReturnResult(NID_SHELL, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_X.GetPointer() );
// Double::Parse(*pValue, x);
//
// pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_Y));
-// SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_Y.GetPointer() );
+// SysTryReturnResult(NID_SHELL, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_Y.GetPointer() );
// Double::Parse(*pValue, y);
//
// ForwardTouchEventForPD(*pInstanceId, eventType, timeStamp, x, y);
}
else
{
- SysLog(NID_APP, "unexpected case(%ls)", operationId.GetPointer() );
+ SysLog(NID_SHELL, "unexpected case(%ls)", operationId.GetPointer() );
}
return E_SUCCESS;
result
_AppWidgetProviderManagerImpl::CreateAppWidget(const String& name, const String& instanceId, int width, int height, const String& userInfo)
{
- SysLog(NID_APP, "instanceId(%ls), w:%d, h:%d, userInfo:%ls", instanceId.GetPointer(), width, height, userInfo.GetPointer());
- SysTryReturnResult(NID_APP, __pAppWidgetFactory, E_FAILURE, "[E_INVALID_OPERATION] __pAppWidgetFactory should not be null");
+ SysLog(NID_SHELL, "instanceId(%ls), w:%d, h:%d, userInfo:%ls", instanceId.GetPointer(), width, height, userInfo.GetPointer());
+ SysTryReturnResult(NID_SHELL, __pAppWidgetFactory, E_FAILURE, "[E_INVALID_OPERATION] __pAppWidgetFactory should not be null");
if( ContainsAppWidget(instanceId))
{
- SysLog(NID_APP, "CreateAppWidget invoke is duplicated!!");
+ SysLog(NID_SHELL, "CreateAppWidget invoke is duplicated!!");
RemoveAppWidget(instanceId, false);
}
AppWidgetProvider* pAppWidget = __pAppWidgetFactory->CreateInstance(name, width, height, userInfo);
- SysTryReturnResult(NID_APP, pAppWidget, E_INVALID_OPERATION, "[E_INVALID_OPERATION]");
+ SysTryReturnResult(NID_SHELL, pAppWidget, E_INVALID_OPERATION, "[E_INVALID_OPERATION]");
pAppWidget->Construct(instanceId);
__appwidgetProviders.Add(instanceId, pAppWidget);
pAppWidget->OnAppWidgetProviderInitializing(width, height, userInfo);
- SysTryReturnResult(NID_APP, pAppWidget->GetAppWidgetFrame(), E_INVALID_OPERATION, "[E_INVALID_OPERATION]");
+ SysTryReturnResult(NID_SHELL, pAppWidget->GetAppWidgetFrame(), E_INVALID_OPERATION, "[E_INVALID_OPERATION]");
return E_SUCCESS;
}
result
_AppWidgetProviderManagerImpl::UpdateAppWidget(const String& instanceId, int width, int height, const String& argument)
{
- SysLog(NID_APP, "instanceId(%ls), w:%d, h:%d, argument:%ls", instanceId.GetPointer(), width, height, argument.GetPointer() );
+ SysLog(NID_SHELL, "instanceId(%ls), w:%d, h:%d, argument:%ls", instanceId.GetPointer(), width, height, argument.GetPointer() );
AppWidgetProvider* pAppWidget = null;
__appwidgetProviders.GetValue(instanceId, pAppWidget);
- SysTryReturnResult(NID_APP, pAppWidget, E_SYSTEM, "Can't find the AppWidget provider");
+ SysTryReturnResult(NID_SHELL, pAppWidget, E_SYSTEM, "Can't find the AppWidget provider");
pAppWidget->OnAppWidgetProviderUpdating(argument);
result
_AppWidgetProviderManagerImpl::ResizeAppWidget(const String& instanceId, int width, int height)
{
- SysLog(NID_APP, "instanceId(%ls), w:%d, h:%d", instanceId.GetPointer(), width, height);
+ SysLog(NID_SHELL, "instanceId(%ls), w:%d, h:%d", instanceId.GetPointer(), width, height);
AppWidgetProvider* pAppWidget = null;
__appwidgetProviders.GetValue(instanceId, pAppWidget);
- SysTryReturnResult(NID_APP, pAppWidget, E_SYSTEM, "Can't find the AppWidget provider");
+ SysTryReturnResult(NID_SHELL, pAppWidget, E_SYSTEM, "Can't find the AppWidget provider");
AppWidgetFrame* pAppWidgetFrame = pAppWidget->GetAppWidgetFrame();
- SysTryReturnResult(NID_APP, pAppWidgetFrame, E_SYSTEM, "GetAppWidgetFrame() returns 'null'.");
+ SysTryReturnResult(NID_SHELL, pAppWidgetFrame, E_SYSTEM, "GetAppWidgetFrame() returns 'null'.");
return pAppWidgetFrame->SetSize(Dimension(width, height));
}
result
_AppWidgetProviderManagerImpl::RemoveAppWidget(const String& instanceId, bool terminateIfFinished)
{
- SysLog(NID_APP, "instanceId(%ls), terminateIfFinished(%s)", instanceId.GetPointer(), (terminateIfFinished)? "true":"false" );
+ SysLog(NID_SHELL, "instanceId(%ls), terminateIfFinished(%s)", instanceId.GetPointer(), (terminateIfFinished)? "true":"false" );
// __pAppWidgetEventListener->OnAppWidgetRemoved(instanceId);
AppWidgetProvider* pAppWidgetProvider = null;
__appwidgetProviders.GetValue(instanceId, pAppWidgetProvider);
result r = __appwidgetProviders.Remove(instanceId);
- SysLog(NID_APP, "%s", GetErrorMessage(r) );
+ SysLog(NID_SHELL, "%s", GetErrorMessage(r) );
if( pAppWidgetProvider != null)
{
delete pAppWidgetProvider;
}
- SysLog(NID_APP, "(%d) provider(s) remains.", __appwidgetProviders.GetCount() );
+ SysLog(NID_SHELL, "(%d) provider(s) remains.", __appwidgetProviders.GetCount() );
if( terminateIfFinished && this->__appwidgetProviders.GetCount() == 0)
{
result
_AppWidgetProviderManagerImpl::CreateAppWidgetPopupProvider(const String& instanceId, const String& providerName, const String& userInfo, double x, double y, int width, int height)
{
- SysLog(NID_APP, "instanceId(%ls), providerName(%ls), userInfo(%ls), rect(%f, %f, %d, %d)", instanceId.GetPointer(), providerName.GetPointer(), userInfo.GetPointer(), x, y, width, height );
- SysTryReturnResult(NID_APP, __pAppWidgetPopupProviderFactory, E_FAILURE, "[E_INVALID_OPERATION] __pAppWidgetPopupProviderFactory should not be null");
+ SysLog(NID_SHELL, "instanceId(%ls), providerName(%ls), userInfo(%ls), rect(%f, %f, %d, %d)", instanceId.GetPointer(), providerName.GetPointer(), userInfo.GetPointer(), x, y, width, height );
+ SysTryReturnResult(NID_SHELL, __pAppWidgetPopupProviderFactory, E_FAILURE, "[E_INVALID_OPERATION] __pAppWidgetPopupProviderFactory should not be null");
AppWidgetPopupProvider* pPd = __pAppWidgetPopupProviderFactory->CreateInstance(providerName, userInfo);
__pAppWidgetPopupProvider = pPd;
__pAppWidgetPopupProvider->OnAppWidgetPopupProviderInitializing(userInfo);
AppWidgetPopup* pAppWidgetFrame = pPd->GetAppWidgetPopup();
- SysTryReturnResult(NID_APP, pAppWidgetFrame, E_INVALID_OPERATION, "[E_INVALID_OPERATION] AppWidgetPopup should be set using AppWidgetPopupProvider::SetAppWidgetPopup()");
+ SysTryReturnResult(NID_SHELL, pAppWidgetFrame, E_INVALID_OPERATION, "[E_INVALID_OPERATION] AppWidgetPopup should be set using AppWidgetPopupProvider::SetAppWidgetPopup()");
return E_SUCCESS;
}
result
_AppWidgetProviderManagerImpl::DestroyAppWidgetPopupProvider(const String& instanceId)
{
- SysLog(NID_APP, "instanceId(%ls)", instanceId.GetPointer());
+ SysLog(NID_SHELL, "instanceId(%ls)", instanceId.GetPointer());
if( __pAppWidgetPopupProvider != null)
{
result
_AppWidgetProviderManagerImpl::ForwardTouchEvent(const String& instanceId, int eventType, double timeStamp, double x, double y)
{
- SysLog(NID_APP, "instanceId(%ls), eventType(%d), timeStamp(%f), x(%f), y(%f)", instanceId.GetPointer(), eventType, timeStamp, x, y);
+ SysLog(NID_SHELL, "instanceId(%ls), eventType(%d), timeStamp(%f), x(%f), y(%f)", instanceId.GetPointer(), eventType, timeStamp, x, y);
_IAppWidgetTouchEventListener* pTouchEventListener = null;
__touchEventListeners.GetValue(instanceId, pTouchEventListener);
- SysTryReturnResult(NID_APP, pTouchEventListener, E_INVALID_STATE, "[E_INVALID_STATE]");
+ SysTryReturnResult(NID_SHELL, pTouchEventListener, E_INVALID_STATE, "[E_INVALID_STATE]");
pTouchEventListener->OnTouchEventRecevied(eventType, timeStamp, x, y);
result
_AppWidgetProviderManagerImpl::ForwardTouchEventForPD(const String& instanceId, int eventType, double timeStamp, double x, double y)
{
- SysTryReturnResult(NID_APP, __AppWidgetPopupTouchEventListener, E_INVALID_STATE, "[E_INVALID_STATE]");
+ SysTryReturnResult(NID_SHELL, __AppWidgetPopupTouchEventListener, E_INVALID_STATE, "[E_INVALID_STATE]");
__AppWidgetPopupTouchEventListener->OnTouchEventRecevied(eventType, timeStamp, x, y);
return E_SUCCESS;
_AppWidgetProviderManagerImpl::RequestSharedMemoryId(const Tizen::Base::String& instanceId, int width, int height, int& shmId)
{
_AppWidgetManagerProxy* pProxy = _AppWidgetManagerProxy::GetInstance();
- SysTryReturnResult(NID_APP, pProxy, E_SYSTEM, "Failed to get proxy instance!");
+ SysTryReturnResult(NID_SHELL, pProxy, E_SYSTEM, "Failed to get proxy instance!");
return pProxy->RequestSharedMemoryId(instanceId, width, height, shmId);
}
_AppWidgetProviderManagerImpl::RequestSharedMemoryIdForPD(const Tizen::Base::String& instanceId, int width, int height, int& shmId)
{
_AppWidgetManagerProxy* pProxy = _AppWidgetManagerProxy::GetInstance();
- SysTryReturnResult(NID_APP, pProxy, E_SYSTEM, "Failed to get proxy instance!");
+ SysTryReturnResult(NID_SHELL, pProxy, E_SYSTEM, "Failed to get proxy instance!");
return pProxy->RequestSharedMemoryIdForPD(instanceId, width, height, shmId);
}
_AppWidgetProviderManagerImpl::RequestReleaseSharedMemory(const Tizen::Base::String& instanceId)
{
_AppWidgetManagerProxy* pProxy = _AppWidgetManagerProxy::GetInstance();
- SysTryReturnResult(NID_APP, pProxy, E_SYSTEM, "Failed to get proxy instance!");
+ SysTryReturnResult(NID_SHELL, pProxy, E_SYSTEM, "Failed to get proxy instance!");
return pProxy->RequestReleaseSharedMemory(instanceId);
}
_AppWidgetProviderManagerImpl::RequestReleaseSharedMemoryForPD(const Tizen::Base::String& instanceId)
{
_AppWidgetManagerProxy* pProxy = _AppWidgetManagerProxy::GetInstance();
- SysTryReturnResult(NID_APP, pProxy, E_SYSTEM, "Failed to get proxy instance!");
+ SysTryReturnResult(NID_SHELL, pProxy, E_SYSTEM, "Failed to get proxy instance!");
return pProxy->RequestReleaseSharedMemoryForPD(instanceId);
}
_AppWidgetProviderManagerImpl::RequestSyncSharedMemory(const Tizen::Base::String& instanceId, int width, int height)
{
_AppWidgetManagerProxy* pProxy = _AppWidgetManagerProxy::GetInstance();
- SysTryReturnResult(NID_APP, pProxy, E_SYSTEM, "Failed to get proxy instance!");
+ SysTryReturnResult(NID_SHELL, pProxy, E_SYSTEM, "Failed to get proxy instance!");
result r = pProxy->RequestSyncSharedMemory(instanceId, width, height);
_AppWidgetProviderManagerImpl::RequestSyncSharedMemoryForPD(const Tizen::Base::String& instanceId)
{
_AppWidgetManagerProxy* pProxy = _AppWidgetManagerProxy::GetInstance();
- SysTryReturnResult(NID_APP, pProxy, E_SYSTEM, "Failed to get proxy instance!");
+ SysTryReturnResult(NID_SHELL, pProxy, E_SYSTEM, "Failed to get proxy instance!");
return pProxy->RequestSyncSharedMemoryForPD(instanceId);
}
void
LockManager::InitSingleton(void)
{
- SysLog(NID_APP, "Enter.");
+ SysLog(NID_SHELL, "Enter.");
std::unique_ptr<LockManager> pInst(new (std::nothrow) LockManager());
- SysTryReturnVoidResult(NID_APP, pInst, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ SysTryReturnVoidResult(NID_SHELL, pInst, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
result r = pInst->Construct();
- SysTryReturnVoidResult(NID_APP, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturnVoidResult(NID_SHELL, r == E_SUCCESS, r, "[%s] Propagating.", GetErrorMessage(r));
__pTheInstance = pInst.release();
std::atexit(DestroySingleton);
- SysLog(NID_APP, "Exit.");
+ SysLog(NID_SHELL, "Exit.");
}
void
static pthread_once_t onceBlock = PTHREAD_ONCE_INIT;
if (__pTheInstance == null)
{
- SysLog(NID_APP, "Enter.");
+ SysLog(NID_SHELL, "Enter.");
ClearLastResult();
pthread_once(&onceBlock, InitSingleton);
result r = GetLastResult();
{
onceBlock = PTHREAD_ONCE_INIT;
}
- SysLog(NID_APP, "Exit.");
+ SysLog(NID_SHELL, "Exit.");
}
return __pTheInstance;
}
__pLockManagerImpl = _LockManagerImpl::GetInstance();
SysAssertf(__pLockManagerImpl, "Failed to construct _LockManagerImpl!!");
- SysLog(NID_APP, "Successed.");
+ SysLog(NID_SHELL, "Successed.");
return E_SUCCESS;
}
"Already constructed. Calling Construct() twice or more on a same instance is not allowed for this class.");
__pNotificationManagerImpl = new (std::nothrow) _NotificationManagerImpl();
- SysTryReturnResult(NID_APP, __pNotificationManagerImpl != null, E_OUT_OF_MEMORY, "Allocation failed.");
+ SysTryReturnResult(NID_SHELL, __pNotificationManagerImpl != null, E_OUT_OF_MEMORY, "Allocation failed.");
return __pNotificationManagerImpl->Construct();
}
SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
return __pNotificationManagerImpl->GetBadgeNumber();
}
SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
return __pNotificationManagerImpl->Notify(badgeNumber);
}
SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
return __pNotificationManagerImpl->Notify(messageText);
}
SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
return __pNotificationManagerImpl->Notify(messageText, badgeNumber);
}
SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
return __pNotificationManagerImpl->Notify(messageText, badgeNumber, launchArguments);
}
SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
return __pNotificationManagerImpl->NotifyMessageImpl(notiMessage);
}
SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION, _PRV_NOTIFICATIONMANAGER);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
return __pNotificationManagerImpl->NotifyMessageImpl(appId, notiMessage);
}
SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
return __pNotificationManagerImpl->GetBadgeNumber(appId);
}
SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
return __pNotificationManagerImpl->NotifyOngoingActivity(messageText);
}
SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
return __pNotificationManagerImpl->NotifyOngoingActivity(messageText, launchArguments);
SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
return __pNotificationManagerImpl->NotifyMessageImpl(notiMessage, true);
}
SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION, _PRV_NOTIFICATIONMANAGER);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
return __pNotificationManagerImpl->NotifyMessageImpl(appId, notiMessage, true);
}
SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
return __pNotificationManagerImpl->RemoveOngoingActivityNotification();
}
SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION, _PRV_NOTIFICATIONMANAGER);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
return __pNotificationManagerImpl->RemoveOngoingActivityNotificationByAppId(appId);
}
SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
return __pNotificationManagerImpl->RemoveNotification();
}
SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION, _PRV_NOTIFICATIONMANAGER);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
return __pNotificationManagerImpl->RemoveNotificationByAppId(appId);
}
SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
return __pNotificationManagerImpl->NotifyTextMessage(messageText);
}
SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
return __pNotificationManagerImpl->NotifyByAppControl(operationId, pUriData, pDataType, pExtraData, request);
}
SysAssertf(__pNotificationManagerImpl != null, "Not yet constructed. Construct() should be called before use.");
result r = _AccessController::CheckUserPrivilege(_PRV_NOTIFICATION);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
return __pNotificationManagerImpl->NotifyOngoingActivityByAppControl(operationId, pUriData, pDataType, pExtraData, request);
}
: __pNotificationRequestImpl(null)
{
__pNotificationRequestImpl = new (std::nothrow) _NotificationRequestImpl(appBinding);
- SysTryReturnVoidResult(NID_APP, __pNotificationRequestImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
+ SysTryReturnVoidResult(NID_SHELL, __pNotificationRequestImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
}
NotificationRequest::~NotificationRequest()
: __pNotificationRequestImpl(null)
{
__pNotificationRequestImpl = new (std::nothrow) _NotificationRequestImpl(*rhs.__pNotificationRequestImpl);
- SysTryReturnVoidResult(NID_APP, __pNotificationRequestImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
+ SysTryReturnVoidResult(NID_SHELL, __pNotificationRequestImpl, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
}
NotificationRequest&
delete __pNotificationRequestImpl;
__pNotificationRequestImpl = new (std::nothrow) _NotificationRequestImpl(*rhs.__pNotificationRequestImpl);
- SysTryReturn(NID_APP, __pNotificationRequestImpl, *this, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
+ SysTryReturn(NID_SHELL, __pNotificationRequestImpl, *this, E_OUT_OF_MEMORY, "[E_OUT_OF_MEMORY] Insufficient memory");
}
return(*this);
if( pShortcutManager == null)
{
pShortcutManager = new (std::nothrow) ShortcutManager;
- SysTryReturn(NID_APP, pShortcutManager, null, E_OUT_OF_MEMORY, "E_OUT_OF_MEMORY" );
+ SysTryReturn(NID_SHELL, pShortcutManager, null, E_OUT_OF_MEMORY, "E_OUT_OF_MEMORY" );
result r = pShortcutManager->Construct();
-// SysTryReturn(NID_APP, !IsFailed(r), null, r, "[%s] Propagating.", GetErrorMessage(r));
+// SysTryReturn(NID_SHELL, !IsFailed(r), null, r, "[%s] Propagating.", GetErrorMessage(r));
SysAssertf(!IsFailed(r), "Failed to construct ShortcutManager!!");
}
ShortcutManager::AddShortcut(const AppId& appId, const String& displayName, const String& iconFilePath, const String& uriData, bool allowDuplication)
{
result r = _AccessController::CheckUserPrivilege(_PRV_SHORTCUT_INSTALL);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_PRIVILEGE_DENIED, "The application does not have the privilege to call this method.");
if( allowDuplication )
{
- SysLog(NID_APP, "This feature(allowDuplication) is not yet implemented!");
+ SysLog(NID_SHELL, "This feature(allowDuplication) is not yet implemented!");
}
std::unique_ptr<char[]> pAppId(_StringConverter::CopyToCharArrayN(appId));
int type = (uriData.IsEmpty())? LAUNCH_BY_PACKAGE : LAUNCH_BY_URI;
//int ret = add_to_home_shortcut(pAppId.get(), pName.get(), type, pUriData.get(), pIcon.get(), NULL, this);
int ret = add_to_home_shortcut(pAppId.get(), pName.get(), type, pUriData.get(), pIcon.get(), allowDuplication, NULL, this);
- SysTryReturnResult(NID_APP, ret == 0, E_SYSTEM, "Failed to add_to_home_shortcut");
+ SysTryReturnResult(NID_SHELL, ret == 0, E_SYSTEM, "Failed to add_to_home_shortcut");
return E_SUCCESS;
}
return E_SUCCESS;
}
-// SysTryReturnResult(NID_APP, !IsSecureMode(), E_INVALID_OPERATION, "Secured lock screen can't be unlocked.");
+// SysTryReturnResult(NID_SHELL, !IsSecureMode(), E_INVALID_OPERATION, "Secured lock screen can't be unlocked.");
int errorCode = -1;
errorCode = vconf_set_int(VCONFKEY_IDLE_LOCK_STATE, VCONFKEY_IDLE_UNLOCK);
SysAssert(pBadgeEventListenerList);
std::unique_ptr<IEnumeratorT<Tizen::Shell::IBadgeEventListener* > > pEnum(pBadgeEventListenerList->GetEnumeratorN());
- SysTryReturnVoidResult(NID_APP, pEnum.get(), E_OUT_OF_MEMORY, "Failed to GetEnumeratorN()!");
+ SysTryReturnVoidResult(NID_SHELL, pEnum.get(), E_OUT_OF_MEMORY, "Failed to GetEnumeratorN()!");
IBadgeEventListener* pListener;
while (pEnum->MoveNext() == E_SUCCESS)
pEnum->GetCurrent(pListener);
if( !pListener)
{
- SysLog(NID_APP, "pListener is null!");
+ SysLog(NID_SHELL, "pListener is null!");
continue;
}
if( __primaryBadgeEventListenerList.GetCount() == 0)
{
int ret = badge_register_changed_cb(BadgeChangedCallback, &__primaryBadgeEventListenerList);
- SysTryReturnResult(NID_APP, ret == BADGE_ERROR_NONE, E_SYSTEM, "Failed to badge_unregister_changed_cb, (%d)", ret);
+ SysTryReturnResult(NID_SHELL, ret == BADGE_ERROR_NONE, E_SYSTEM, "Failed to badge_unregister_changed_cb, (%d)", ret);
}
return __primaryBadgeEventListenerList.Add(&primaryListener);
if( __primaryBadgeEventListenerList.GetCount() == 0)
{
int ret = badge_unregister_changed_cb(BadgeChangedCallback);
- SysTryReturnResult(NID_APP, ret == BADGE_ERROR_NONE, E_SYSTEM, "Failed to badge_unregister_changed_cb, (%d)", ret);
+ SysTryReturnResult(NID_SHELL, ret == BADGE_ERROR_NONE, E_SYSTEM, "Failed to badge_unregister_changed_cb, (%d)", ret);
}
return E_SUCCESS;
}
std::unique_ptr<char[]> pAppId(_StringConverter::CopyToCharArrayN(pApp->GetAppId()));
int count = GetBadgeCount(pAppId.get());
- SysTryReturn(NID_APP, count != -1, count, E_OPERATION_FAILED, "[%s] The operation has failed. Badge may not exist.",
+ SysTryReturn(NID_SHELL, count != -1, count, E_OPERATION_FAILED, "[%s] The operation has failed. Badge may not exist.",
GetErrorMessage(E_OPERATION_FAILED));
ClearLastResult();
result
_NotificationManagerImpl::Notify(int badgeNumber)
{
- SysTryReturnResult(NID_APP, badgeNumber >= 0, E_INVALID_ARG, "BadgeNumber is less than 0.");
+ SysTryReturnResult(NID_SHELL, badgeNumber >= 0, E_INVALID_ARG, "BadgeNumber is less than 0.");
if (badgeNumber > MAX_NOTIFICATION_BADGE_NUMBER)
{
result
_NotificationManagerImpl::Notify(const String& messageText)
{
- SysTryReturnResult(NID_APP, messageText.GetLength() > 0, E_INVALID_ARG, "MessageText is less than 0.");
+ SysTryReturnResult(NID_SHELL, messageText.GetLength() > 0, E_INVALID_ARG, "MessageText is less than 0.");
NotificationRequest request;
request.SetAlertText(messageText);
result
_NotificationManagerImpl::Notify(const String& messageText, int badgeNumber)
{
- SysTryReturnResult(NID_APP, badgeNumber >= 0, E_INVALID_ARG, "BadgeNumber is less than 0.");
- SysTryReturnResult(NID_APP, messageText.GetLength() > 0, E_INVALID_ARG, "MessageText is less than 0.");
+ SysTryReturnResult(NID_SHELL, badgeNumber >= 0, E_INVALID_ARG, "BadgeNumber is less than 0.");
+ SysTryReturnResult(NID_SHELL, messageText.GetLength() > 0, E_INVALID_ARG, "MessageText is less than 0.");
if (badgeNumber > MAX_NOTIFICATION_BADGE_NUMBER)
{
result
_NotificationManagerImpl::Notify(const String& messageText, int badgeNumber, const String& launchArguments)
{
- SysTryReturnResult(NID_APP, badgeNumber >= 0, E_INVALID_ARG, "BadgeNumber is less than 0.");
- SysTryReturnResult(NID_APP, messageText.GetLength() > 0, E_INVALID_ARG, "MessageText is less than 0.");
- SysTryReturnResult(NID_APP, launchArguments != null && launchArguments.GetLength() > 0, E_INVALID_ARG,
+ SysTryReturnResult(NID_SHELL, badgeNumber >= 0, E_INVALID_ARG, "BadgeNumber is less than 0.");
+ SysTryReturnResult(NID_SHELL, messageText.GetLength() > 0, E_INVALID_ARG, "MessageText is less than 0.");
+ SysTryReturnResult(NID_SHELL, launchArguments != null && launchArguments.GetLength() > 0, E_INVALID_ARG,
"launchArguments is less than 0.");
- SysTryReturnResult(NID_APP, launchArguments.GetLength() <= MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH, E_INVALID_ARG,
+ SysTryReturnResult(NID_SHELL, launchArguments.GetLength() <= MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH, E_INVALID_ARG,
"launchArguments is greater than MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.");
if (badgeNumber > MAX_NOTIFICATION_BADGE_NUMBER)
_NotificationManagerImpl::GetBadgeNumber(const AppId& appId) const
{
bool b = _Aul::IsInstalled(appId);
- SysTryReturn(NID_APP, b == true, -1, E_APP_NOT_INSTALLED, "[E_OBJ_NOT_FOUND] The application %ls is not installed",
+ SysTryReturn(NID_SHELL, b == true, -1, E_APP_NOT_INSTALLED, "[E_OBJ_NOT_FOUND] The application %ls is not installed",
appId.GetPointer());
std::unique_ptr<char[]> pAppId(_StringConverter::CopyToCharArrayN(appId));
int count = GetBadgeCount(pAppId.get());
- SysTryReturn(NID_APP, count != -1, count, E_OPERATION_FAILED, "[%s] The operation has failed. Badge may not exist.",
+ SysTryReturn(NID_SHELL, count != -1, count, E_OPERATION_FAILED, "[%s] The operation has failed. Badge may not exist.",
GetErrorMessage(E_OPERATION_FAILED));
ClearLastResult();
result
_NotificationManagerImpl::NotifyOngoingActivity(const String& messageText)
{
- SysTryReturnResult(NID_APP, messageText.GetLength() > 0, E_INVALID_ARG, "MessageText is less than 0.");
+ SysTryReturnResult(NID_SHELL, messageText.GetLength() > 0, E_INVALID_ARG, "MessageText is less than 0.");
NotificationRequest request;
request.SetAlertText(messageText);
result
_NotificationManagerImpl::NotifyOngoingActivity(const String& messageText, const String& launchArguments)
{
- SysTryReturnResult(NID_APP, messageText.GetLength() > 0, E_INVALID_ARG, "MessageText is less than 0.");
- SysTryReturnResult(NID_APP, launchArguments.GetLength() > 0, E_INVALID_ARG, "launchArguments is less than 0.");
- SysTryReturnResult(NID_APP, launchArguments.GetLength() <= MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH, E_INVALID_ARG,
+ SysTryReturnResult(NID_SHELL, messageText.GetLength() > 0, E_INVALID_ARG, "MessageText is less than 0.");
+ SysTryReturnResult(NID_SHELL, launchArguments.GetLength() > 0, E_INVALID_ARG, "launchArguments is less than 0.");
+ SysTryReturnResult(NID_SHELL, launchArguments.GetLength() <= MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH, E_INVALID_ARG,
"launchArguments is greater than MAX_NOTIFICATION_LAUNCH_ARGUMENTS_LENGTH.");
NotificationRequest request;
result
_NotificationManagerImpl::NotifyTextMessage(const String& messageText) const
{
- SysTryReturnResult(NID_APP, !messageText.IsEmpty(), E_INVALID_ARG, "MessageText is less than 0.");
+ SysTryReturnResult(NID_SHELL, !messageText.IsEmpty(), E_INVALID_ARG, "MessageText is less than 0.");
std::unique_ptr<char[]> pMsg(_StringConverter::CopyToCharArrayN(messageText));
int res = notification_status_message_post(pMsg.get());
break;
}
- SysLog(NID_APP, "[%s] %ls posted.", GetErrorMessage(r), messageText.GetPointer());
+ SysLog(NID_SHELL, "[%s] %ls posted.", GetErrorMessage(r), messageText.GetPointer());
return r;
}
result r = E_SUCCESS;
std::unique_ptr<char[]> pAppIdChar(null);
const _NotificationRequestImpl* pRequestImpl = _NotificationRequestImpl::GetInstance(notifyRequest);
- SysTryReturnResult(NID_APP, pRequestImpl != null, E_INVALID_ARG, "Invalid argument is used.");
+ SysTryReturnResult(NID_SHELL, pRequestImpl != null, E_INVALID_ARG, "Invalid argument is used.");
// Set pAppIdChar
if ((notifyType == NOTIFY_TYPE_SIMPLE) || (notifyType == NOTIFY_TYPE_APP_CONTROL))
{
// char* pkgname = null;
// app_get_id(&pkgname); // AppId. (Not package Id)
-// SysTryReturnResult(NID_APP, pkgname != NULL, E_OBJ_NOT_FOUND,"Cannot acquire package name for current application.");
+// SysTryReturnResult(NID_SHELL, pkgname != NULL, E_OBJ_NOT_FOUND,"Cannot acquire package name for current application.");
// const String currentAppId(pkgname);
// free(pkgname);
Tizen::App::App* pApp = Tizen::App::App::GetInstance();
const String currentAppId = pApp->GetAppId();
std::unique_ptr<char[]> pAppIdTemp(_StringConverter::CopyToCharArrayN(currentAppId));
pAppIdChar = std::move(pAppIdTemp);
- SysLog(NID_APP, "app_get_id: %ls", currentAppId.GetPointer());
+ SysLog(NID_SHELL, "app_get_id: %ls", currentAppId.GetPointer());
}
else
if (notifyType == NOTIFY_TYPE_APP_ID)
{
bool isAppInstalled = _Aul::IsInstalled(*pAppId);
- SysTryReturnResult(NID_APP, isAppInstalled == true, E_APP_NOT_INSTALLED, "The application %ls is not installed", pAppId->GetPointer());
+ SysTryReturnResult(NID_SHELL, isAppInstalled == true, E_APP_NOT_INSTALLED, "The application %ls is not installed", pAppId->GetPointer());
std::unique_ptr<char[]> pAppIdTemp(_StringConverter::CopyToCharArrayN(*pAppId));
pAppIdChar = std::move(pAppIdTemp);
}
else
{
- SysTryReturnResult(NID_APP, false, E_INVALID_ARG, "Invalid argument is used.");
+ SysTryReturnResult(NID_SHELL, false, E_INVALID_ARG, "Invalid argument is used.");
}
const int badgeNumber = notifyRequest.GetBadgeNumber();
}
if (!(isOngoing || !contentText.IsEmpty()))
{
- SysLog(NID_APP, "No valid for Notification, just for set a badgeNumber update.");
+ SysLog(NID_SHELL, "No valid for Notification, just for set a badgeNumber update.");
return E_SUCCESS;
}
}
- SysTryReturnResult(NID_APP, (isOngoing || !contentText.IsEmpty()), E_INVALID_ARG, "Invalid argument is used. MessageText is Empty");
+ SysTryReturnResult(NID_SHELL, (isOngoing || !contentText.IsEmpty()), E_INVALID_ARG, "Invalid argument is used. MessageText is Empty");
const String& titleText = notifyRequest.GetTitleText();
const String& launchArguments = notifyRequest.GetAppMessage();
if (notiPrivateId != -1)
{
notiHandle = notification_load(pAppIdChar.get(), notiPrivateId);
- SysTryLog(NID_APP, notiHandle != null, "Get notiHandle(%d) from notiPrivateId(%d).", notiHandle, notiPrivateId);
+ SysTryLog(NID_SHELL, notiHandle != null, "Get notiHandle(%d) from notiPrivateId(%d).", notiHandle, notiPrivateId);
}
if (notiHandle == null)
{
- SysLog(NID_APP, "Previous notification(%d) no more valid - create new notification", notiPrivateId);
+ SysLog(NID_SHELL, "Previous notification(%d) no more valid - create new notification", notiPrivateId);
notiPrivateId = -1; // reset
notiHandle = notification_create(notiType);
}
{
needUpdate = true; // No need to notification_insert.
}
- SysTryReturnResult(NID_APP, notiHandle != null , E_SYSTEM, "A system error has been occurred. Notification creation/load failed ");
+ SysTryReturnResult(NID_SHELL, notiHandle != null , E_SYSTEM, "A system error has been occurred. Notification creation/load failed ");
// Content text(Alert text)
std::unique_ptr<char[]> pMsg(_StringConverter::CopyToCharArrayN(contentText));
std::unique_ptr<char[]> pTitleTextTemp(_StringConverter::CopyToCharArrayN(appName));
pTitleText = std::move(pTitleTextTemp);
free(pAppName);
- //SysLog(NID_APP, "Application Id is %ls.", appName.GetPointer());
+ //SysLog(NID_SHELL, "Application Id is %ls.", appName.GetPointer());
}
- SysTryLog(NID_APP, !IsFailed(r), "[%s] Failed to get title from app_manager_get_app_name for default setting.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Failed to get title from app_manager_get_app_name for default setting.", GetErrorMessage(r));
}
// Icon file path
std::unique_ptr<char[]> pIconPath(null);
pIconPath = std::move(pIconPathTemp);
free(pDefaultIconPath);
}
- SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification Set icon path failed.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Notification Set icon path failed.", GetErrorMessage(r));
}
// Sound file path
std::unique_ptr<char[]> pSoundPath(null);
if (notifyType == NOTIFY_TYPE_APP_ID)
{
r = ConvertNotificationResult(notification_set_pkgname(notiHandle, pAppIdChar.get()));
- SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification Set Package name failed.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Notification Set Package name failed.", GetErrorMessage(r));
}
// Set - title text
if (pTitleText.get())
{
r = ConvertNotificationResult(notification_set_text(notiHandle, NOTIFICATION_TEXT_TYPE_TITLE, pTitleText.get(), NULL, NOTIFICATION_VARIABLE_TYPE_NONE));
- SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification Set Title Text failed.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Notification Set Title Text failed.", GetErrorMessage(r));
}
// Set - content text
if (pMsg.get())
{
r = notification_set_text(notiHandle, NOTIFICATION_TEXT_TYPE_CONTENT, pMsg.get(), NULL, NOTIFICATION_VARIABLE_TYPE_NONE);
- SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification Set Title Text failed.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Notification Set Title Text failed.", GetErrorMessage(r));
}
// Set - icon file path
r = ConvertNotificationResult(notification_set_image(notiHandle, NOTIFICATION_IMAGE_TYPE_ICON, pIconPath.get()));
- SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification Set icon path failed.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Notification Set icon path failed.", GetErrorMessage(r));
// Set - sound file path
if (pSoundPath.get())
{
{
r = ConvertNotificationResult(notification_set_sound(notiHandle, NOTIFICATION_SOUND_TYPE_DEFAULT, NULL));
}
- SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification Set sound failed.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Notification Set sound failed.", GetErrorMessage(r));
// Set extended - text, thumbnail and background image
if (!isOngoing)
{
std::unique_ptr<char[]> pBgImageFilePath(_StringConverter::CopyToCharArrayN(bgImageFilePath));
r = ConvertNotificationResult(notification_set_image(notiHandle, NOTIFICATION_IMAGE_TYPE_BACKGROUND, pBgImageFilePath.get()));
- SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification Set Background image path failed.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Notification Set Background image path failed.", GetErrorMessage(r));
}
// TODO: check pThumbnailPath
std::unique_ptr<char[]> filePath(_StringConverter::CopyToCharArrayN(*pThumbnailPath));
r = ConvertNotificationResult(notification_set_image(notiHandle, thumbnailListEnum[i], filePath.get()));
- SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification Set thumnail path failed.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Notification Set thumnail path failed.", GetErrorMessage(r));
}
}
}
std::unique_ptr<char[]> leftText(_StringConverter::CopyToCharArrayN(subText));
r = ConvertNotificationResult(notification_set_text(notiHandle, NOTIFICATION_TEXT_TYPE_INFO_1, leftText.get(),
NULL, NOTIFICATION_VARIABLE_TYPE_NONE));
- SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification Set Info1 Text failed.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Notification Set Info1 Text failed.", GetErrorMessage(r));
subText.Clear();
if (E_SUCCESS == pText1->SubString(matchIndex+1, subText))
{
std::unique_ptr<char[]> rightText(_StringConverter::CopyToCharArrayN(subText));
r = ConvertNotificationResult(notification_set_text(notiHandle, NOTIFICATION_TEXT_TYPE_INFO_SUB_1, rightText.get(),
NULL, NOTIFICATION_VARIABLE_TYPE_NONE));
- SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification Set Info1 Sub Text failed.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Notification Set Info1 Sub Text failed.", GetErrorMessage(r));
}
}
else
std::unique_ptr<char[]> leftText(_StringConverter::CopyToCharArrayN(*pText1));
r = ConvertNotificationResult(notification_set_text(notiHandle, NOTIFICATION_TEXT_TYPE_INFO_1, leftText.get(),
NULL, NOTIFICATION_VARIABLE_TYPE_NONE));
- SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification Set Info1 Text failed.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Notification Set Info1 Text failed.", GetErrorMessage(r));
}
}
const String* pText2 = static_cast<const String*>(pMessageTextList->GetAt(1));
std::unique_ptr<char[]> leftText(_StringConverter::CopyToCharArrayN(subText));
r = ConvertNotificationResult(notification_set_text(notiHandle, NOTIFICATION_TEXT_TYPE_INFO_2, leftText.get(),
NULL, NOTIFICATION_VARIABLE_TYPE_NONE));
- SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification Set Info1 Text failed.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Notification Set Info1 Text failed.", GetErrorMessage(r));
subText.Clear();
if (E_SUCCESS == pText2->SubString(matchIndex+1, subText))
{
std::unique_ptr<char[]> rightText(_StringConverter::CopyToCharArrayN(subText));
r = ConvertNotificationResult(notification_set_text(notiHandle, NOTIFICATION_TEXT_TYPE_INFO_SUB_2, rightText.get(),
NULL, NOTIFICATION_VARIABLE_TYPE_NONE));
- SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification Set Info1 Sub Text failed.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Notification Set Info1 Sub Text failed.", GetErrorMessage(r));
}
}
else
std::unique_ptr<char[]> leftText(_StringConverter::CopyToCharArrayN(*pText2));
r = ConvertNotificationResult(notification_set_text(notiHandle, NOTIFICATION_TEXT_TYPE_INFO_2, leftText.get(),
NULL, NOTIFICATION_VARIABLE_TYPE_NONE));
- SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification Set Info1 Text failed.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Notification Set Info1 Text failed.", GetErrorMessage(r));
}
}
}
// Set - service
r = arg.Construct(launchArguments);
- SysTryCatch(NID_APP, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
+ SysTryCatch(NID_SHELL, !IsFailed(r), , r, "[%s] Propagated.", GetErrorMessage(r));
pBundle = arg.GetBundle();
service_create_request(pBundle, &hSvc);
- SysTryCatch(NID_APP, hSvc != null, r = E_SYSTEM, r, "[%s] A system error has been occurred. service_create_request failed.", GetErrorMessage(E_SYSTEM));
+ SysTryCatch(NID_SHELL, hSvc != null, r = E_SYSTEM, r, "[%s] A system error has been occurred. service_create_request failed.", GetErrorMessage(E_SYSTEM));
if (notifyType == NOTIFY_TYPE_SIMPLE || notifyType == NOTIFY_TYPE_APP_ID)
{
}
else
{
- SysLog(NID_APP, "pKey or pValue is ivalid.");
+ SysLog(NID_SHELL, "pKey or pValue is ivalid.");
}
}
}
if (service_to_bundle(hSvc, &service_data) == SERVICE_ERROR_NONE)
{
r = ConvertNotificationResult(notification_set_property(notiHandle, 0));
- SysTryLog(NID_APP, !IsFailed(r), "[%s] notification_set_property failed.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] notification_set_property failed.", GetErrorMessage(r));
r = ConvertNotificationResult(notification_set_execute_option(notiHandle, NOTIFICATION_EXECUTE_TYPE_SINGLE_LAUNCH,
NULL, NULL, service_data));
- SysTryLog(NID_APP, !IsFailed(r), "[%s] Nnotification_set_execute_option failed.", GetErrorMessage(r));
- SysLog(NID_APP, "notification_set_execute_option");
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Nnotification_set_execute_option failed.", GetErrorMessage(r));
+ SysLog(NID_SHELL, "notification_set_execute_option");
}
else
{
- SysLog(NID_APP, "service_to_bundle failed");
+ SysLog(NID_SHELL, "service_to_bundle failed");
}
// Set layout
if (needUpdate)
{
r = ConvertNotificationResult(notification_set_size(notiHandle, 0)); // Reset for override BYTE type
- SysTryLog(NID_APP, !IsFailed(r), "[%s] notification_set_size failure.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] notification_set_size failure.", GetErrorMessage(r));
}
- r = ConvertNotificationResult(notification_set_progress(notiHandle, progress/100.));
- SysTryLog(NID_APP, !IsFailed(r), "[%s] notification_set_progress failure.", GetErrorMessage(r));
+ r = ConvertNotificationResult(notification_set_progress(notiHandle, 0));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] notification_set_progress failure.", GetErrorMessage(r));
break;
case ONGOING_ACTIVITY_TYPE_PROGRESS_BYTE:
if (needUpdate)
{
r = ConvertNotificationResult(notification_set_progress(notiHandle, 0.0)); // Reset for override PERCENTAGE type
- SysTryLog(NID_APP, !IsFailed(r), "[%s] notification_set_progress failure.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] notification_set_progress failure.", GetErrorMessage(r));
}
r = ConvertNotificationResult(notification_set_size(notiHandle, progress));
- SysTryLog(NID_APP, !IsFailed(r), "[%s] notification_set_size failure.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] notification_set_size failure.", GetErrorMessage(r));
break;
case ONGOING_ACTIVITY_TYPE_TEXT:
r = ConvertNotificationResult(notification_set_progress(notiHandle, 0.0)); // Reset the progress
- SysTryLog(NID_APP, !IsFailed(r), "[%s] notification_set_size failure.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] notification_set_size failure.", GetErrorMessage(r));
r = ConvertNotificationResult(notification_set_size(notiHandle, 0));
- SysTryLog(NID_APP, !IsFailed(r), "[%s] notification_set_size failure.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] notification_set_size failure.", GetErrorMessage(r));
break;
default:
if (!needUpdate)
{ // new
r = ConvertNotificationResult(notification_insert(notiHandle, ¬iPrivateId));
- SysLog(NID_APP, "Insert notification and get new notiPrivateId(%d)", notiPrivateId);
- SysTryLog(NID_APP, !IsFailed(r), "[%s] Notification post failure.", GetErrorMessage(r));
+ SysLog(NID_SHELL, "Insert notification and get new notiPrivateId(%d)", notiPrivateId);
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] Notification post failure.", GetErrorMessage(r));
if (isOngoing)
{
__notifyPrivateIdForOngoing = notiPrivateId;
if (isOngoing)
{
r = ConvertNotificationResult(notification_get_display_applist(notiHandle, &previousDisplaySet));
- SysTryLog(NID_APP, !IsFailed(r), "[%s] notification_set_display_applist failure.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] notification_set_display_applist failure.", GetErrorMessage(r));
int newDisplaySet = previousDisplaySet & ~NOTIFICATION_DISPLAY_APP_TICKER;
r = ConvertNotificationResult(notification_set_display_applist(notiHandle, newDisplaySet));
- SysTryLog(NID_APP, !IsFailed(r), "[%s] notification_set_display_applist failure.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] notification_set_display_applist failure.", GetErrorMessage(r));
}
r = ConvertNotificationResult(notification_update(notiHandle));
- SysTryLog(NID_APP, !IsFailed(r), "[%s] notification_update failure. notiPrivateId(%d)", GetErrorMessage(r), notiPrivateId);
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] notification_update failure. notiPrivateId(%d)", GetErrorMessage(r), notiPrivateId);
if (isOngoing)
{
r = ConvertNotificationResult(notification_set_display_applist(notiHandle, previousDisplaySet));
- SysTryLog(NID_APP, !IsFailed(r), "[%s] notification_set_display_applist failure.", GetErrorMessage(r));
+ SysTryLog(NID_SHELL, !IsFailed(r), "[%s] notification_set_display_applist failure.", GetErrorMessage(r));
}
}
if (notiHandle)
{
err = notification_delete(notiHandle);
- SysLog(NID_APP, "Notification deleted.");
+ SysLog(NID_SHELL, "Notification deleted.");
}
else
{
- SysLog(NID_APP, "Notification already deleted.");
+ SysLog(NID_SHELL, "Notification already deleted.");
}
notification_free(notiHandle);
}
else
{
err = notification_delete_all_by_type(null, notiType);
- SysLog(NID_APP, "All [%s] notification deleted.", onGoing ? "Ongoing" : "Normal");
+ SysLog(NID_SHELL, "All [%s] notification deleted.", onGoing ? "Ongoing" : "Normal");
}
switch (err)
result r = E_SUCCESS;
notification_error_e err = NOTIFICATION_ERROR_NONE;
bool isValidAppId = _Aul::IsInstalled(appId);
- SysTryReturnResult(NID_APP, isValidAppId == true, E_APP_NOT_INSTALLED, "The application %ls is not installed", appId.GetPointer());
+ SysTryReturnResult(NID_SHELL, isValidAppId == true, E_APP_NOT_INSTALLED, "The application %ls is not installed", appId.GetPointer());
std::unique_ptr<char[]> pAppId(_StringConverter::CopyToCharArrayN(appId));
const notification_type_e notiType = onGoing ? NOTIFICATION_TYPE_ONGOING : NOTIFICATION_TYPE_NOTI;
if (notiHandle)
{
err = notification_delete(notiHandle);
- SysLog(NID_APP, "Notification deleted.");
+ SysLog(NID_SHELL, "Notification deleted.");
}
else
{
- SysLog(NID_APP, "Notification already deleted.");
+ SysLog(NID_SHELL, "Notification already deleted.");
}
notification_free(notiHandle);
}
else
{
err = notification_delete_all_by_type(pAppId.get(), notiType);
- SysLog(NID_APP, "All [%s] notification deleted.", onGoing ? "Ongoing" : "Normal");
+ SysLog(NID_SHELL, "All [%s] notification deleted.", onGoing ? "Ongoing" : "Normal");
}
switch (err)
{
bool badgeExist = false;
badge_error_e badgeError = badge_is_existing(pkgName, &badgeExist);
- SysLog(NID_APP, "badge_is_existing: exitst= %d, error= %d.", badgeExist, badgeError); //#####
+ SysLog(NID_SHELL, "badge_is_existing: exitst= %d, error= %d.", badgeExist, badgeError); //#####
if (badgeExist)
{
badgeError = badge_remove(pkgName);
- SysLog(NID_APP, "badge_remove: error= %d.", badgeError); //#####
+ SysLog(NID_SHELL, "badge_remove: error= %d.", badgeError); //#####
}
- SysLog(NID_APP, "Badge removed.");
+ SysLog(NID_SHELL, "Badge removed.");
}
void
{
bool badgeExist;
badge_error_e badgeError = badge_is_existing(pkgName, &badgeExist);
- SysLog(NID_APP, "badge_is_existing: error= %d.", badgeError); //#####
+ SysLog(NID_SHELL, "badge_is_existing: error= %d.", badgeError); //#####
if (!badgeExist)
{
badgeError = badge_create(pkgName, pkgName);
- SysLog(NID_APP, "badge_create: error= %d.", badgeError); //#####
+ SysLog(NID_SHELL, "badge_create: error= %d.", badgeError); //#####
}
badge_set_count(pkgName, badgeCount);
- SysLog(NID_APP, "badge_set_count: badgeNumber= %d.", badgeCount);
+ SysLog(NID_SHELL, "badge_set_count: badgeNumber= %d.", badgeCount);
}
int
badge_error_e badgeError = badge_get_count(pkgName, &count);
if (badgeError == BADGE_ERROR_NONE)
{
- SysLog(NID_APP, "badge_get_count: ret= %d.", count);
+ SysLog(NID_SHELL, "badge_get_count: ret= %d.", count);
return count;
}
else
{
- SysLog(NID_APP, "badge_get_count: error= %d.", badgeError);
+ SysLog(NID_SHELL, "badge_get_count: error= %d.", badgeError);
return -1;
}
}
result
_NotificationManagerImpl::AddBadgeEventListener(IBadgeEventListener& listener)
{
- SysTryReturnResult(NID_APP, !__badgeEventListenerList.Contains(&listener), E_OBJ_ALREADY_EXIST, "The listener is already added.");
- SysLog(NID_APP, "(%x)", &listener);
+ SysTryReturnResult(NID_SHELL, !__badgeEventListenerList.Contains(&listener), E_OBJ_ALREADY_EXIST, "The listener is already added.");
+ SysLog(NID_SHELL, "(%x)", &listener);
result r = _BadgeManagerImpl::GetInstance()->AddPrimaryBadgeEventListener(*this);
- SysTryReturnResult(NID_APP, !IsFailed(r), E_SYSTEM, "Failed to AddPrimaryBadgeEventListener with reason (%s)", GetErrorMessage(r) );
+ SysTryReturnResult(NID_SHELL, !IsFailed(r), E_SYSTEM, "Failed to AddPrimaryBadgeEventListener with reason (%s)", GetErrorMessage(r) );
return __badgeEventListenerList.Add(&listener);
}
result
_NotificationManagerImpl::RemoveBadgeEventListener(IBadgeEventListener& listener)
{
- SysLog(NID_APP, "(%x)", &listener);
+ SysLog(NID_SHELL, "(%x)", &listener);
result r = __badgeEventListenerList.Remove(&listener);
- SysTryReturn(NID_APP, !IsFailed(r), r, r, "Failed to RemoveBadgeEventListener with reason (%s)", GetErrorMessage(r) );
+ SysTryReturn(NID_SHELL, !IsFailed(r), r, r, "Failed to RemoveBadgeEventListener with reason (%s)", GetErrorMessage(r) );
return _BadgeManagerImpl::GetInstance()->RemovePrimaryBadgeEventListener(*this);
}
_NotificationManagerImpl::OnBadgeUpdated(const Tizen::App::AppId& appId, int badgeNumber)
{
std::unique_ptr<IEnumeratorT<Tizen::Shell::IBadgeEventListener* > > pEnum(__badgeEventListenerList.GetEnumeratorN());
- SysTryReturnVoidResult(NID_APP, pEnum.get(), E_OUT_OF_MEMORY, "Failed to GetEnumeratorN()!");
+ SysTryReturnVoidResult(NID_SHELL, pEnum.get(), E_OUT_OF_MEMORY, "Failed to GetEnumeratorN()!");
IBadgeEventListener* pListener;
while (pEnum->MoveNext() == E_SUCCESS)
pEnum->GetCurrent(pListener);
if( !pListener)
{
- SysLog(NID_APP, "pListener is null!");
+ SysLog(NID_SHELL, "pListener is null!");
continue;
}
pListener->OnBadgeUpdated(appId, badgeNumber);
_NotificationRequestImpl::SetBadgeNumber(int badgeNumber)
{
result r = E_SUCCESS;
- SysTryReturnResult(NID_APP, badgeNumber >= 0 && badgeNumber <= MAX_NOTIFICATION_BADGE_NUMBER, E_INVALID_ARG,
+ SysTryReturnResult(NID_SHELL, badgeNumber >= 0 && badgeNumber <= MAX_NOTIFICATION_BADGE_NUMBER, E_INVALID_ARG,
"BadgeNumber is less than 0 or greater than MAX_NOTIFICATION_BADGE_NUMBER.");
__badgeOffset = 0;
_NotificationRequestImpl::SetBadgeOffset(int badgeOffset)
{
result r = E_SUCCESS;
- SysTryReturnResult(NID_APP, badgeOffset >= 0 && badgeOffset <= MAX_NOTIFICATION_BADGE_NUMBER, E_INVALID_ARG,
+ SysTryReturnResult(NID_SHELL, badgeOffset >= 0 && badgeOffset <= MAX_NOTIFICATION_BADGE_NUMBER, E_INVALID_ARG,
"BadgeOffset is less than 0 or greater than MAX_NOTIFICATION_BADGE_NUMBER.");
__badgeNumber = -1;
result
_NotificationRequestImpl::SetAlertText(const String& alertText)
{
- SysTryReturnResult(NID_APP, alertText.GetLength() > 0 && alertText.GetLength() <= MAX_NOTIFICATION_MESSAGE_LENGTH, E_INVALID_ARG,
+ SysTryReturnResult(NID_SHELL, alertText.GetLength() > 0 && alertText.GetLength() <= MAX_NOTIFICATION_MESSAGE_LENGTH, E_INVALID_ARG,
"AlertText is greater than MAX_NOTIFICATION_MESSAGE_LENGTH.");
__alertText = alertText;
result
_NotificationRequestImpl::SetAppMessage(const String& appMessage)
{
- SysTryReturnResult(NID_APP, appMessage.GetLength() <= MAX_NOTIFICATION_MESSAGE_LENGTH, E_INVALID_ARG,
+ SysTryReturnResult(NID_SHELL, appMessage.GetLength() <= MAX_NOTIFICATION_MESSAGE_LENGTH, E_INVALID_ARG,
"AppMessage is greater than MAX_NOTIFICATION_MESSAGE_LENGTH.");
- SysTryReturnResult(NID_APP, __appBinding, E_INVALID_OPERATION,
+ SysTryReturnResult(NID_SHELL, __appBinding, E_INVALID_OPERATION,
"The Notification instance is not bound to Application");
__appMessage = appMessage;
result
_NotificationRequestImpl::SetTitleText(const String& titleText)
{
- SysTryReturnResult(NID_APP, titleText.GetLength() <= MAX_NOTIFICATION_MESSAGE_LENGTH, E_INVALID_ARG,
+ SysTryReturnResult(NID_SHELL, titleText.GetLength() <= MAX_NOTIFICATION_MESSAGE_LENGTH, E_INVALID_ARG,
"TitleText is greater than MAX_NOTIFICATION_MESSAGE_LENGTH.");
__titleText = titleText;
return E_SUCCESS;
_NotificationRequestImpl::SetIconFilePath(const String& iconFilePath)
{
bool isExist = File::IsFileExist(iconFilePath);
- SysTryReturnResult(NID_APP, isExist, E_INVALID_ARG, "The Specified File is Invalid");
+ SysTryReturnResult(NID_SHELL, isExist, E_INVALID_ARG, "The Specified File is Invalid");
__iconFilePath = iconFilePath;
return E_SUCCESS;
_NotificationRequestImpl::SetSoundFilePath(const String& soundFilePath)
{
bool isExist = File::IsFileExist(soundFilePath);
- SysTryReturnResult(NID_APP, isExist, E_INVALID_ARG, "The Specified File is Invalid");
+ SysTryReturnResult(NID_SHELL, isExist, E_INVALID_ARG, "The Specified File is Invalid");
__soundFilePath = soundFilePath;
return E_SUCCESS;
break;
case ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE:
- SysTryReturnResult(NID_APP, __progressValue == -1 || (__progressValue >= 0 && __progressValue <= 100),
+ SysTryReturnResult(NID_SHELL, __progressValue == -1 || (__progressValue >= 0 && __progressValue <= 100),
E_INVALID_OPERATION, "Incompatible progress value %d.", __progressValue);
break;
default:
SetLastResult(E_INVALID_OPERATION);
- SysLogException(NID_APP, E_INVALID_OPERATION, "Invalid activity type %d.", type);
+ SysLogException(NID_SHELL, E_INVALID_OPERATION, "Invalid activity type %d.", type);
return E_INVALID_OPERATION;
}
result
_NotificationRequestImpl::SetOngoingActivityProgress(int progressValue)
{
- SysTryReturnResult(NID_APP, progressValue >= 0, E_INVALID_ARG, "The progress value is less than 0");
+ SysTryReturnResult(NID_SHELL, progressValue >= 0, E_INVALID_ARG, "The progress value is less than 0");
// use int type instead of OngoingActivityType to evade weired gcc optimization
int activitytype = static_cast<int>(GetOngoingActivityType());
- SysTryReturnResult(NID_APP, activitytype >= ONGOING_ACTIVITY_TYPE_TEXT && activitytype <= ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE,
+ SysTryReturnResult(NID_SHELL, activitytype >= ONGOING_ACTIVITY_TYPE_TEXT && activitytype <= ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE,
E_INVALID_OPERATION,"Invalid activity Type %d.", activitytype);
if (activitytype == ONGOING_ACTIVITY_TYPE_PROGRESS_PERCENTAGE)
{
- SysTryReturnResult(NID_APP, progressValue <= 100, E_INVALID_ARG,"Invalid Progress value");
+ SysTryReturnResult(NID_SHELL, progressValue <= 100, E_INVALID_ARG,"Invalid Progress value");
}
__progressValue = progressValue;
return E_SUCCESS;
result
_NotificationRequestImpl::SetNotificationStyle(NotificationStyle style)
{
- SysTryReturnResult(NID_APP, NOTIFICATION_STYLE_NORMAL <= style && style <= NOTIFICATION_STYLE_THUMBNAIL,
+ SysTryReturnResult(NID_SHELL, NOTIFICATION_STYLE_NORMAL <= style && style <= NOTIFICATION_STYLE_THUMBNAIL,
E_INVALID_ARG,"Invalid NotificationStyle %d.", style);
__notificationStyle = style;
_NotificationRequestImpl::GetMessageTextListN(void) const
{
std::unique_ptr<ArrayList> pStringList(new (std::nothrow) ArrayList);
- SysTryReturn(NID_APP, pStringList != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.",
+ SysTryReturn(NID_SHELL, pStringList != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.",
GetErrorMessage(E_OUT_OF_MEMORY));
pStringList->Construct();
for (int i=0; i<__pTextList->GetCount(); i++)
{
std::unique_ptr<String> pString(new (std::nothrow) String(*static_cast<String*>(__pTextList->GetAt(i))));
- SysTryReturn(NID_APP, pString != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.",
+ SysTryReturn(NID_SHELL, pString != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.",
GetErrorMessage(E_OUT_OF_MEMORY));
pStringList->Add(*pString.release());
}
String* pText = static_cast<String*>(__pTextList->GetAt(i));
if (pText)
{
- SysTryReturnResult(NID_APP, pText->GetLength() <= MAX_NOTIFICATION_MESSAGE_LENGTH, E_INVALID_ARG,
+ SysTryReturnResult(NID_SHELL, pText->GetLength() <= MAX_NOTIFICATION_MESSAGE_LENGTH, E_INVALID_ARG,
"Invalid argument is used. MessageText is greater than MAX_NOTIFICATION_MESSAGE_LENGTH.");
}
}
_NotificationRequestImpl::GetMessageThumbnailFilePathListN(void) const
{
std::unique_ptr<ArrayList> pStringList(new (std::nothrow) ArrayList);
- SysTryReturn(NID_APP, pStringList != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.",
+ SysTryReturn(NID_SHELL, pStringList != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.",
GetErrorMessage(E_OUT_OF_MEMORY));
pStringList->Construct();
for (int i=0; i<__pThumbnailPathList->GetCount(); i++)
{
std::unique_ptr<String> pString(new String(*static_cast<String*>(__pThumbnailPathList->GetAt(i))));
- SysTryReturn(NID_APP, pString != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.",
+ SysTryReturn(NID_SHELL, pString != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.",
GetErrorMessage(E_OUT_OF_MEMORY));
pStringList->Add(*pString.release());
}
if (pFilePath)
{
bool isExist = File::IsFileExist(*pFilePath);
- SysTryReturnResult(NID_APP, isExist, E_INVALID_ARG,"Invalid argument is used. The Specified File path is Invalid.");
+ SysTryReturnResult(NID_SHELL, isExist, E_INVALID_ARG,"Invalid argument is used. The Specified File path is Invalid.");
}
}
}
result
_NotificationRequestImpl::SetNotificationCountText(const Tizen::Base::String& notificationCountText)
{
- SysTryReturnResult(NID_APP, notificationCountText.GetLength() <= MAX_NOTIFICATION_MESSAGE_LENGTH, E_INVALID_ARG,
+ SysTryReturnResult(NID_SHELL, notificationCountText.GetLength() <= MAX_NOTIFICATION_MESSAGE_LENGTH, E_INVALID_ARG,
"Invalid argument is used. CountText is greater than MAX_NOTIFICATION_MESSAGE_LENGTH.");
__notificationCountText = notificationCountText;
return E_SUCCESS;
_NotificationRequestImpl::SetBackgroundImageFilePath(const Tizen::Base::String& imagePath)
{
bool fileExist = File::IsFileExist(imagePath);
- SysTryReturnResult(NID_APP, fileExist, E_INVALID_ARG,
+ SysTryReturnResult(NID_SHELL, fileExist, E_INVALID_ARG,
"Invalid argument is used. The Specified File is Invalid. %ls", imagePath.GetPointer());
__backgroundImagePath = imagePath;
return E_SUCCESS;
if( __pShortcutManagerImpl == null)
{
__pShortcutManagerImpl = new (std::nothrow)_ShortcutManagerImpl;
- SysTryReturn(NID_APP, __pShortcutManagerImpl, null, E_OUT_OF_MEMORY, "Allocating new _AppWidgetManagerProxy failed.");
+ SysTryReturn(NID_SHELL, __pShortcutManagerImpl, null, E_OUT_OF_MEMORY, "Allocating new _AppWidgetManagerProxy failed.");
result r = __pShortcutManagerImpl->Construct();
- SysTryReturn(NID_APP, !IsFailed(r), null, r, "[%s] Propagating.", GetErrorMessage(r));
+ SysTryReturn(NID_SHELL, !IsFailed(r), null, r, "[%s] Propagating.", GetErrorMessage(r));
}
return __pShortcutManagerImpl;
}
int ShortcutRequestEventHandlerCB(const char* appId, const char* text, int type, const char* content_info, const char* icon, int pid, double period, bool allowDuplication, void *data)
{
- SysTryReturn(NID_APP, appId, 0, E_SYSTEM, "[E_SYSTEM] appId is null!");
- SysLog(NID_APP, "Tizen::Shell::ShortcutManager - Shortcut request received.");
+ SysTryReturn(NID_SHELL, appId, 0, E_SYSTEM, "[E_SYSTEM] appId is null!");
+ SysLog(NID_SHELL, "Tizen::Shell::ShortcutManager - Shortcut request received.");
_ShortcutManagerImpl* pShortcutManager = static_cast<_ShortcutManagerImpl*>(data);
- SysTryReturn(NID_APP, pShortcutManager, 0, E_SYSTEM, "[E_SYSTEM] pShortcutManager is null!");
+ SysTryReturn(NID_SHELL, pShortcutManager, 0, E_SYSTEM, "[E_SYSTEM] pShortcutManager is null!");
const ArrayListT<IShortcutRequestListener*>* pListenerList = pShortcutManager->GetShortcutRequestListenerList();
IShortcutRequestListener* pListener;
- SysLog(NID_APP, "There is(are) %d request handler(s).", pListenerList->GetCount());
+ SysLog(NID_SHELL, "There is(are) %d request handler(s).", pListenerList->GetCount());
for(int i = 0; i < pListenerList->GetCount(); i ++)
{
pListener = null;
}
}
- SysLog(NID_APP, "Successed.");
+ SysLog(NID_SHELL, "Successed.");
return 0;
}
// c - style callback for shortcut_set_request_cb
int ShortcutRequestEventReceiverCB(const char* appId, const char* text, int type, const char* content_info, const char* icon, int pid, double period, int allowDuplication, void *data)
{
- SysTryReturn(NID_APP, appId, 0, E_SYSTEM, "[E_SYSTEM] providerId is null!");
+ SysTryReturn(NID_SHELL, appId, 0, E_SYSTEM, "[E_SYSTEM] providerId is null!");
if( type == SHORTCUT_PACKAGE
|| type == SHORTCUT_DATA
{
if( __pAppWidgetRequestHandlerCallback != null)
{
- SysLog(NID_APP, "Invoking appwidget request handler.");
+ SysLog(NID_SHELL, "Invoking appwidget request handler.");
__pAppWidgetRequestHandlerCallback(appId, text, type, content_info, icon, pid, period, allowDuplication, data);
}
}
- SysLog(NID_APP, "Successed.");
+ SysLog(NID_SHELL, "Successed.");
return 0;
}
_ShortcutManagerImpl::Construct()
{
int ret = shortcut_set_request_cb(ShortcutRequestEventReceiverCB, this );
- SysTryReturnResult(NID_APP, ret == 0, E_SYSTEM, "failed to shortcut_set_request_cb (%d)", ret);
+ SysTryReturnResult(NID_SHELL, ret == 0, E_SYSTEM, "failed to shortcut_set_request_cb (%d)", ret);
__shortcutRequestListenerList.Construct();
- SysLog(NID_APP, "Successed.");
+ SysLog(NID_SHELL, "Successed.");
return E_SUCCESS;
}
result
_ShortcutManagerImpl::AddShortcutRequestListener(IShortcutRequestListener& listener)
{
- SysTryReturnResult(NID_APP, !__shortcutRequestListenerList.Contains(&listener), E_OBJ_ALREADY_EXIST, "The listener is already added.");
- SysLog(NID_APP, "(%x)", &listener);
+ SysTryReturnResult(NID_SHELL, !__shortcutRequestListenerList.Contains(&listener), E_OBJ_ALREADY_EXIST, "The listener is already added.");
+ SysLog(NID_SHELL, "(%x)", &listener);
return __shortcutRequestListenerList.Add(&listener);
}
result
_ShortcutManagerImpl::RemoveShortcutRequestListener(IShortcutRequestListener& listener)
{
- SysLog(NID_APP, "(%x)", &listener);
+ SysLog(NID_SHELL, "(%x)", &listener);
return __shortcutRequestListenerList.Remove(&listener);
}