Adding a function to get the provider count
[platform/framework/native/shell.git] / src / inc / FShell_AppWidgetManagerProxy.h
1 //
2 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
3 //
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
7 //
8 //     http://floralicense.org/license/
9 //
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.
15 //
16 /**
17  * @file        FShell_AppWidgetManagerProxy.h
18  * @brief       This is the header file for the _AppWidgetManagerProxy class.
19  *
20  * This header file contains the declarations of the _AppWidgetManagerProxy class.
21  */
22
23 #ifndef _FSHELL_APPWIDGET_MANAGER_PROXY_H_
24 #define _FSHELL_APPWIDGET_MANAGER_PROXY_H_
25
26 #include <FBaseObject.h>
27 #include <FIo_IIpcClientEventListener.h>
28 #include <FIo_IpcClient.h>
29
30 namespace Tizen { namespace Base  { namespace Collection
31 {
32 class HashMap;
33 }}}
34
35 namespace Tizen { namespace Shell {
36
37 class _AppWidgetManagerProxy
38         : public Tizen::Io::_IIpcClientEventListener
39         , public Tizen::Base::Object
40 {
41 public:
42         _AppWidgetManagerProxy();
43         virtual ~_AppWidgetManagerProxy();
44
45         static _AppWidgetManagerProxy* GetInstance();
46         result Construct(void);
47
48         result RequestUpdate(const Tizen::App::AppId& appId, const Tizen::Base::String& providerName, const Tizen::Base::String& argument);
49         result RequestUpdateInstance(const Tizen::Base::String& instanceId, const Tizen::Base::String& argument);
50
51         result RequestSharedMemoryId(const Tizen::Base::String& instanceId, int w, int h, int& shmId);
52         result RequestSharedMemoryIdForPD(const Tizen::Base::String& instanceId, int w, int h, int& shmId);
53         result RequestSyncSharedMemory(const Tizen::Base::String& instanceId, int width, int height);
54         result RequestSyncSharedMemoryForPD(const Tizen::Base::String& instanceId);
55         result RequestReleaseSharedMemory(const Tizen::Base::String& instanceId);
56         result RequestReleaseSharedMemoryForPD(const Tizen::Base::String& instanceId);
57         result RequestProviderCount(const Tizen::Base::String& instanceId, int& providerCount);
58         result SendResult(const Tizen::Base::String& instanceId, bool isSucceeded);
59         result SendAccessStatus(const Tizen::Base::String& instanceId, int accessStatus);
60
61         result OnAppWidgetEventReceived(const Tizen::Base::String& instanceId, const Tizen::Base::String& operationId, const Tizen::Base::Collection::HashMap& args);
62         result OnTouchEventReceived(const Tizen::Base::String& instanceId, int eventType, double timeStamp, double x, double y );
63         result OnTouchEventReceivedForPD(const Tizen::Base::String& instanceId, int eventType, double timeStamp, double x, double y );
64
65         bool IsConnected(void) const;
66
67 private:
68         virtual void OnIpcResponseReceived(Tizen::Io::_IpcClient& client, const IPC::Message& message);
69         virtual void OnIpcServerDisconnected(Tizen::Io::_IpcClient& client);
70
71 private:
72         Tizen::Io::_IpcClient* __pIpcClient;
73 };
74
75 }} // Tizen::Shell
76
77 #endif /* _FSHELL_APPWIDGET_MANAGER_PROXY_H_ */