2 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 // Licensed under the Flora License, Version 1.1 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://floralicense.org/license/
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file FShell_AppWidgetManagerStub.h
19 * @brief This is the header file for the %_AppWidgetManagerStub class.
21 * This header file contains the declarations of the %_AppWidgetManagerStub class.
24 #ifndef _FSHELL_INTERNAL_APPWIDGET_MANAGER_STUB_H_
25 #define _FSHELL_INTERNAL_APPWIDGET_MANAGER_STUB_H_
27 #include <FBaseObject.h>
28 #include <FBaseString.h>
29 #include <FBaseRtIEventListener.h>
33 #include <FIo_IIpcServerEventListener.h>
34 //#include <FApp_IAppManager.h>
37 namespace Tizen { namespace Shell { namespace App {
40 * @class _AppWidgetManagerStub
41 * @brief Handles IPC requests and calls real methods.
44 class _AppWidgetManagerStub
45 : public Tizen::Base::Object
46 , public Tizen::Io::_IIpcServerEventListener
47 , virtual public Tizen::Base::Runtime::IEventListener
51 bool SendTouchEvent(const int clientId, const Tizen::Base::String& instanceId, int eventType, double timestamp, double x, double y);
52 bool SendTouchEventForPD(const int clientId, const Tizen::Base::String& instanceId, int eventType, double timestamp, double x, double y);
55 _AppWidgetManagerStub(void);
56 virtual ~_AppWidgetManagerStub(void);
59 bool OnRequestUpdate(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Base::String& argument, result* pRes);
60 bool OnRequestUpdateInstance(const Tizen::Base::String& instanceId, const Tizen::Base::String& argument, result* pRes);
61 bool OnRequestSharedMemoryId(const Tizen::Base::String& instanceId, int width, int height, int* pShmId);
62 bool OnRequestSharedMemoryIdForPD(const Tizen::Base::String& instanceId, int width, int height, int* pShmId);
63 bool OnRequestSyncSharedMemory(const Tizen::Base::String& instanceId, int width, int height, result* pRes);
64 bool OnRequestSyncSharedMemoryForPD(const Tizen::Base::String& instanceId, result* pRes);
65 bool OnRequestReleaseSharedMemory(const Tizen::Base::String& instanceId, result* pRes);
66 bool OnRequestReleaseSharedMemoryForPD(const Tizen::Base::String& instanceId, result* pRes);
68 // interface to service
69 virtual result RequestUpdate(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Base::String& argument) = 0;
70 virtual result RequestUpdateInstance(const Tizen::Base::String& instanceId, const Tizen::Base::String& argument) = 0;
71 virtual result RequestSharedMemoryId(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId, int width, int height, int& shmId) = 0;
72 virtual result RequestSharedMemoryIdForPD(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId, int width, int height, int& shmId) = 0;
73 virtual result RequestSyncSharedMemory(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId, int width, int height) = 0;
74 virtual result RequestSyncSharedMemoryForPD(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId) = 0;
75 virtual result RequestReleaseSharedMemory(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId) = 0;
76 virtual result RequestReleaseSharedMemoryForPD(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId) = 0;
78 // _IIpcServerEventListener
79 virtual void OnIpcServerStarted(const Tizen::Io::_IpcServer& server);
80 virtual void OnIpcServerStopped(const Tizen::Io::_IpcServer& server);
81 virtual void OnIpcClientConnected(const Tizen::Io::_IpcServer& server, int clientId);
82 virtual void OnIpcClientDisconnected(const Tizen::Io::_IpcServer&server, int clientId);
83 virtual void OnIpcRequestReceived(Tizen::Io::_IpcServer& server, const IPC::Message& message);
85 result StartIpcServer(void);
88 _AppWidgetManagerStub(const _AppWidgetManagerStub& value);
89 _AppWidgetManagerStub& operator =(const _AppWidgetManagerStub& source);
93 Tizen::Io::_IpcServer *__pIpcServer;
94 }; //_AppWidgetManagerStub
98 #endif//_FSHELL_INTERNAL_APPWIDGET_MANAGER_STUB_H_