Remove priviledge check for powermanager.
[platform/framework/native/appfw.git] / src / system / FSys_CommunicationDispatcherClient.h
1 //
2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
3 //
4 // Licensed under the Apache License, Version 2.0 (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://www.apache.org/licenses/LICENSE-2.0
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 /**
18  * @file                FSys_CommunicationDispatcherClient.h
19  * @brief               This is the header file for the _CommunicationDispatcherClient class.
20  */
21
22 #ifndef _FSYS_INTERNAL_COMMUNICATION_DISPATCHER_CLIENT_IMPL_H_
23 #define _FSYS_INTERNAL_COMMUNICATION_DISPATCHER_CLIENT_IMPL_H_
24
25 #include <FBaseString.h>
26 #include <FBaseComparerT.h>
27 #include <FBaseStringHashCodeProvider.h>
28 #include <FBaseColHashMapT.h>
29
30 #include <FIo_IpcClient.h>
31 #include <FIo_IIpcClientEventListener.h>
32 #include <FSys_ICommunicationDispatcherListener.h>
33
34 namespace Tizen { namespace System
35 {
36
37 class _CommunicationDispatcherClient
38         : public Tizen::Io::_IIpcClientEventListener
39 {
40 private:
41         _CommunicationDispatcherClient();
42         ~_CommunicationDispatcherClient();
43
44 public:
45         result RegisterCommunicationListener(Tizen::Base::String key, _ICommunicationDispatcherListener& listener);
46         result UnregisterCommunicationListener(Tizen::Base::String key);
47         void OnIpcResponseReceived(Tizen::Io::_IpcClient& client, const IPC::Message& message);
48         void OnDataReceived(const Tizen::Base::Collection::ArrayList& data);
49
50         Tizen::Io::_IpcClient* GetIpcClient(void);
51         static _CommunicationDispatcherClient* GetInstance(void);
52
53 private:
54         Tizen::Io::_IpcClient*          __pIpcClient;
55         Tizen::Base::Collection::HashMapT<Tizen::Base::String, _ICommunicationDispatcherListener*>      __communicationDispatcherClientList;
56         Tizen::Base::ComparerT<Tizen::Base::String>                                                     __strComparer;
57         Tizen::Base::StringHashCodeProvider                                                             __strHashCodeProvider;
58
59 private:
60         static _CommunicationDispatcherClient* __pCommunicationDispatcherClient;
61 };
62
63 }} // Tizen::System
64
65 #endif //_FSYS_INTERNAL_COMMUNICATION_DISPATCHER_CLIENT_IMPL_H_