Merge "Add the exception handling when using manual cert mode" into tizen_2.1
[platform/framework/native/net.git] / src / FNet_NetIpcProxy.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        FNet_NetIpcProxy.h
20  * @brief       This is the header file for the %_NetIpcProxy class.
21  *
22  * This header file contains the declarations of the %_NetIpcProxy class.
23  */
24
25 #ifndef _FNET_INTERNAL_NET_IPC_PROXY_H_
26 #define _FNET_INTERNAL_NET_IPC_PROXY_H_
27
28 #include <FBaseObject.h>
29 #include "FNet_NetUtility.h"
30
31 // Forward declaration
32 namespace Tizen { namespace Base
33 {
34 class String;
35 } }
36
37 namespace Tizen { namespace Io
38 {
39 class _IpcClient;
40 } }
41
42 namespace Tizen { namespace Net
43 {
44
45 /**
46  * @class   _NetIpcProxy
47  * @brief   This class represents an IPC proxy for %Net service.
48  *
49  * This class represents an IPC proxy for %Net service to communicate with OSP Connectivity daemon.
50  */
51 class _NetIpcProxy
52         : public Tizen::Base::Object
53 {
54 public:
55         static _NetIpcProxy* GetInstance(void);
56
57         result GetAppNetAccountId(const Tizen::Base::String& netProfileName, NetAccountId& netAccountId) const;
58         result SetNetAccountId(NetAccountId netAccountId, NetAccountId& netAccountId2);
59         result UpdateSystemNetAccount(const Tizen::Base::String& profileName, const NetAccountInfo& netAccountInfo, NetBearerType bearerType);
60         result ResetNetStatistics(NetBearerType bearerType, NetStatisticsInfoType statType);
61         result ResetAllNetStatistics(NetBearerType bearerType);
62
63 private:
64         _NetIpcProxy(void);
65         virtual ~_NetIpcProxy(void);
66         result Construct(void);
67
68         _NetIpcProxy(const _NetIpcProxy& value);
69         _NetIpcProxy& operator =(const _NetIpcProxy& rhs);
70
71         static void InitSingleton(void);
72
73 private:
74         std::unique_ptr<Tizen::Io::_IpcClient> __pIpcClient;
75         static _NetIpcProxy* __pInstance;
76
77 }; // _NetIpcProxy
78
79 }}
80 #endif // _FNET_INTERNAL_NET_IPC_PROXY_H_