Merge "Add the exception handling when using manual cert mode" into tizen_2.1
[platform/framework/native/net.git] / src / FNet_NetStatisticsImpl.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  * @file                FNet_NetStatisticsImpl.h
19  * @brief               This is the header file for the _NetStatisticsImpl class.
20  */
21
22 #ifndef _FNET_INTERNAL_NET_STATISTICS_IMPL_H_
23 #define _FNET_INTERNAL_NET_STATISTICS_IMPL_H_
24
25 #include <FBaseDataType.h>
26 #include <FBaseObject.h>
27 #include <FNetNetTypes.h>
28 #include "FNet_NetUtility.h"
29
30 namespace Tizen { namespace Net
31 {
32 class NetStatistics;
33
34 class _NetStatisticsImpl
35         : public Tizen::Base::Object
36 {
37 public:
38         /**
39          * This is the default constructor for this class.
40          *
41          * @since 2.1
42          * @remarks             After creating an instance of this class, the Construct() method must be called explicitly to initialize this instance.
43          * @see                 Construct()
44          */
45         _NetStatisticsImpl(void);
46
47         /**
48          * This is the destructor for this class.
49          *
50          * @since 2.1
51          */
52         virtual ~_NetStatisticsImpl(void);
53
54         /**
55          * @see                 NetStatistics::Construct()
56          */
57         result Construct(void);
58
59 public:
60         /**
61          * @see                 NetStatistics::GetNetStatisticsInfo()
62          */
63         long long GetNetStatisticsInfo(NetBearerType bearerType, NetStatisticsInfoType netStatType) const;
64
65         /**
66          * @see                 NetStatistics::Reset()
67          */
68         result Reset(NetBearerType bearerType, NetStatisticsInfoType netStatType);
69
70         /**
71          * @see                 NetStatistics::ResetAll()
72          */
73         result ResetAll(NetBearerType bearerType);
74
75 public:
76     /**
77      * Gets the Impl instance.
78      *
79      * @since 2.1
80      * @return              The pointer to _NetStatisticsImpl
81         * @param[in]   netStatistics            An instance of NetStatistics
82      */
83         static _NetStatisticsImpl* GetInstance(NetStatistics& netStatistics);
84
85     /**
86      * Gets the Impl instance.
87      *
88      * @since 2.1
89      * @return              The pointer to  _NetStatisticsImpl
90         * @param[in]   netStatistics     An instance of NetStatistics
91      */
92         static const _NetStatisticsImpl* GetInstance(const NetStatistics& netStatistics);
93
94 private:
95         /*
96          * This is the copy constructor for this class. @n
97          * Do @b not use directly.
98          *
99          * @param[in]   rhs                     An instance of _NetStatisticsImpl
100          */
101         _NetStatisticsImpl(const _NetStatisticsImpl& rhs);
102
103         /*
104          * This is the assignment operator. Do @b not use directly.
105          *
106          * @param[in]   rhs                     An instance of _NetStatisticsImpl
107          */
108         _NetStatisticsImpl& operator =(const _NetStatisticsImpl& rhs);
109
110 private:
111         bool __isConstructed;
112         std::unique_ptr<void, _ConnectionDeleter> __pConnectionHandle;
113         friend class NetStatistics;
114 }; // _NetStatisticsImpl
115
116 } } // Tizen::Net
117
118 #endif // _FNET_INTERNAL_NET_STATISTICS_IMPL_H_