remove Doxygen warning
[platform/framework/native/net.git] / inc / FNetNetStatistics.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                FNetNetStatistics.h
20  * @brief               This is the header file for the %NetStatistics class.
21  *
22  * This header file contains the declarations of the %NetStatistics class.
23  */
24 #ifndef _FNET_NET_STATISTICS_H_
25 #define _FNET_NET_STATISTICS_H_
26
27 #include <FBaseObject.h>
28 #include <FBaseResult.h>
29 #include <FNetNetTypes.h>
30 #include <FNetNetAccountInfo.h>
31
32 namespace Tizen { namespace Net
33 {
34 class _NetStatisticsImpl;
35
36 /**
37  * @class       NetStatistics
38  * @brief       This class represents the statistical information of the data network.
39  *
40  * @since       2.0
41  *
42  * @remarks     The %NetStatistics class cannot be tested on the emulator.
43  *
44  * The %NetStatistics class provides methods for getting the statistical information of the data network.
45  *
46  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/net/network_statistics.htm">Network Statistics</a>.
47  */
48 class _OSP_EXPORT_ NetStatistics
49         : public Tizen::Base::Object
50 {
51 public:
52         /**
53          * The object is not fully constructed after this constructor is called. For full construction, the Construct() method must be called right after calling this constructor.
54          *
55          * @since               2.0
56          *
57          * @remarks             After creating an instance of this class, the Construct() method must be called explicitly to initialize this instance.
58          */
59         NetStatistics(void);
60
61         /**
62          * This destructor overrides Tizen::Base::Object::~Object().
63          *
64          * @since               2.0
65          */
66         virtual ~NetStatistics(void);
67
68         /**
69          * Initializes this instance of %NetStatistics.
70          *
71          * @since               2.0
72          *
73          * @return              An error code
74          * @exception   E_SUCCESS                       The method is successful.
75          * @exception   E_SYSTEM                        An internal error has occurred.
76          */
77         result Construct(void);
78
79 public:
80         /**
81          * Gets the statistical information. @n
82          * This can consist of details such as the call duration, the sent and received size, and so on.
83          *
84          * @since               2.0
85          *
86          * @privlevel   public
87          * @privilege   %http://tizen.org/privilege/network.statistics
88          * @feature             %http://tizen.org/feature/network.wifi for the NET_BEARER_WIFI value and @n
89          *                              %http://tizen.org/feature/network.telephony for the NET_BEARER_PS value of @c bearerType
90          *
91          * @return              The number of bytes sent or received, @n
92          *                              else @c INVALID_HANDLE if an error occurs
93          * @param[in]   bearerType                      The bearer type of the data call operation @n
94          *                                                                              NET_BEARER_WIFI_DIRECT and NET_BEARER_USB are not supported.
95          * @param[in]   netStatType                     The type of statistical information to get
96          * @exception   E_SUCCESS                       The method is successful.
97          * @exception   E_INVALID_ARG           A specified input parameter is invalid.
98          * @exception   E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
99          * @exception   E_UNSUPPORTED_OPERATION The target device does not support the required feature. @b Since: @b 2.1
100          *                                      For more information, see <a href=../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm>Application Filtering</a>.
101          * @remarks
102          *                              - The specific error code can be accessed using the GetLastResult() method.
103          *                              - Before calling this method, check whether the feature is supported by %Tizen::System::SystemInfo::GetValue() methods.
104          */
105         long long GetNetStatisticsInfo(NetBearerType bearerType, NetStatisticsInfoType netStatType) const;
106
107         /**
108          * Resets the specified statistical information on the network according to the operation mode.
109          *
110          * @since               2.0
111          *
112          * @privlevel   platform
113          * @privilege   %http://tizen.org/privilege/netstatisticsmanager
114          * @feature             %http://tizen.org/feature/network.wifi for the NET_BEARER_WIFI value and @n
115          *                              %http://tizen.org/feature/network.telephony for the NET_BEARER_PS value of @c bearerType
116          *
117          * @return              An error code
118          * @param[in]   bearerType                      The bearer type (OperationMode) whose statistical information is reset @n NET_BEARER_WIFI_DIRECT and NET_BEARER_USB are not supported.
119          * @param[in]   netStatType                     The type of statistical information to reset
120          * @exception   E_SUCCESS                       The method is successful.
121          * @exception   E_INVALID_ARG           A specified input parameter is invalid.
122          * @exception   E_SYSTEM                        An internal error has occurred.
123          * @exception   E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
124          * @exception   E_UNSUPPORTED_OPERATION The target device does not support the required feature. @b Since: @b 2.1
125          *                                      For more information, see <a href=../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm>Application Filtering</a>.
126          * @remarks
127          *                              - This method must use warning pop-up for user notification.
128          *                              - Before calling this method, check whether the feature is supported by %Tizen::System::SystemInfo::GetValue() methods.
129          * @see                 GetNetStatisticsInfo()
130          */
131         result Reset(NetBearerType bearerType, NetStatisticsInfoType netStatType);
132
133         /**
134          * Resets all the specified statistical information on the network according to the operation mode.
135          *
136          * @since               2.0
137          *
138          * @privlevel   platform
139          * @privilege   %http://tizen.org/privilege/netstatisticsmanager
140          * @feature             %http://tizen.org/feature/network.wifi for the NET_BEARER_WIFI value and @n
141          *                              %http://tizen.org/feature/network.telephony for the NET_BEARER_PS value of @c bearerType
142          *
143          * @return              An error code
144          * @param[in]   bearerType                      The bearer type (OperationMode) whose statistical information would be reset @n NET_BEARER_WIFI_DIRECT and NET_BEARER_USB are not supported.
145          * @exception   E_SUCCESS                       The method is successful.
146          * @exception   E_INVALID_ARG           The specified input parameter is invalid.
147          * @exception   E_SYSTEM                        An internal error has occurred.
148          * @exception   E_PRIVILEGE_DENIED      The application does not have the privilege to call this method.
149          * @exception   E_UNSUPPORTED_OPERATION The target device does not support the required feature. @b Since: @b 2.1
150          *                                      For more information, see <a href=../org.tizen.gettingstarted/html/tizen_overview/application_filtering.htm>Application Filtering</a>.
151          * @remarks
152          *                              - This method must use warning pop-up for user notification.
153          *                              - Before calling this method, check whether the feature is supported by %Tizen::System::SystemInfo::GetValue() methods.
154          * @see                 GetNetStatisticsInfo()
155          */
156         result ResetAll(NetBearerType bearerType);
157
158 private:
159         /*
160          * The implementation of this copy constructor is intentionally blank and declared as private to prohibit copying of objects.
161          *
162          * @param[in]   rhs                     An instance of %NetStatistics
163          */
164         NetStatistics(const NetStatistics& rhs);
165
166         /*
167          * The implementation of this copy assignment operator is intentionally blank and declared as private to prohibit copying of objects.
168          *
169          * @param[in]   rhs                     An instance of %NetStatistics
170          */
171         NetStatistics& operator =(const NetStatistics& rhs);
172
173 private:
174         _NetStatisticsImpl* __pNetStatisticsImpl;
175
176         friend class _NetStatisticsImpl;
177 }; // NetStatistics
178
179 } } //Tizen::Net
180 #endif // _FNET_NET_STATISTICS_H_