mirror of
https://git.jami.net/savoirfairelinux/jami-daemon.git
synced 2025-08-12 22:09:25 +08:00
eventthread: cleanup
This commit is contained in:
@ -31,17 +31,15 @@
|
||||
#include "eventthread.h"
|
||||
#include "voiplink.h"
|
||||
|
||||
/********************************** Voiplink thread *************************************/
|
||||
EventThread::EventThread(VoIPLink *link)
|
||||
: Thread(), link_(link)
|
||||
EventThread::EventThread(VoIPLink *link) : Thread(), link_(link)
|
||||
{
|
||||
setCancel(cancelDeferred);
|
||||
}
|
||||
|
||||
EventThread::~EventThread() {
|
||||
ost::Thread::terminate();
|
||||
}
|
||||
|
||||
/**
|
||||
* Reimplementation of run()
|
||||
*/
|
||||
void EventThread::run()
|
||||
{
|
||||
while (!testCancel())
|
||||
|
@ -28,8 +28,8 @@
|
||||
* as that of the covered work.
|
||||
*/
|
||||
|
||||
#ifndef __EVENT_THREAD_H__
|
||||
#define __EVENT_THREAD_H__
|
||||
#ifndef EVENT_THREAD_H_
|
||||
#define EVENT_THREAD_H_
|
||||
|
||||
#include <cc++/thread.h>
|
||||
#include "noncopyable.h"
|
||||
@ -38,24 +38,19 @@ class VoIPLink;
|
||||
|
||||
/**
|
||||
* @file eventthread.h
|
||||
* @brief General thread to listen events continuously
|
||||
* @brief Thread which listens to VoIP events continuously
|
||||
*/
|
||||
|
||||
class EventThread : public ost::Thread {
|
||||
public:
|
||||
EventThread(VoIPLink* link);
|
||||
|
||||
~EventThread() {
|
||||
terminate();
|
||||
}
|
||||
|
||||
virtual void run() ;
|
||||
~EventThread();
|
||||
virtual void run();
|
||||
|
||||
private:
|
||||
NON_COPYABLE(EventThread);
|
||||
|
||||
// VoIPLink is the object being called by getEvents() method
|
||||
VoIPLink* link_;
|
||||
VoIPLink* link_;
|
||||
};
|
||||
|
||||
#endif // __EVENT_THREAD_H__
|
||||
#endif // EVENT_THREAD_H__
|
||||
|
Reference in New Issue
Block a user