Fixed issue(DCM-1110)
[platform/framework/native/net.git] / src / FNet_DefaultSystemNetConnection.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_DefaultSystemNetConnection.h
19  * @brief       This is the header file for the %_DefaultSystemNetConnection class.
20  *
21  * This header file contains the declarations of the %_DefaultSystemNetConnection class.
22  */
23
24 #ifndef _FNET_INTERNAL_DEFAULT_SYSTEM_NET_CONNECTION_H_
25 #define _FNET_INTERNAL_DEFAULT_SYSTEM_NET_CONNECTION_H_
26
27 #include "FNet_SystemNetConnection.h"
28 #include "FNet_NetUtility.h"
29
30 namespace Tizen { namespace Net {
31 /**
32  * @class       _DefaultSystemNetConnection
33  * @brief       This class provides methods for a system network connection.
34  *
35  * @since 2.1
36  *
37  * This class provides methods for a system network connection.
38  */
39
40 class _DefaultSystemNetConnection
41         : public _SystemNetConnection
42 {
43 public:
44         /**
45          * This is the default constructor for this class.
46          */
47                 _DefaultSystemNetConnection(void);
48
49         /**
50          * This is the destructor for this class.
51          */
52         virtual ~_DefaultSystemNetConnection(void);
53
54         /**
55          * Initializes a default instance.
56          *
57          * @since 2.1
58          *
59          * @return              An error code
60          * @exception   E_SUCCESS                       The method was successful.
61          * @exception   E_INVALID_STATE         This instance is in an invalid state.
62          * @exception   E_OUT_OF_MEMORY         Insufficient memory.
63          * @exception   E_INVALID_ACCOUNT       The specified network account is invalid.
64          * @exception   E_SYSTEM                        An internal error occurred.
65          */
66         result Construct(void);
67
68         virtual void HandleStartEvent(void);
69
70         void UpdateConnectionInfo(void* pData);
71         void* GetConnectionHandle(void) const;
72
73 private:
74         /**
75          * This is the copy constructor for this class.
76          *
77          * @param[in]   rhs                     An instance of _DefaultSystemNetConnection
78          */
79         _DefaultSystemNetConnection(const _DefaultSystemNetConnection& rhs);
80
81         /**
82          * This is the assignment operator. Do @b not use directly.
83          *
84          * @param[in]   rhs                             An instance of _DefaultSystemNetConnection
85          */
86         _DefaultSystemNetConnection& operator =(const _DefaultSystemNetConnection& rhs);
87
88 private:
89         std::unique_ptr<void, _ConnectionDeleter> __pConnectionHandle;
90
91 }; // _DefaultSystemNetConnection
92
93 } }  // Tizen::Net
94 #endif // _FNET_INTERNAL_DEFAULT_SYSTEM_NET_CONNECTION_H_
95