2 // Open Service Platform
\r
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
\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
9 // http://www.apache.org/licenses/LICENSE-2.0
\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
19 * @file FNetNetConnectionInfo.h
\r
20 * @brief This is the header file for the %NetConnectionInfo class.
\r
22 * This header file contains the declarations of the %NetConnectionInfo class.
\r
24 #ifndef _FNET_NET_CONNECTION_INFO_H_
\r
25 #define _FNET_NET_CONNECTION_INFO_H_
\r
27 #include <FBaseObject.h>
\r
28 #include <FBaseResult.h>
\r
29 #include <FNetNetTypes.h>
\r
30 #include <FNetIpAddress.h>
\r
32 namespace Tizen { namespace Net {
\r
33 class _NetConnectionInfoImpl;
\r
36 * @class NetConnectionInfo
\r
37 * @brief This class represents a base type for the information related to a network connection.
\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
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
46 class _OSP_EXPORT_ NetConnectionInfo
\r
47 : public Tizen::Base::Object
\r
52 * This is the default constructor for this class.
\r
56 * @remarks The GetLastResult() method is used to check whether the %NetConnectionInfo instance is created successfully.
\r
58 NetConnectionInfo(void);
\r
61 * This destructor overrides Tizen::Base::Object::~Object().
\r
65 virtual ~NetConnectionInfo(void);
\r
68 * Gets the operating bearer type of a mobile station.
\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
75 NetBearerType GetBearerType(void) const;
\r
78 * Gets the operation protocol of a mobile station.
\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
85 NetProtocolType GetProtocolType(void) const;
\r
88 * Gets the Access Point Name.
\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
95 Tizen::Base::String GetAccessPointName(void) const;
\r
98 * Gets the local address scheme.
\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
105 NetAddressScheme GetLocalAddressScheme(void) const;
\r
108 * Gets the local address information.
\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
117 const IpAddress* GetLocalAddress(void) const;
\r
120 * Gets the setting for the DNS address scheme.
\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
128 NetAddressScheme GetDnsAddressScheme(void) const;
\r
131 * Gets the primary DNS address.
\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
140 const IpAddress* GetPrimaryDnsAddress(void) const;
\r
143 * Gets the secondary DNS address.
\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
152 const IpAddress* GetSecondaryDnsAddress(void) const;
\r
155 * Gets the subnet mask address.
\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
162 const IpAddress* GetSubnetMaskAddress(void) const;
\r
165 * Gets the default gateway address.
\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
172 const IpAddress* GetDefaultGatewayAddress(void) const;
\r
175 * Copying of objects using this copy constructor is allowed.
\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
182 NetConnectionInfo(const NetConnectionInfo& rhs);
\r
185 * Copying of objects using this copy assignment operator is allowed.
\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
193 NetConnectionInfo& operator =(const NetConnectionInfo& rhs);
\r
196 * Compares the specified instance of %NetConnectionInfo with the calling instance.
\r
200 * @return @c true if the values match, @n
\r
202 * @param[in] rhs The other Tizen::Base::Object to compare
\r
203 * @see Tizen::Base::Object::Equals()
\r
205 virtual bool Equals(const Tizen::Base::Object& rhs) const;
\r
208 * Gets the hash value of the current instance.
\r
212 * @return The hash value of the current instance
\r
214 virtual int GetHashCode(void) const;
\r
217 _NetConnectionInfoImpl* __pNetConnectionInfoImpl;
\r
219 friend class _NetConnectionInfoImpl;
\r
220 }; // NetConnectionInfo
\r
224 #endif // _FNET_NET_CONNECTION_INFO_H_
\r