2 // Copyright (c) 2012 Samsung Electronics Co., Ltd.
4 // Licensed under the Apache License, Version 2.0 (the License);
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
8 // http://www.apache.org/licenses/LICENSE-2.0
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
18 * @file FBaseRt_EventDrivenThreadImpl.h
19 * @brief This is the header file for the _EventDrivenThreadImpl class.
21 * This file contains the declarations of _EventDrivenThreadImpl.
24 #ifndef _FRT_THREAD_INTERNAL_EVENTDRIVEN_THREAD_IMPL_H_
25 #define _FRT_THREAD_INTERNAL_EVENTDRIVEN_THREAD_IMPL_H_
29 #include <FBaseColLinkedListT.h>
31 #include "FBaseRt_EventDispatcher.h"
32 #include "FBaseRt_ThreadImpl.h"
33 #include "FBaseRt_EventDrivenThreadEvent.h"
34 #include "FBaseRt_EventDrivenThreadEventArg.h"
37 namespace Tizen { namespace Base { namespace Runtime
40 class _EventDrivenThreadImpl
42 , public _IEventDrivenThreadEventListener
45 _EventDrivenThreadImpl(Thread& thread, const String& name, long stackSize, ThreadPriority priority);
47 virtual ~_EventDrivenThreadImpl(void);
49 virtual result Stop(void);
51 virtual Tizen::Base::Object* Run(void);
53 virtual result Initialize(void);
55 virtual result SendUserEvent(RequestId requestId, const Tizen::Base::Collection::IList* pArgs);
57 virtual void OnUserEventReceivedN(RequestId reqId, Tizen::Base::Collection::IList* pArgs);
59 virtual void OnStop(void);
62 _EventDrivenThreadImpl(const _EventDrivenThreadImpl& value);
64 _EventDrivenThreadImpl& operator =(const _EventDrivenThreadImpl& value);
67 GMainLoop* __pGMainLoop;
68 _EventDispatcher* __pEventDispatcher;
69 _EventManager* __pEventManager;
70 _EventDrivenThreadEvent* __pEvent;
71 GMainContext* __pGmainContext;
72 Tizen::Base::Collection::LinkedListT <_EventDrivenThreadEventArg*> __pendingEvents;
75 } } } // Tizen::Base::Runtime
77 #endif // _FRT_THREAD_INTERNAL_EVENTDRIVEN_THREAD_H_