Teonet CQue callback function.
More...
#include <teonet.hpp>
|
| CQue (Teonet *t, bool send_event=false) |
|
| CQue (const CQue &obj) |
|
virtual | ~CQue () |
|
template<typename Callback , typename T > |
cqueData * | add (Callback cb, T timeout=5.00, void *user_data=NULL) |
| Add callback to queue. More...
|
|
template<typename T > |
cqueData * | add (cqueCallback cb, T timeout=5.00, void *user_data=NULL) |
|
template<typename T > |
cqueData * | add (T timeout=5.00, void *user_data=NULL) |
|
int | remove (uint32_t id) |
|
template<typename Callback > |
void * | find (void *find, const Callback compare, size_t *key_length=NULL) |
|
template<typename Callback > |
void * | find (const std::string &find, const Callback compare, size_t *key_length=NULL) |
|
int | exec (uint32_t id) |
| Execute callback queue record. More...
|
|
cqueData * | getData (void *data) const |
| Get pointer to CQue data structure. More...
|
|
void * | getCQueData (int id) const |
|
uint32_t | getId (cqueData *cd) const |
| Get CQue data id. More...
|
|
Teonet * | getTeonet () const |
| Get pointer to teonet class object. More...
|
|
int | setUserData (uint32_t id, void *data) |
| Set callback queue data, update data set in ksnCQueAdd. More...
|
|
Teonet CQue callback function.
Teonet CQue class
teo::Teonet::CQue::CQue |
( |
Teonet * |
t, |
|
|
bool |
send_event = false |
|
) |
| |
|
inlineexplicit |
teo::Teonet::CQue::CQue |
( |
const CQue & |
obj | ) |
|
|
inline |
virtual teo::Teonet::CQue::~CQue |
( |
| ) |
|
|
inlinevirtual |
template<typename Callback , typename T >
cqueData* teo::Teonet::CQue::add |
( |
Callback |
cb, |
|
|
T |
timeout = 5.00 , |
|
|
void * |
user_data = NULL |
|
) |
| |
|
inline |
Add callback to queue.
- Parameters
-
cb | Callback function or NULL. The teonet event EV_K_CQUE_CALLBACK should be send at the same time. |
timeout | Callback timeout. If equal to 0 than timeout sets automatically to 5 sec |
user_data | The user data which should be send to the Callback function |
- Returns
- Pointer to added ksnCQueData or NULL if error occurred
References data, and ksnCQueAdd().
Referenced by teo::Teonet::TeoDB::send().
template<typename T >
cqueData* teo::Teonet::CQue::add |
( |
T |
timeout = 5.00 , |
|
|
void * |
user_data = NULL |
|
) |
| |
|
inline |
int teo::Teonet::CQue::exec |
( |
uint32_t |
id | ) |
|
|
inline |
Execute callback queue record.
Execute callback queue record and remove it from queue
- Parameters
-
- Returns
- return 0: if callback executed OK; !=0 some error occurred
References ksnCQueExec().
Referenced by teo::Teonet::TeoDB::exec().
template<typename Callback >
void* teo::Teonet::CQue::find |
( |
void * |
find, |
|
|
const Callback |
compare, |
|
|
size_t * |
key_length = NULL |
|
) |
| |
|
inline |
template<typename Callback >
void* teo::Teonet::CQue::find |
( |
const std::string & |
find, |
|
|
const Callback |
compare, |
|
|
size_t * |
key_length = NULL |
|
) |
| |
|
inline |
void* teo::Teonet::CQue::getCQueData |
( |
int |
id | ) |
const |
|
inline |
cqueData* teo::Teonet::CQue::getData |
( |
void * |
data | ) |
const |
|
inline |
Get pointer to CQue data structure.
- Parameters
-
data | Pointer to data at EV_K_CQUE_CALLBACK event |
- Returns
- Pointer to CQue data structure
References data.
uint32_t teo::Teonet::CQue::getId |
( |
cqueData * |
cd | ) |
const |
|
inline |
Teonet* teo::Teonet::CQue::getTeonet |
( |
| ) |
const |
|
inline |
Get pointer to teonet class object.
- Returns
- Pointer to teonet class object
int teo::Teonet::CQue::remove |
( |
uint32_t |
id | ) |
|
|
inline |
int teo::Teonet::CQue::setUserData |
( |
uint32_t |
id, |
|
|
void * |
data |
|
) |
| |
|
inline |
Set callback queue data, update data set in ksnCQueAdd.
- Parameters
-
id | Existing callback queue ID |
data | Pointer to new user data |
- Returns
- return 0: if data set OK; !=0 some error occurred
References data, and ksnCQueGetData().
The documentation for this class was generated from the following file: