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_FNet_DnsManagedNetConnectionEventListener.h
19 * @brief This is the header file for _DnsManagedNetConnectionEventListener class.
22 * This header file contains the declarations of _DnsManagedNetConnectionEventListener class.
25 #ifndef _FNET_INTERNAL_DNS_MANAGED_NET_CONNECTION_EVENT_LISTENER_H_
26 #define _FNET_INTERNAL_DNS_MANAGED_NET_CONNECTION_EVENT_LISTENER_H_
28 #include <FBaseDataType.h>
29 #include <FNetIManagedNetConnectionEventListener.h>
30 #include <FNetNetTypes.h>
32 namespace Tizen { namespace Base { namespace Collection
35 } } } // Tizen::Base::Collection
37 namespace Tizen { namespace Net
40 class ManagedNetConnection;
43 * @class _DnsManagedNetConnectionEventListener
44 * @brief This class is the listener for network connection events.
47 class _DnsManagedNetConnectionEventListener
48 : public IManagedNetConnectionEventListener
52 _DnsManagedNetConnectionEventListener(Tizen::Base::Collection::ArrayList* pDnsRequestHandlerList);
54 virtual ~_DnsManagedNetConnectionEventListener(void);
58 * Called to notify that the bearer has been changed. @n
59 * An application can send or receive the data through the Socket or HTTP methods and can obtain the
60 * information related to the changed bearer.
62 * @param[in] managedNetConnection The network connection managed by the system
64 void OnManagedNetConnectionBearerChanged(ManagedNetConnection& managedNetConnection);
67 * Called to notify the application that the network connection has been opened and connected. @n
68 * An application can then send or receive the data.
70 * @param[in] managedNetConnection The network connection managed by the system
72 void OnManagedNetConnectionStarted(ManagedNetConnection& managedNetConnection);
75 * Called to notify that the network connection has been closed and disconnected.
77 * @param[in] managedNetConnection The network connection managed by the system
78 * @param[in] reason A reason code for the error
81 void OnManagedNetConnectionStopped(ManagedNetConnection& managedNetConnection,
82 NetConnectionStoppedReason reason);
85 * Called to notify the application that the connection status has been changed or is in an unstable or suspended state. @n
86 * Thus an application may neither send nor receive data through the Socket or Http until the network connection is resumed.
88 * @param[in] managedNetConnection The network connection managed by the system
90 void OnManagedNetConnectionSuspended(ManagedNetConnection& managedNetConnection);
93 * Called to notify the application that the network has recovered from a suspended state. @n
94 * Thus an application can send or receive data through the Socket or Http from now on.
96 * @param[in] managedNetConnection The network connection managed by the system
98 void OnManagedNetConnectionResumed(ManagedNetConnection& managedNetConnection);
104 _DnsManagedNetConnectionEventListener(void);
107 * This is the copy constructor.
109 * @param[in] rhs An instance of _DnsManagedNetConnectionEventListener
110 * @remarks The function is declared but not implemented.
112 _DnsManagedNetConnectionEventListener(const _DnsManagedNetConnectionEventListener& rhs);
115 * This is the assignment operator.
117 * @param[in] rhs An instance of _DnsManagedNetConnectionEventListener
118 * @remarks The function is declared but not implemented.
120 _DnsManagedNetConnectionEventListener& operator =(const _DnsManagedNetConnectionEventListener& rhs);
123 Tizen::Base::Collection::ArrayList* __pDnsRequestHandlerList; // List of Runnable to handle requests asynchronously, not owned
125 friend class _DnsImpl;
126 }; // _DnsManagedNetConnectionEventListener
130 #endif // _FNET_INTERNAL_DNS_MANAGED_NET_CONNECTION_EVENT_LISTENER_H_