class ThreadedSource

Data source with own thread. More...

Contains pure virtuals
Full nameTelEngine::ThreadedSource
Definition#include <yatephone.h>
InheritsTelEngine::DataSource [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods


Detailed Description

A data source with a thread of its own

void  destroyed ()

destroyed

[virtual]

The destruction notification, checks that the thread is gone

Reimplemented from DataSource.

bool  start (const char* name = "ThreadedSource", Thread::Priority prio = Thread::Normal)

start

Starts the worker thread

Parameters:
nameStatic name of this thread
prioThread's priority

Returns: True if started, false if an error occured

void  stop ()

stop

Stops and destroys the worker thread if running

Thread*  thread ()

thread

[const]

Return a pointer to the worker thread

Returns: Pointer to running worker thread or NULL

bool  running ()

running

[const]

Check if the data thread is running

Returns: True if the data thread was started and is running

inline explicit  ThreadedSource (const char* format = "slin")

ThreadedSource

[protected]

Threaded Source constructor

Parameters:
formatName of the data format, default "slin" (Signed Linear)

void  run ()

run

[protected pure virtual]

The worker method. You have to reimplement it as you need

void  cleanup ()

cleanup

[protected virtual]

The cleanup after thread method, deletes the source if already dereferenced and set for asynchronous deletion

bool  looping (bool runConsumers = false)

looping

[protected const]

Check if the calling thread should keep looping the worker method

Parameters:
runConsumersTrue to keep running as long consumers are attached

Returns: True if the calling thread should remain in the run() method


Generated by: paulc on bussard on Fri Dec 21 16:28:34 2012, using kdoc 2.0a54.