Merge "Add the exception handling when using manual cert mode" into tizen_2.1
[platform/framework/native/net.git] / src / FNet_DhcpClientInfoImpl.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_DhcpClientInfoImpl.h
19  * @brief               This is the header file for the _DhcpClientInfoImpl Class.
20  *
21  */
22
23 #ifndef _FNET_INTERNAL_DHCP_CLIENT_INFO_IMPL_H_
24 #define _FNET_INTERNAL_DHCP_CLIENT_INFO_IMPL_H_
25
26 #include <unique_ptr.h>
27 #include <FBaseDataType.h>
28 #include <FBaseObject.h>
29 #include <FBaseString.h>
30
31 namespace Tizen { namespace Net
32 {
33
34 class IpAddress;
35 class DhcpClientInfo;
36 class _LocalDhcpServerImpl;
37 class _LocalDhcpServerEvent;
38 class _DhcpNetConnectionEventListenerImpl;
39
40 /**
41  * @class   _DhcpClientInfoImpl
42  * @brief       This class represents a client information on dhcp server.
43  * @since   2.0
44  *
45  * The DhcpClientInfo class provides functionality for getting information on dhcp server.
46  */
47
48 class _DhcpClientInfoImpl
49         : public Tizen::Base::Object
50 {
51
52 public:
53         /**
54          * This is the constructor for this class.
55          *
56          */
57         _DhcpClientInfoImpl(void);
58
59         /**
60          * This is the constructor for this class.
61          *
62          * @param[in]   value                   An instance of DhcpClientInfo
63          */
64         _DhcpClientInfoImpl(const DhcpClientInfo& value);
65
66         /**
67          * This is the destructor for this class.
68          *
69          */
70         virtual ~_DhcpClientInfoImpl(void);
71
72
73         /**
74          * @see                 DhcpClientInfo::Equals()
75          */
76         bool Equals(const Tizen::Base::Object& rhs) const;
77
78         /**
79          * @see                 DhcpClientInfo::GetHashCode()
80          */
81         int     GetHashCode(void) const;
82
83 public:
84         /**
85          * @see                 DhcpClientInfo::GetName()
86          */
87         Tizen::Base::String GetName(void) const;
88
89         /**
90          * @see                 DhcpClientInfo::GetMacAddress()
91          */
92         Tizen::Base::String GetMacAddress(void) const;
93
94         /**
95          * @see                 DhcpClientInfo::GetLocalAddress()
96          */
97         IpAddress* GetLocalAddress(void) const;
98
99 public:
100     /**
101      * Gets the Impl instance.
102      *
103      * @since 2.1
104      * @return              The pointer to _DhcpClientInfoImpl
105         * @param[in]   dhcpClientInfo            An instance of DhcpClientInfo
106      */
107         static _DhcpClientInfoImpl* GetInstance(DhcpClientInfo& dhcpClientInfo);
108
109     /**
110      * Gets the Impl instance.
111      *
112      * @since 2.1
113      * @return              The pointer to  _DhcpClientInfoImpl
114         * @param[in]   dhcpClientInfo     An instance of DhcpClientInfo
115      */
116         static const _DhcpClientInfoImpl* GetInstance(const DhcpClientInfo& dhcpClientInfo);
117
118 private:
119         /*
120          * Factory Method to create DhcpClientInfo instance
121          *
122          * @since 2.1
123          * @return                      Instance of DhcpClientInfo
124          */
125         static DhcpClientInfo* CreateDhcpClientInfoN(void);
126
127         /*
128          * Factory Method to Clone DhcpClientInfo instance
129          *
130          * @since 2.1
131          * @return                      Instance of DhcpClientInfo
132          */
133         static DhcpClientInfo* CloneDhcpClientInfoN(const DhcpClientInfo& info);
134
135 private:
136         /*
137          * This is the copy constructor for this class. @n
138          * Do @b not use directly.
139          *
140          * @param[in]   rhs                     An instance of __DhcpClientInfoImpl
141          */
142         _DhcpClientInfoImpl(const _DhcpClientInfoImpl& rhs);
143
144         /*
145          * This is the assignment operator. Do @b not use directly.
146          *
147          * @param[in]   rhs                             An instance of __DhcpClientInfoImpl
148          */
149         _DhcpClientInfoImpl& operator =(const _DhcpClientInfoImpl& rhs);
150
151 private:
152         Tizen::Base::String __dhcpClientName;
153         Tizen::Base::String __macAddress;
154         std::unique_ptr<IpAddress> __pLocalAddress;
155
156         friend class _LocalDhcpServerImpl;
157         friend class _LocalDhcpServerEvent;
158         friend class _DhcpNetConnectionEventListenerImpl;
159         friend class _LocalDhcpServerEventArg;
160 }; // _DhcpClientInfoImpl
161
162 } } // Tizen::Net
163
164 #endif // _FNET_INTERNAL_DHCP_CLIENT_INFO_IMPL_H_