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 FNetDns_DnsEvent.h
19 * @brief This is the header file for the _DnsEvent Class.
21 * This header file contains declaration of the _DnsEvent Class.
22 * The _DnsEvent class can call a method of a listener (IDnsEventListener object).
23 * So, when a Dns event is occurred, an application can handle it appropriately.
25 #ifndef _FNET_INTERNAL_DNS_EVENT_H_
26 #define _FNET_INTERNAL_DNS_EVENT_H_
28 #include <FBaseDataType.h>
29 #include <FBaseRt_Event.h>
31 namespace Tizen { namespace Net
37 * @brief This class handles Dns events.
40 * When a Dns event occurs, the _DnsEvent object finds a IDnsEventListener object
41 * which is registered for the Dns object and calls an appropriate method of the listener.
44 : public Tizen::Base::Runtime::_Event
49 * This is the default constructor.
51 * @remarks After creating an instance of this class, you must explicitly call the
52 * construction method to initialize the instance.
58 * This is the class destructor.
60 virtual ~_DnsEvent(void);
65 result Construct(void);
69 * Checks the arg and finds out the type of event. After that this method calls appropriate
72 * @return A result code.
73 * @param[in] listener It is a event listener related to this Dns event.
74 * @param[in] arg It is an argument-like instance of dns event which will be retransmitted to the listener's method as an argument.
75 * @exception E_SUCCESS - The method is successful.
76 * @exception E_INVALID_ARG - The argument passed to a method contains an invalid value.@n
78 void FireImpl(Tizen::Base::Runtime::IEventListener& listener, const Tizen::Base::Runtime::IEventArg& arg);
83 * This is the copy constructor.
85 * @param[in] rhs An instance of DnsEvent
87 _DnsEvent(const _DnsEvent& rhs);
90 * This is the assignment operator.
92 * @param[in] rhs An instance of Socket
94 _DnsEvent& operator =(const _DnsEvent& rhs);
99 #endif // _FNET_INTERNAL_DNS_EVENT_H_