2 // Open Service Platform
3 // Copyright (c) 2012 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.
19 * @file FBaseRt_EventDrivenThreadImpl.h
20 * @brief This is the header file for the _EventDrivenThreadImpl class.
22 * This file contains the declarations of _EventDrivenThreadImpl.
25 #ifndef _FRT_THREAD_INTERNAL_EVENTDRIVEN_THREAD_IMPL_H_
26 #define _FRT_THREAD_INTERNAL_EVENTDRIVEN_THREAD_IMPL_H_
30 #include <FBaseColLinkedListT.h>
32 #include "FBaseRt_EventDispatcher.h"
33 #include "FBaseRt_ThreadImpl.h"
34 #include "FBaseRt_EventDrivenThreadEvent.h"
35 #include "FBaseRt_EventDrivenThreadEventArg.h"
38 namespace Tizen { namespace Base { namespace Runtime
41 class _EventDrivenThreadImpl
43 , public _IEventDrivenThreadEventListener
46 _EventDrivenThreadImpl(Thread& thread, const String& name, long stackSize, ThreadPriority priority);
48 virtual ~_EventDrivenThreadImpl(void);
50 virtual result Stop(void);
52 virtual Tizen::Base::Object* Run(void);
54 virtual result Initialize(void);
56 virtual result SendUserEvent(RequestId requestId, const Tizen::Base::Collection::IList* pArgs);
58 virtual void OnUserEventReceivedN(RequestId reqId, Tizen::Base::Collection::IList* pArgs);
60 virtual void OnStop(void);
63 _EventDrivenThreadImpl(const _EventDrivenThreadImpl& value);
65 _EventDrivenThreadImpl& operator =(const _EventDrivenThreadImpl& value);
68 GMainLoop* __pGMainLoop;
69 _EventDispatcher* __pEventDispatcher;
70 _EventManager* __pEventManager;
71 _EventDrivenThreadEvent* __pEvent;
72 GMainContext* __pGmainContext;
73 Tizen::Base::Collection::LinkedListT <_EventDrivenThreadEventArg*> __pendingEvents;
76 } } } // Tizen::Base::Runtime
78 #endif // _FRT_THREAD_INTERNAL_EVENTDRIVEN_THREAD_H_