remove link in brief tag
[platform/framework/native/net.git] / inc / FNetNetConnectionInfo.h
1 //\r
2 // Open Service Platform\r
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.\r
4 //\r
5 // Licensed under the Apache License, Version 2.0 (the License);\r
6 // you may not use this file except in compliance with the License.\r
7 // You may obtain a copy of the License at\r
8 //\r
9 //     http://www.apache.org/licenses/LICENSE-2.0\r
10 //\r
11 // Unless required by applicable law or agreed to in writing, software\r
12 // distributed under the License is distributed on an "AS IS" BASIS,\r
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
14 // See the License for the specific language governing permissions and\r
15 // limitations under the License.\r
16 //\r
17 \r
18 /**\r
19  * @file                FNetNetConnectionInfo.h \r
20  * @brief               This is the header file for the %NetConnectionInfo class.\r
21  *\r
22  * This header file contains the declarations of the %NetConnectionInfo class.\r
23  */\r
24 #ifndef _FNET_NET_CONNECTION_INFO_H_\r
25 #define _FNET_NET_CONNECTION_INFO_H_\r
26 \r
27 #include <FBaseObject.h>\r
28 #include <FBaseResult.h>\r
29 #include <FNetNetTypes.h>\r
30 #include <FNetIpAddress.h>\r
31 \r
32 namespace Tizen { namespace Net {\r
33 class _NetConnectionInfoImpl;\r
34 \r
35 /**\r
36  * @class       NetConnectionInfo \r
37  * @brief       This class represents a base type for the information related to a network connection.\r
38  *\r
39  * @since       2.0\r
40  *\r
41  *      The %NetConnectionInfo class provides methods to obtain information related to a network connection. %NetConnectionInfo is valid when \r
42  *      NetConnection is not in the ::NET_CONNECTION_STATE_STOPPED state.\r
43  *\r
44  * For more information on the class features, see <a href="../org.tizen.native.appprogramming/html/guide/net/managing_network_connections.htm">Managing Network Connections</a>.\r
45  */\r
46 class _OSP_EXPORT_ NetConnectionInfo\r
47         : public Tizen::Base::Object\r
48 {\r
49 public:\r
50 \r
51         /**\r
52          * This is the default constructor for this class.\r
53          *\r
54          * @since       2.0\r
55          *\r
56          * @remarks             The GetLastResult() method is used to check whether the %NetConnectionInfo instance is created successfully.\r
57          */\r
58         NetConnectionInfo(void);\r
59 \r
60         /**\r
61          *      This destructor overrides Tizen::Base::Object::~Object().\r
62          *\r
63          * @since       2.0\r
64          */\r
65         virtual ~NetConnectionInfo(void);\r
66 \r
67         /** \r
68          * Gets the operating bearer type of a mobile station.\r
69          *\r
70          * @since               2.0\r
71          *\r
72          * @return              The operating bearer type of a specific network connection, @n\r
73          *                              else @c NET_BEARER_NONE if this instance is invalid\r
74          */\r
75          NetBearerType GetBearerType(void) const;\r
76 \r
77         /** \r
78          * Gets the operation protocol of a mobile station.\r
79          *\r
80          * @since               2.0\r
81          *\r
82          * @return              The protocol type of a specific network connection, @n\r
83          *                              else @c NET_PROTO_TYPE_NONE if this instance is invalid\r
84          */\r
85          NetProtocolType GetProtocolType(void) const;\r
86 \r
87         /** \r
88          * Gets the Access Point Name.\r
89          *\r
90          * @since               2.0\r
91          *\r
92          * @return              The Access Point Name as a string, @n\r
93          *                              else a null string if the Access Point Name is empty or this instance is invalid\r
94          */\r
95         Tizen::Base::String GetAccessPointName(void) const;\r
96 \r
97         /** \r
98          * Gets the local address scheme.\r
99          *\r
100          * @since               2.0\r
101          *\r
102          * @return              The address scheme for the local address, @n\r
103          *                              else @c NET_ADDRESS_SCHEME_NONE if this instance is invalid\r
104          */\r
105         NetAddressScheme GetLocalAddressScheme(void) const;\r
106 \r
107         /** \r
108          * Gets the local address information.\r
109          *\r
110          * @since               2.0\r
111          *\r
112          * @return              A pointer to the IpAddress instance representing the local address in the calling instance\r
113          * @remarks             If GetLocalAddressScheme() is ::NET_ADDRESS_SCHEME_STATIC, this method returns the statically assigned local addresses. @n\r
114          *                              If %GetLocalAddressScheme() is ::NET_ADDRESS_SCHEME_DYNAMIC, this method returns the dynamically assigned local addresses. @n\r
115          *                              In any case, check whether the IpAddress pointer is @c null or not.\r
116          */\r
117         const IpAddress* GetLocalAddress(void) const;\r
118 \r
119         /** \r
120          * Gets the setting for the DNS address scheme.\r
121          *\r
122          * @since               2.0\r
123          *\r
124          * @return              The address scheme for the DNS address, @n\r
125          *                              else @c NET_ADDRESS_SCHEME_NONE if this instance is invalid\r
126          *\r
127          */\r
128         NetAddressScheme GetDnsAddressScheme(void) const;\r
129 \r
130         /** \r
131          * Gets the primary DNS address.\r
132          *\r
133          * @since               2.0\r
134          *\r
135          * @return              A pointer to the IpAddress instance representing the primary DNS Address of the network connection\r
136          * @remarks             If GetDnsAddressScheme() is ::NET_ADDRESS_SCHEME_STATIC, this method returns the statically assigned local addresses. @n\r
137          *                              If %GetDnsAddressScheme() is ::NET_ADDRESS_SCHEME_DYNAMIC, this method returns the dynamically assigned local addresses. @n\r
138          *                              In any case, check whether the IpAddress pointer is @c null or not, because the DNS address field is not mandatory.\r
139          */\r
140         const IpAddress* GetPrimaryDnsAddress(void) const;\r
141 \r
142         /** \r
143          * Gets the secondary DNS address.\r
144          *\r
145          * @since               2.0\r
146          *\r
147          * @return              A pointer to the IpAddress instance representing the secondary DNS Address of the network connection\r
148          * @remarks             If GetDnsAddressScheme() is ::NET_ADDRESS_SCHEME_STATIC, this method returns the statically assigned local addresses. @n\r
149          *                              If %GetDnsAddressScheme() is ::NET_ADDRESS_SCHEME_DYNAMIC, this method returns the dynamically assigned local addresses. @n\r
150          *                              In any case, check whether the IpAddress pointer is @c null or not, because the DNS address field is not mandatory.\r
151          */\r
152         const IpAddress* GetSecondaryDnsAddress(void) const;\r
153 \r
154         /** \r
155          * Gets the subnet mask address.\r
156          *\r
157          * @since               2.0\r
158          *\r
159          * @return              A pointer to the IpAddress instance representing the subnet mask address of the network connection\r
160          * @remarks     In any case, check whether the IpAddress pointer is @c null or not, because the subnet mask address field is not mandatory.\r
161          */\r
162         const IpAddress* GetSubnetMaskAddress(void) const;\r
163         \r
164         /** \r
165          * Gets the default gateway address.\r
166          *\r
167          * @since               2.0\r
168          *\r
169          * @return      A pointer to the IpAddress instance representing the default gateway address of the network connection\r
170          * @remarks     In any case, check whether the IpAddress pointer is @c null or not, because the gateway address field is not mandatory.\r
171          */\r
172         const IpAddress* GetDefaultGatewayAddress(void) const;\r
173 \r
174         /**\r
175          * Copying of objects using this copy constructor is allowed.\r
176          *\r
177          * @since               2.0\r
178          *\r
179          * @param[in]   rhs                     An instance of %NetConnectionInfo\r
180          * @remarks             The GetLastResult() method is used to check whether the %NetConnectionInfo instance is created successfully.\r
181          */\r
182         NetConnectionInfo(const NetConnectionInfo& rhs);\r
183 \r
184         /**\r
185          * Copying of objects using this copy assignment operator is allowed.\r
186          *\r
187          * @since               2.0\r
188          *\r
189          * @return              The reference of this instance\r
190          * @param[in]   rhs An instance of %NetConnectionInfo\r
191          * @remarks             The GetLastResult() method is used to check whether the %NetConnectionInfo instance is copied successfully.\r
192          */\r
193         NetConnectionInfo& operator =(const NetConnectionInfo& rhs);\r
194 \r
195         /**\r
196          * Compares the specified instance of %NetConnectionInfo with the calling instance.\r
197          *\r
198          * @since               2.0\r
199          *\r
200          * @return              @c true if the values match, @n\r
201          *                              else @c false\r
202          * @param[in]   rhs     The other Tizen::Base::Object to compare\r
203          * @see                 Tizen::Base::Object::Equals()\r
204          */\r
205         virtual bool Equals(const Tizen::Base::Object& rhs) const;\r
206 \r
207         /**\r
208          * Gets the hash value of the current instance.\r
209          *\r
210          * @since               2.0\r
211          *\r
212          * @return      The hash value of the current instance\r
213          */\r
214         virtual int GetHashCode(void) const;\r
215 \r
216 private: \r
217         _NetConnectionInfoImpl* __pNetConnectionInfoImpl;\r
218 \r
219         friend class _NetConnectionInfoImpl;\r
220 }; // NetConnectionInfo\r
221 \r
222 } } //Tizen::Net\r
223 \r
224 #endif // _FNET_NET_CONNECTION_INFO_H_\r