2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
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
9 // http://www.apache.org/licenses/LICENSE-2.0
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.
18 * @file FNet_WifiSystemNetConnection.h
19 * @brief This is the header file for the %_WifiSystemNetConnection class.
21 * This header file contains the declarations of the %_WifiSystemNetConnection class.
24 #ifndef _FNET_INTERNAL_WIFI_SYSTEM_NET_CONNECTION_H_
25 #define _FNET_INTERNAL_WIFI_SYSTEM_NET_CONNECTION_H_
28 #include <FApp_IAppEventListener.h>
29 #include "FNet_SystemNetConnection.h"
30 #include "FNet_NetUtility.h"
32 namespace Tizen { namespace Net {
34 * @class _WifiSystemNetConnection
35 * @brief This class provides methods for a Wifi system network connection.
39 * This class provides methods for a system network connection.
42 class _WifiSystemNetConnection
43 : public _SystemNetConnection
44 , public Tizen::App::_IAppEventListener
45 , virtual public Tizen::Base::Runtime::ITimerEventListener
49 * This is the default constructor for this class.
51 _WifiSystemNetConnection(void);
54 * This is the destructor for this class.
56 virtual ~_WifiSystemNetConnection(void);
59 * Initializes a default instance.
63 * @return An error code
64 * @exception E_SUCCESS The method was successful.
65 * @exception E_INVALID_STATE This instance is in an invalid state.
66 * @exception E_INVALID_ACCOUNT The specified network account is invalid.
67 * @exception E_SYSTEM An internal error occurred.
69 result Construct(void);
72 * Starts the network connection.
76 * @return An error code
77 * @exception E_SUCCESS The method was successful.
78 * @exception E_INVALID_STATE This instance is in an invalid state.
79 * @exception E_SYSTEM An internal error occurred.
82 virtual result Start(_NetConnectionEvent& event);
84 virtual void HandleStartResponse(result error, void* pData);
86 virtual void OnApplicationLaunched(const Tizen::App::AppId& appId, int pid);
87 virtual void OnApplicationTerminated(const Tizen::App::AppId& appId, int pid);
89 virtual void OnTimerExpired(Tizen::Base::Runtime::Timer& timer);
91 void UpdateConnectionInfo(void* pData);
93 void* GetConnectionHandle(void) const;
97 * This is the copy constructor for this class.
99 * @param[in] rhs An instance of _WifiSystemNetConnection
101 _WifiSystemNetConnection(const _WifiSystemNetConnection& rhs);
104 * This is the assignment operator. Do @b not use directly.
106 * @param[in] rhs An instance of _WifiSystemNetConnection
108 _WifiSystemNetConnection& operator =(const _WifiSystemNetConnection& rhs);
111 std::unique_ptr<void, _ConnectionDeleter> __pConnectionHandle;
112 std::unique_ptr<Tizen::Base::Runtime::Timer> __pTimer;
114 }; // _WifiSystemNetConnection
117 #endif // _FNET_INTERNAL_WIFI_SYSTEM_NET_CONNECTION_H_