sync with tizen_2.0
[platform/framework/native/appfw.git] / src / base / runtime / FBaseRtEvent.cpp
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        FBaseRtEvent.cpp
20  * @brief       This is the implementation file for the Event class.
21  *
22  */
23
24 #include <FBaseRtEvent.h>
25 #include <FBaseRtIEventArg.h>
26 #include <FBaseRtIEventListener.h>
27 #include "FBaseRt_EventImpl.h"
28
29 using namespace Tizen::Base;
30 using namespace Tizen::Base::Runtime;
31
32 namespace Tizen { namespace Base { namespace Runtime
33 {
34
35 Event::Event(void)
36         :__pEventImpl(null)
37 {
38         __pEventImpl = new _EventImpl(*this);
39         //__pEventImpl->Initialize();
40 }
41
42 Event::~Event(void)
43 {
44         delete __pEventImpl;
45 }
46
47 result
48 Event::AddListener(IEventListener& listener, bool calledByCallerThread)
49 {
50         return __pEventImpl->AddListener(listener, calledByCallerThread);
51 }
52
53 result
54 Event::RemoveListener(IEventListener& listener)
55 {
56         return __pEventImpl->RemoveListener(listener);
57 }
58
59 result
60 Event::Fire(IEventArg& arg)
61 {
62         return __pEventImpl->Fire(arg);
63 }
64
65 } } } // Tizen::Base::Runtime