Functions | |
wcRCode DLLEXPORT | wcTaskGetClass (wcTask task, wcTaskClass *id) |
Get the class of the task. More... | |
wcRCode DLLEXPORT | wcTaskGetUserData (wcTask task, void **data) |
Get the user data for the task. More... | |
wcRCode DLLEXPORT | wcTaskSetUserData (wcTask task, void *data) |
Set the user data for the task. More... | |
wcRCode DLLEXPORT | wcTaskLock (wcTask task) |
Lock the task object for threadsafe access. More... | |
wcRCode DLLEXPORT | wcTaskUnLock (wcTask task) |
Unlock the task object. More... | |
wcRCode DLLEXPORT | wcTaskGetStrValue (wcTask task, wcTaskStateId aStateId, char **aStateVal) |
Get a C-style string value for the selected task state. More... | |
wcRCode DLLEXPORT | wcTaskGetStrNValue (wcTask task, wcTaskStateId aStateId, uint32_t sz, char *aStateVal) |
Get a C-style string value for the selected task state. More... | |
wcRCode DLLEXPORT wcTaskGetClass | ( | wcTask | task, |
wcTaskClass * | id | ||
) |
Get the class of the task.
Possible results for the id parameter:
WC_TASK,
WC_IN_STREAM_TASK,
WC_OUT_STREAM_TASK.
task | Pointer to the task object. |
id | Pointer to the variable of wcTaskClass type to return the task class. |
Get the user data for the task.
task | Pointer to the task object. |
data | Pointer to the variable of void * type to return the user data. |
Set the user data for the task.
Data is not deleted by library.
task | Pointer to the task object. |
data | The user data. |
Lock the task object for threadsafe access.
task | Pointer to the task object. |
wcRCode DLLEXPORT wcTaskGetStrValue | ( | wcTask | task, |
wcTaskStateId | aStateId, | ||
char ** | aStateVal | ||
) |
Get a C-style string value for the selected task state.
As a result of successful execution of the function, the aStateVal parameter will contain a pointer to NULL-terminated string. (Don't forget to free up memory after using the aStateVal). Acceptable values of the state param are:
wctstError - get the last error for the task - acceptable for WC_ALL_TASKS,
wctstPath - get the target path for the task - acceptable for WC_ALL_TASKS,
wctstSubProto - get the specified protocol for the output streaming task - acceptable for WC_OUT_STREAM_TASK - wcLaunchOutStream,
wctstDeviceName - get the specified device name for the input streaming task - acceptable for WC_IN_STREAM_TASK - wcLaunchInStream.
task | Pointer to the task object. |
aStateId | The selected task state. |
aStateVal | The pointer to the variable of char * type initialized with NULL value |
Example
wcRCode DLLEXPORT wcTaskGetStrNValue | ( | wcTask | task, |
wcTaskStateId | aStateId, | ||
uint32_t | sz, | ||
char * | aStateVal | ||
) |
Get a C-style string value for the selected task state.
As a result of successful execution of the function, the requested value will be copied to the passed array aStateVal. If the size of the passed array is less than the requested state value, the function returns an WC_NOT_ENOUGH_MEM error. Acceptable values of the state param are listed in wcTaskGetStrValue
task | Pointer to the task object. |
aStateId | The selected task state. |
aStateVal | The pointer to allocated char array with at least sz+1 chars. |
sz | The size of the given char array. |
Example