Skip to content
Snippets Groups Projects
eventthread.cpp 1.44 KiB
Newer Older
savoirfairelinux's avatar
savoirfairelinux committed
/**
llea's avatar
llea committed
 *  Copyright (C) 2004-2005 Savoir-Faire Linux inc.
yanmorin's avatar
 
yanmorin committed
 *  Author: Yan Morin <yan.morin@savoirfairelinux.com>
llea's avatar
llea committed
 *  Author : Laurielle Lea <laurielle.lea@savoirfairelinux.com>
savoirfairelinux's avatar
savoirfairelinux committed
 *                                                                              
 *  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
 *  the Free Software Foundation; either version 2 of the License, or
 *  (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.
 */

llea's avatar
llea committed
#include "eventthread.h"
#include "sipvoiplink.h"
savoirfairelinux's avatar
savoirfairelinux committed

llea's avatar
llea committed
EventThread::EventThread (SipVoIPLink* sip) : Thread () 
{
	_sipthread = sip;
jpbl's avatar
jpbl committed
	setCancel(cancelDeferred);
llea's avatar
llea committed
EventThread::~EventThread (void) 
{
jpbl's avatar
jpbl committed
  terminate();
llea's avatar
llea committed
}
savoirfairelinux's avatar
savoirfairelinux committed

llea's avatar
llea committed
/**
 * Reimplementation of run() 
 */
void
EventThread::run (void) 
{
yanmorin's avatar
 
yanmorin committed
  while(!testCancel()) {
jpbl's avatar
jpbl committed
    _sipthread->getEvent();
  }
llea's avatar
llea committed
}
savoirfairelinux's avatar
savoirfairelinux committed