|
|
This class holds encapsulates a private library thread
enum Type { StreamConnect, EngineReceive, EngineProcess, Presence, Jingle, Message } | Type |
Thread type enumeration. Used to do a specific client processing
~JBThread ()
| ~JBThread |
[virtual]
Destructor. Remove itself from the owner's list
inline Type type ()
| type |
[const]
Get the type of this thread
Returns: Thread type as enumeration
void cancelThread (bool hard = false)
| cancelThread |
[pure virtual]
Cancel (terminate) this thread
Parameters:
hard | Kill the thread the hard way rather than just setting an exit check marker |
bool start (Type type, JBThreadList* list, void* client, int sleep = 0, int prio = Thread::Normal)
| start |
[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
JBThread (Type type, JBThreadList* owner, void* client, int sleep = 2)
| JBThread |
[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 |
void runClient ()
| runClient |
[protected]
Process the client
inline void* client ()
| client |
[protected]
Get the stream's client
Returns: The stream's client
Generated by: paulc on bussard on Wed Oct 21 01:57:30 2009, using kdoc 2.0a54. |