eventthread.h 1.81 KB
Newer Older
yanmorin's avatar
   
yanmorin committed
1
/*
jpbl's avatar
jpbl committed
2
3
4
5
6
7
 *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
 *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
 *  Author : Laurielle Lea <laurielle.lea@savoirfairelinux.com>
 *                                                                              
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
8
 *  the Free Software Foundation; either version 3 of the License, or
jpbl's avatar
jpbl committed
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 *  (at your option) any later version.
 *                                                                              
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *                                                                              
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#ifndef __EVENT_THREAD_H__
#define __EVENT_THREAD_H__

#include <cc++/thread.h>

yanmorin's avatar
   
yanmorin committed
26
class VoIPLink;
27

yanmorin's avatar
   
yanmorin committed
28
/**
29
30
 * @file eventthread.h
 * @brief General thread to listen events continuously
yanmorin's avatar
   
yanmorin committed
31
 */
32

jpbl's avatar
jpbl committed
33
34
class EventThread : public ost::Thread {
public:
yanmorin's avatar
   
yanmorin committed
35
36
37
38
  /**
   * Build a thread that call getEvents 
   */
	EventThread (VoIPLink*);
jpbl's avatar
jpbl committed
39
	~EventThread (void);
Yun Liu's avatar
Yun Liu committed
40
41
        EventThread(const EventThread& rh); // copy constructor
        EventThread& operator=(const EventThread& rh);  // assignment operator	
jpbl's avatar
jpbl committed
42
	virtual void 	 run ();
Emmanuel Milou's avatar
nothing    
Emmanuel Milou committed
43
44
45
	virtual void	 stop();
	virtual void	 startLoop();
	bool		 isStopped();
yanmorin's avatar
   
yanmorin committed
46

jpbl's avatar
jpbl committed
47
private:
yanmorin's avatar
   
yanmorin committed
48
49
  /** VoIPLink is the object being called by getEvents() method  */
	VoIPLink*	_linkthread;
Emmanuel Milou's avatar
nothing    
Emmanuel Milou committed
50
	bool		stopIt;
jpbl's avatar
jpbl committed
51
52
53
};

#endif // __EVENT_THREAD_H__