remove Doxygen warning
[platform/framework/native/net.git] / inc / FNetIManagedNetConnectionEventListener.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.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://floralicense.org/license/
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 /**
19  * @file        FNetIManagedNetConnectionEventListener.h
20  * @brief       This is the header file for the %IManagedNetConnectionEventListener interface.
21  *
22  * This header file contains the declarations of the %IManagedNetConnectionEventListener interface.
23  *
24  */
25 #ifndef _FNET_IMANAGED_NET_CONNECTION_EVENT_LISTENER_H_
26 #define _FNET_IMANAGED_NET_CONNECTION_EVENT_LISTENER_H_
27
28 #include <FBase.h>
29 #include <FNetNetTypes.h>
30
31 namespace Tizen { namespace Net
32 {
33 class ManagedNetConnection;
34 /**
35  * @interface   IManagedNetConnectionEventListener
36  * @brief               This interface is the listener for network connection events.
37  *
38  * @since               2.0
39  *
40  *  The %IManagedNetConnectionEventListener interface specifies the methods used to create the notifications about the different kinds of network
41  *      connection events. These events are sent only when %IManagedNetConnectionEventListener is added to the ManagedNetConnection instance, and
42  *      this is done by invoking the ManagedNetConnection::SetManagedNetConnectionEventListener() method. A method of this interface is called when a network connection
43  *      event is generated.
44  *
45  * 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>.
46  */
47 class _OSP_EXPORT_ IManagedNetConnectionEventListener
48         : virtual public Tizen::Base::Runtime::IEventListener
49 {
50 public:
51         /** This polymorphic destructor should be overridden if required. This way, the destructors of the derived classes are called when the destructor of this interface is called.
52          *
53          * @since       2.0
54          */
55         virtual ~IManagedNetConnectionEventListener(void) {}
56
57 public:
58         /**
59          * Called to notify that the bearer has been changed. @n
60          * An application can send or receive the data through the Socket or HTTP methods and can obtain the information related to the changed bearer.
61          *
62          * @since               2.0
63          *
64          * @param[in]   managedNetConnection    The network connection managed by the system
65          */
66         virtual void OnManagedNetConnectionBearerChanged(ManagedNetConnection& managedNetConnection) = 0;
67
68         /**
69          * Called to notify the application that the network connection has been opened and connected. @n
70          * An application can then send or receive the data.
71          *
72          * @since                       2.0
73          *
74          * @param[in]   managedNetConnection    The network connection managed by the system
75          */
76         virtual void OnManagedNetConnectionStarted(ManagedNetConnection& managedNetConnection) = 0;
77
78         /**
79          * Called to notify that the network connection has been closed and disconnected.
80          *
81          * @since               2.0
82          *
83          * @param[in]   managedNetConnection                                                            The network connection managed by the system
84          * @param[in]   reason                                                                                          A reason code for the error
85          * @exception   NET_CONNECTION_STOPPED_REASON_RESOURCE_RELEASED         The network connection managed by the system has stopped because network resources have been released.
86          * @exception   NET_CONNECTION_STOPPED_REASON_NETWORK_FAILED            The network has failed.
87          * @exception   NET_CONNECTION_STOPPED_REASON_DEVICE_OFFLINE            The device is in the offline mode.
88          * @exception   NET_CONNECTION_STOPPED_REASON_SERVICE_UNAVAILABLE       The device is out of the coverage area or in the emergency mode.
89          * @exception   NET_CONNECTION_STOPPED_REASON_RESOURCE_UNAVAILABLE      The network resource is unavailable.
90          * @exception   NET_CONNECTION_STOPPED_REASON_SYSTEM                            A system error has occurred.
91          */
92         virtual void OnManagedNetConnectionStopped(ManagedNetConnection& managedNetConnection, NetConnectionStoppedReason reason) = 0;
93
94         /**
95          * Called to notify the application that the connection status has been changed or is in an unstable or suspended state. @n
96          * Thus an application may neither send nor receive data through the Socket or Http until the network connection is resumed.
97          *
98          * @since               2.0
99          *
100          * @param[in]   managedNetConnection    The network connection managed by the system
101          */
102         virtual void OnManagedNetConnectionSuspended(ManagedNetConnection& managedNetConnection) = 0;
103
104         /**
105          * Called to notify the application that the network has recovered from a suspended state. @n
106          * Thus an application can send or receive data through the Socket or Http from now on.
107          *
108          * @since               2.0
109          *
110          * @param[in]   managedNetConnection    The network connection managed by the system
111          */
112         virtual void OnManagedNetConnectionResumed(ManagedNetConnection& managedNetConnection) = 0;
113
114 protected:
115         // Reserved virtual methods for later extension.
116
117         //
118         // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
119         //
120         // This method is reserved and may change its name at any time without prior notice.
121         //
122         // @since       2.0
123         //
124         virtual void IManagedNetConnectionEventListener_Reserved1(void) {}
125
126         //
127         // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
128         //
129         // This method is reserved and may change its name at any time without prior notice.
130         //
131         // @since       2.0
132         //
133         virtual void IManagedNetConnectionEventListener_Reserved2(void) {}
134
135         //
136         // This method is for internal use only. Using this method can cause behavioral, security-related, and consistency-related issues in the application.
137         //
138         // This method is reserved and may change its name at any time without prior notice.
139         //
140         // @since       2.0
141         //
142         virtual void IManagedNetConnectionEventListener_Reserved3(void) {}
143 }; // IManagedNetConnectionEventListener
144
145 } } // Tizen::Net
146 #endif // _FNET_IMANAGED_NET_CONNECTION_EVENTLISTENER_H_