merge with master
[platform/framework/native/telephony.git] / src / FTel_TelephonyIpcProxy.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
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
8 //
9 //     http://www.apache.org/licenses/LICENSE-2.0
10 //
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.
16 //
17
18 /**
19  * @file        FTel_TelephonyIpcProxy.h
20  * @brief       This is the header file for the %_TelephonyIpcProxy class.
21  *
22  * This header file contains the declarations of the %_TelephonyIpcProxy class.
23  */
24
25 #ifndef _FNET_WIFI_INTERNAL_TELEPHONY_IPC_PROXY_H_
26 #define _FNET_WIFI_INTERNAL_TELEPHONY_IPC_PROXY_H_
27
28 #include <tapi_type.h>
29 #include <FBaseObject.h>
30 #include <FIo_IpcCommonDataTypes.h>
31 #include <FIo_IIpcClientEventListener.h>
32
33 namespace Tizen { namespace Base {
34 class String;
35 } }
36
37 namespace Tizen { namespace Io {
38 class _IpcClient;
39 } }
40
41 namespace Tizen { namespace Telephony
42 {
43
44 class _NetworkManagerImpl;
45 class _CallManagerImpl;
46
47 /**
48  * @class   _TelephonyIpcProxy
49  * @brief   This class represents an IPC proxy for %Telephony service.
50  *
51  * This class represents an IPC proxy for %Telephony service to communicate with OSP Connectivity daemon.
52  */
53 class _TelephonyIpcProxy
54         : public Tizen::Base::Object
55         , public Tizen::Io::_IIpcClientEventListener
56 {
57 public:
58
59     // from _IIpcClientEventListener
60     virtual void OnIpcResponseReceived(Tizen::Io::_IpcClient& client, const IPC::Message& message);
61
62         result Construct(void);
63         result GetImsi(Tizen::Base::String& imsi) const;
64         result HasSystemPrivilege(void);
65         result GetNetworkSelectionMode(void);
66         result SelectNetwork(const Tizen::Base::String& plmn, const int netwokrType);
67     result SelectNetwork(void);
68     result SearchNetwork(void);
69
70         result HasCallForwardPrivilege(void);
71     result RequestCallForward(const Tizen::Base::String& phoneNumber);
72     result StopCallForward(void);
73     result GetCallForwardNumber(void);
74
75     void SetNetworkManagerImpl(_NetworkManagerImpl& impl);
76     void SetCallManagerImpl(_CallManagerImpl& impl);
77
78     static _TelephonyIpcProxy* GetInstance(void);
79
80 private:
81         _TelephonyIpcProxy(void);
82         virtual ~_TelephonyIpcProxy(void);
83
84
85         _TelephonyIpcProxy(const _TelephonyIpcProxy& value);
86         _TelephonyIpcProxy& operator =(const _TelephonyIpcProxy& rhs);
87
88         void OnNetworkSelectionModeReceived(bool isManual, unsigned long res);
89         void OnNetworkSelectionCompleted(unsigned long res);
90         void OnNetworkSearchCompleted(Tizen::Base::String message, unsigned long res);
91
92         void OnTelephonyCallForwardNumberReceived(Tizen::Base::String phoneNumber, unsigned long res);
93         void OnTelephonyCallForwardResponseReceived(Tizen::Base::String phoneNumber, unsigned long res);
94         void OnTelephonyCallForwardStopped(Tizen::Base::String phoneNumber, unsigned long res);
95
96         static void InitSingleton(void);
97         
98 private:
99         Tizen::Io::_IpcClient* __pIpcClient;
100         _NetworkManagerImpl* __pNetworkManagerImpl;
101         _CallManagerImpl* __pCallManagerImpl;
102         static _TelephonyIpcProxy* __pInstance;
103
104 }; // _TelephonyIpcProxy
105
106 }}
107 #endif // _FNET_WIFI_INTERNAL_TELEPHONY_IPC_PROXY_H_