JBThread Class Reference

A Jabber thread that can be added to a list of threads. More...

#include <yatejabber.h>

Inheritance diagram for JBThread:
GenObject

List of all members.

Public Types

enum  Type {
  StreamConnect, EngineReceive, EngineProcess, Presence,
  Jingle, Message
}

Public Member Functions

virtual ~JBThread ()
Type type () const
virtual void cancelThread (bool hard=false)=0

Static Public Member Functions

static bool start (Type type, JBThreadList *list, void *client, int sleep=0, int prio=Thread::Normal)

Protected Member Functions

 JBThread (Type type, JBThreadList *owner, void *client, int sleep=2)
void runClient ()
void * client ()

Detailed Description

A Jabber thread that can be added to a list of threads.

This class holds encapsulates a private library thread


Member Enumeration Documentation

enum Type

Thread type enumeration. Used to do a specific client processing


Constructor & Destructor Documentation

virtual ~JBThread (  )  [virtual]

Destructor. Remove itself from the owner's list

JBThread ( Type  type,
JBThreadList owner,
void *  client,
int  sleep = 2 
) [protected]

Constructor. Append itself to the owner's list

Parameters:
type Thread type
owner The list owning this thread
client The client to process
sleep Time to sleep if there is nothing to do

Member Function Documentation

virtual void cancelThread ( bool  hard = false  )  [pure virtual]

Cancel (terminate) this thread

Parameters:
hard Kill the thread the hard way rather than just setting an exit check marker
void* client (  )  [inline, protected]

Get the stream's client

Returns:
The stream's client
void runClient (  )  [protected]

Process the client

static bool start ( Type  type,
JBThreadList list,
void *  client,
int  sleep = 0,
int  prio = Thread::Normal 
) [static]

Create and start a private thread

Parameters:
type Thread type
list The list owning this thread
client The client to process
sleep Time to sleep if there is nothing to do, zero to use platform default
prio Thread priority, defaults to Normal
Returns:
False if failed to start the requested thread
Type type (  )  const [inline]

Get the type of this thread

Returns:
Thread type as enumeration

The documentation for this class was generated from the following file:
Generated on Thu Apr 8 18:22:38 2010 for Yate by  doxygen 1.6.3