sync with tizen_2.0
[platform/framework/native/appfw.git] / src / base / runtime / FBaseRt_EventImpl.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012 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 /**
19  * @file        FBaseRt_EventImpl.h
20  * @brief       This is the header file for the %_EventImpl class.
21  *
22  * This file contains the declarations of the %_EventImpl class.
23  */
24
25 #ifndef _FBASE_RT_INTERNAL_EVENTIMPL_H_
26 #define _FBASE_RT_INTERNAL_EVENTIMPL_H_
27
28 #include "FBaseRt_Event.h"
29
30 namespace Tizen { namespace Base { namespace Runtime
31 {
32
33 class Event;
34 class IEventArg;
35 class IEventListener;
36
37 /**
38 * @class _EventImpl
39 * @brief This class provides methods for delivering an event with an argument synchronously and asynchronously.
40 * @since 2.0
41 */
42 class _EventImpl
43         : public Tizen::Base::Runtime::_Event
44 {
45 public:
46         /**
47          * This is the default constructor for this class.
48          *
49          * @since 2.0
50          */
51         _EventImpl(Event& event);
52
53         /**
54          * This is the destructor for this class.
55          *
56          * @since 2.0
57          */
58         virtual ~_EventImpl(void);
59
60 protected:
61         /**
62          * Implement to call the corresponding event listener's method.
63          *
64          * @since 2.0
65          *
66          * @param[in]    listener  The listener instance which is currently processing
67          * @param[in]    arg                 The event argument that is fired
68          *
69          * @remark A derived class must override this method.
70          */
71         virtual void FireImpl(IEventListener& listener, const IEventArg& arg);
72
73 private:
74         Event* __pEvent;
75
76 }; // _EventImpl
77
78 } } } // Tizen::Base::Runtime
79
80 #endif // _FBASE_RT_INTERNAL_EVENTIMPL_H_