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, int prio)

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

Type type (  )  const [inline]

Get the type of this thread

Returns:
Thread type as enumeration

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

static bool start ( Type  type,
JBThreadList list,
void *  client,
int  sleep,
int  prio 
) [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
prio Thread priority
Returns:
False if failed to start the requested thread

void runClient (  )  [protected]

Process the client

void* client (  )  [inline, protected]

Get the stream's client

Returns:
The stream's client


The documentation for this class was generated from the following file:

Generated on Mon Aug 11 16:17:54 2008 for Yate by  doxygen 1.5.6