2 // Open Service Platform
3 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 // Licensed under the Apache License, Version 2.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
9 // http://www.apache.org/licenses/LICENSE-2.0
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an "AS IS" BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
19 * @file FShell_AppWidgetManagerStub.h
20 * @brief This is the header file for the %_AppWidgetManagerStub class.
22 * This header file contains the declarations of the %_AppWidgetManagerStub class.
25 #ifndef _FSHELL_INTERNAL_APPWIDGET_MANAGER_STUB_H_
26 #define _FSHELL_INTERNAL_APPWIDGET_MANAGER_STUB_H_
28 #include <FBaseObject.h>
29 #include <FBaseString.h>
30 #include <FBaseRtIEventListener.h>
34 #include <FIo_IIpcServerEventListener.h>
35 //#include <FApp_IAppManager.h>
38 namespace Tizen { namespace Shell { namespace App {
41 * @class _AppWidgetManagerStub
42 * @brief Handles IPC requests and calls real methods.
45 class _AppWidgetManagerStub
46 : public Tizen::Base::Object
47 , public Tizen::Io::_IIpcServerEventListener
48 , virtual public Tizen::Base::Runtime::IEventListener
52 bool SendTouchEvent(const int clientId, const Tizen::Base::String& instanceId, int eventType, double timestamp, double x, double y);
53 bool SendTouchEventForPD(const int clientId, const Tizen::Base::String& instanceId, int eventType, double timestamp, double x, double y);
56 _AppWidgetManagerStub(void);
57 virtual ~_AppWidgetManagerStub(void);
60 bool OnRequestUpdate(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Base::String& argument, result* pRes);
61 bool OnRequestUpdateInstance(const Tizen::Base::String& instanceId, const Tizen::Base::String& argument, result* pRes);
62 bool OnRequestSharedMemoryId(const Tizen::Base::String& instanceId, int width, int height, int* pShmId);
63 bool OnRequestSharedMemoryIdForPD(const Tizen::Base::String& instanceId, int width, int height, int* pShmId);
64 bool OnRequestSyncSharedMemory(const Tizen::Base::String& instanceId, int width, int height, result* pRes);
65 bool OnRequestSyncSharedMemoryForPD(const Tizen::Base::String& instanceId, result* pRes);
66 bool OnRequestReleaseSharedMemory(const Tizen::Base::String& instanceId, result* pRes);
67 bool OnRequestReleaseSharedMemoryForPD(const Tizen::Base::String& instanceId, result* pRes);
69 // interface to service
70 virtual result RequestUpdate(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Base::String& argument) = 0;
71 virtual result RequestUpdateInstance(const Tizen::Base::String& instanceId, const Tizen::Base::String& argument) = 0;
72 virtual result RequestSharedMemoryId(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId, int width, int height, int& shmId) = 0;
73 virtual result RequestSharedMemoryIdForPD(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId, int width, int height, int& shmId) = 0;
74 virtual result RequestSyncSharedMemory(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId, int width, int height) = 0;
75 virtual result RequestSyncSharedMemoryForPD(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId) = 0;
76 virtual result RequestReleaseSharedMemory(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId) = 0;
77 virtual result RequestReleaseSharedMemoryForPD(const Tizen::App::AppId& appId, const Tizen::Base::String& instanceId) = 0;
79 // _IIpcServerEventListener
80 virtual void OnIpcServerStarted(const Tizen::Io::_IpcServer& server);
81 virtual void OnIpcServerStopped(const Tizen::Io::_IpcServer& server);
82 virtual void OnIpcClientConnected(const Tizen::Io::_IpcServer& server, int clientId);
83 virtual void OnIpcClientDisconnected(const Tizen::Io::_IpcServer&server, int clientId);
84 virtual void OnIpcRequestReceived(Tizen::Io::_IpcServer& server, const IPC::Message& message);
86 result StartIpcServer(void);
89 _AppWidgetManagerStub(const _AppWidgetManagerStub& value);
90 _AppWidgetManagerStub& operator =(const _AppWidgetManagerStub& source);
94 Tizen::Io::_IpcServer *__pIpcServer;
95 }; //_AppWidgetManagerStub
99 #endif//_FSHELL_INTERNAL_APPWIDGET_MANAGER_STUB_H_