SysLog(NID_APP, "id(%ls), name(%ls), param(%ls)", pInstanceId->GetPointer(), pName->GetPointer(), pParam->GetPointer());
- if(this->ContainsLivebox(*pInstanceId) == false)
- {
- SysLog(NID_APP, "no livebox 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() );
- 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() );
- Integer::Parse(*pValue, height);
-
- this->CreateLivebox( *pName, *pInstanceId, width, height, *pParam);
-
- if(operationId == LIVEBOX_ON_RESIZE)
- {
- SysLog(NID_APP, "operation is resize, but livebox is already recreated with new size, so OnSize won't be called.");
- return;
- }
- }
-
if(operationId.StartsWith(L"LiveboxTray", 0) == true)
{
SysTryReturnVoidResult(NID_APP, __pLiveboxPopupProviderFactory, E_FAILURE, "[E_FAILURE] __pLiveboxPopupProviderFactory is null");
}
else
{
+ if(this->ContainsLivebox(*pInstanceId) == false)
+ {
+ SysLog(NID_APP, "no livebox 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() );
+ 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() );
+ Integer::Parse(*pValue, height);
+
+ this->CreateLivebox( *pName, *pInstanceId, width, height, *pParam);
+
+ if(operationId == LIVEBOX_ON_RESIZE)
+ {
+ SysLog(NID_APP, "operation is resize, but livebox is already recreated with new size, so OnSize won't be called.");
+ return;
+ }
+ }
+
SysTryReturnVoidResult(NID_APP, __pLiveboxFactory, E_FAILURE, "[E_FAILURE] __pLiveboxFactory is null");
HandleLiveboxRequest(operationId, pArgs);
}
if (operationId == LIVEBOX_TRAY_ON_CREATE)
{
+ int x = 0;
+ int y = 0;
int width = 0;
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() );
- const String* pValue = dynamic_cast<const String*>(pArgs->GetValue(ARG_KEY_WIDTH));
+ 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() );
+
+ 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() );
+ Integer::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() );
+ Integer::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() );
Integer::Parse(*pValue, width);
SysTryReturnResult(NID_APP, pValue, E_FAILURE, "Failed to GetValue(%ls)", ARG_KEY_HEIGHT.GetPointer() );
Integer::Parse(*pValue, height);
- this->CreateLiveboxPopupProvider(*pInstanceId, *pName);
+ this->CreateLiveboxPopupProvider(*pInstanceId, *pName, *pUserInfo, x, y, width, height);
return E_SUCCESS;
}
else if (operationId == LIVEBOX_TRAY_ON_DESTROY)
result
_LiveboxProviderManagerImpl::CreateLivebox(const String& name, const String& instanceId, int width, int height, const String& userInfo)
{
- SysLog(NID_APP, "instanceId(%ls), w:%d, h:%d", instanceId.GetPointer(), width, height);
+ SysLog(NID_APP, "instanceId(%ls), w:%d, h:%d, userInfo:%ls", instanceId.GetPointer(), width, height, userInfo.GetPointer());
SysTryReturnResult(NID_APP, __pLiveboxFactory, E_FAILURE, "[E_INVALID_OPERATION] __pLiveboxFactory should not be null");
if( ContainsLivebox(instanceId))
result
_LiveboxProviderManagerImpl::UpdateLivebox(const String& instanceId, int width, int height, const String& argument)
{
- SysLog(NID_APP, "instanceId(%ls), w:%d, h:%d", instanceId.GetPointer(), width, height);
+ SysLog(NID_APP, "instanceId(%ls), w:%d, h:%d, argument:%ls", instanceId.GetPointer(), width, height, argument.GetPointer() );
LiveboxProvider* pLivebox = null;
__liveBoxes.GetValue(instanceId, pLivebox);
result
_LiveboxProviderManagerImpl::RemoveLivebox(const String& instanceId, bool terminateIfFinished)
{
- SysLog(NID_APP, "instanceId(%ls)", instanceId.GetPointer() );
+ SysLog(NID_APP, "instanceId(%ls), terminateIfFinished(%s)", instanceId.GetPointer(), (terminateIfFinished)? "true":"false" );
// __pLiveboxEventListener->OnLiveboxRemoved(instanceId);
LiveboxProvider* pLiveboxProvider = null;
}
result
-_LiveboxProviderManagerImpl::CreateLiveboxPopupProvider(const String& instanceId, const String& providerName)
+_LiveboxProviderManagerImpl::CreateLiveboxPopupProvider(const String& instanceId, const String& providerName, const String& userInfo, int x, int y, int width, int height)
{
- SysLog(NID_APP, "instanceId(%ls)", instanceId.GetPointer());
+ SysLog(NID_APP, "instanceId(%ls), providerName(%ls), userInfo(%ls), rect(%d, %d, %d, %d)", instanceId.GetPointer(), providerName.GetPointer(), userInfo.GetPointer(), x, y, width, height );
SysTryReturnResult(NID_APP, __pLiveboxPopupProviderFactory, E_FAILURE, "[E_INVALID_OPERATION] __pLiveboxPopupProviderFactory should not be null");
LiveboxProvider* pLivebox = null;
__liveBoxes.GetValue(instanceId, pLivebox);
SysTryReturnResult(NID_APP, pLivebox, E_INVALID_OPERATION, "[E_INVALID_OPERATION]");
- LiveboxPopupProvider* pPd = __pLiveboxPopupProviderFactory->CreateInstance(providerName, L"");
+ LiveboxPopupProvider* pPd = __pLiveboxPopupProviderFactory->CreateInstance(providerName, userInfo);
__pLiveboxPopupProvider = pPd;
__pLiveboxPopupProvider->Construct(instanceId);
- __pLiveboxPopupProvider->OnLiveboxPopupProviderInitializing(L"");
+ __pLiveboxPopupProvider->OnLiveboxPopupProviderInitializing(userInfo);
LiveboxPopup* pLiveBoxFrame = pPd->GetLiveboxPopup();
SysTryReturnResult(NID_APP, pLiveBoxFrame, E_INVALID_OPERATION, "[E_INVALID_OPERATION]");