#include <stdlib.h>
#include <unique_ptr.h>
-
-#include "provider_buffer.h"
-
-#include <FBase.h>
+#include <provider.h>
#include <FBaseSysLog.h>
+#include <FBaseInteger.h>
+#include <FBaseDouble.h>
+#include <FBaseColHashMap.h>
+#include <FBaseColAllElementsDeleter.h>
#include <FBase_StringConverter.h>
-
#include <FApp_AppControlManager.h>
-
#include "FShell_AppWidgetManagerService.h"
#include "FShell_AppWidgetContext.h"
#include "FShell_AppWidgetPopupContext.h"
using namespace Tizen::Base;
using namespace Tizen::Base::Collection;
-
-const char APPWIDGET_POPUP_ON_CREATE[] = "http://tizen.org/appcontrol/appwidgetpopup/create";
-const char APPWIDGET_POPUP_ON_DESTROY[] = "http://tizen.org/appcontrol/appwidgetpopup/destroy";
-const char APPWIDGET_POPUP_ON_TOUCH[] = "http://tizen.org/appcontrol/appwidgetpopup/touch";
-
+const wchar_t APPWIDGET_POPUP_ON_CREATE[] = L"http://tizen.org/appcontrol/appwidgetpopup/create";
+const wchar_t APPWIDGET_POPUP_ON_DESTROY[] = L"http://tizen.org/appcontrol/appwidgetpopup/destroy";
+const wchar_t APPWIDGET_POPUP_ON_TOUCH[] = L"http://tizen.org/appcontrol/appwidgetpopup/touch";
_AppWidgetPopupContext::_AppWidgetPopupContext(const String& info, const String& appId, const String& instanceId, int width, int height, int priority, _AppWidgetContext* pParent)
:_AppWidgetContextBase(TYPE_PD, info, appId, instanceId, width, height, priority)
{
__pParent = pParent;
- SysLog(NID_SHELL, "appId(%ls), instanceId(%ls), width(%d), height(%d)", __providerId.GetPointer(), __instanceId.GetPointer(), __width, __height);
+ SysLog(NID_SHELL, "appId(%ls), instanceId(%ls), width(%d), height(%d)", GetProviderId().GetPointer(), GetInstanceId().GetPointer(), GetWidth(), GetHeight());
}
-_AppWidgetPopupContext::~_AppWidgetPopupContext()
+_AppWidgetPopupContext::~_AppWidgetPopupContext(void)
{
- SysLog(NID_SHELL, "appId(%ls), instanceId(%ls), width(%d), height(%d))", __providerId.GetPointer(), __instanceId.GetPointer(), __width, __height);
+ SysLog(NID_SHELL, "appId(%ls), instanceId(%ls), width(%d), height(%d))", GetProviderId().GetPointer(), GetInstanceId().GetPointer(), GetWidth(), GetHeight());
}
-
void
_AppWidgetPopupContext::OnPopupCreated(double x, double y, int width, int height)
{
}
void
-_AppWidgetPopupContext::OnPopupDestoyed()
+_AppWidgetPopupContext::OnPopupDestoyed(void)
{
SysLog(NID_SHELL, "");
SendPopupDestroyRequest();
pArgs->Add(new String(ARG_KEY_POPUP_WIDTH), new String(Integer::ToString(width)));
pArgs->Add(new String(ARG_KEY_POPUP_HEIGHT), new String(Integer::ToString(height)));
- return SendRequestToApp( __appId, APPWIDGET_POPUP_ON_CREATE, pArgs.get());
+ return SendRequestToApp(GetAppId(), APPWIDGET_POPUP_ON_CREATE, pArgs.get());
}
result
-_AppWidgetPopupContext::SendPopupDestroyRequest()
+_AppWidgetPopupContext::SendPopupDestroyRequest(void)
{
std::unique_ptr<HashMap, AllElementsDeleter> pArgs (CreateRequestArgsN() );
- return SendRequestToApp( __appId, APPWIDGET_POPUP_ON_DESTROY, pArgs.get());
+ return SendRequestToApp(GetAppId(), APPWIDGET_POPUP_ON_DESTROY, pArgs.get());
}
result
_AppWidgetPopupContext::SendTouchEvent(buffer_event event, double timestamp, double x, double y)
{
SysLog(NID_SHELL, "");
- /*if( HasValidClientId() == false )
- {
- std::unique_ptr<ArrayList, AllElementsDeleter> pArgs (new (std::nothrow) ArrayList);
- pArgs->Construct();
- pArgs->Add(*new String(__instanceId));
- pArgs->Add(*new String(__info));
- pArgs->Add(*new String(Integer::ToString(event)));
- pArgs->Add(*new String(Double::ToString(timestamp)));
- pArgs->Add(*new String(Double::ToString(x)));
- pArgs->Add(*new String(Double::ToString(y)));
-
- return SendRequestToApp( __appId, APPWIDGET_POPUP_ON_TOUCH, pArgs.get());
- }
- else*/
- {
-// SysAssertf( Tizen::App::AppManager::GetInstance()->IsRunning(__appId) == false, "application isn't running");
- AppWidgetManagerService::GetInstance()->SendTouchEventForPD(__ipcClientId, __instanceId, event, timestamp, x, y);
- }
+ AppWidgetManagerService::GetInstance()->SendTouchEventForPD(GetClientId(), GetInstanceId(), event, timestamp, x, y);
return E_SUCCESS;
}
result
-_AppWidgetPopupContext::RequestUpdateRemote()
+_AppWidgetPopupContext::RequestUpdateRemote(void)
{
- std::unique_ptr<char[]> packageName(_StringConverter::CopyToCharArrayN(__providerId));
- std::unique_ptr<char[]> id(_StringConverter::CopyToCharArrayN(__instanceId));
+ std::unique_ptr<char[]> packageName(_StringConverter::CopyToCharArrayN(GetProviderId()));
+ std::unique_ptr<char[]> id(_StringConverter::CopyToCharArrayN(GetInstanceId()));
int ret = provider_send_desc_updated(packageName.get(), id.get(), null);
SysTryReturnResult(NID_SHELL, ret >= 0 , E_SYSTEM, "[E_SYSTEM] failed to provider_send_updated");
{
HashMap* pArgs = new (std::nothrow) HashMap(SingleObjectDeleter);
pArgs->Construct();
- pArgs->Add(new String(ARG_KEY_INSTANCE_ID), new String(__instanceId));
- pArgs->Add(new String(ARG_KEY_PROVIDER_NAME), new String(__providerName));
- pArgs->Add(new String(ARG_KEY_USER_INFO), new String(__userInfo));
- pArgs->Add(new String(ARG_KEY_WIDTH), new String(Integer::ToString(__pParent->__width)));
- pArgs->Add(new String(ARG_KEY_HEIGHT), new String(Integer::ToString(__pParent->__height)));
+ pArgs->Add(new String(ARG_KEY_INSTANCE_ID), new String(GetInstanceId()));
+ pArgs->Add(new String(ARG_KEY_PROVIDER_NAME), new String(GetProviderName()));
+ pArgs->Add(new String(ARG_KEY_USER_INFO), new String(GetUserInfo()));
+ pArgs->Add(new String(ARG_KEY_WIDTH), new String(Integer::ToString(__pParent->GetWidth())));
+ pArgs->Add(new String(ARG_KEY_HEIGHT), new String(Integer::ToString(__pParent->GetHeight())));
return pArgs;
}
-} } } // Tizen::Shell::App {
-
+}}} // Tizen::Shell::App