![]() |
Oyranos
git-devel
Oyranos is a full featured Color Management System
|
Asynchron job ticket. More...
#include <oyranos_threads.h>
Public Member Functions | |
void | oyJobHandlingSet (oyJob_Add_f jadd, oyJob_Get_f jget, oyMsg_Add_f madd, oyJobResult_f result, const char *nick) |
Initialise the oyJob_s APIs. More... | |
void | oyJobHandlingReset () |
Reset the oyJob_s APIs. More... | |
oyJob_s * | oyJob_New (oyObject_s object OY_UNUSED) |
Allocate a new oyJob_s object. More... | |
void | oyJob_Release (oyJob_s **job) |
Deallocate a oyJob_s object. More... | |
![]() | |
const char * | oyStruct_GetTextFromModule (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags) |
get object infos from a module More... | |
const char * | oyStruct_GetText (oyStruct_s *obj, oyNAME_e name_type, uint32_t flags) |
Get a text dump. More... | |
int | oyStruct_RegisterStaticMessageFunc (int type, oyStruct_RegisterStaticMessageFunc_f msg, oyStruct_RegisterStaticFreeFunc_f free_func) |
register a function for verbosity More... | |
const char * | oyStruct_GetInfo (oyPointer context_object, oyNAME_e type, int flags) |
get a additional string from a object More... | |
const char * | oyStructTypeToText (oyOBJECT_e type) |
Objects type to small string. More... | |
Data Fields | |
oyOBJECT_e | type_ |
oyOBJECT_JOB_S More... | |
oyStruct_Copy_f | copy_not |
keep to zero; as it is dangerous in a threaded context More... | |
oyStruct_Release_f | release |
Release function; optional. More... | |
oyObject_s | oy_ |
Oyranos internal object; not needed, keep to zero. More... | |
oyStruct_s * | context |
the workload data; optional More... | |
int(* | work )(oyJob_s *job) |
the working thread callback More... | |
int | status_work_return |
return value of the work() function More... | |
int(* | finish )(oyJob_s *job) |
the managing thread callback; optional More... | |
oyJobCallback_f | cb_progress |
the progress callback, called inside the observating thread; optional More... | |
oyStruct_s * | cb_progress_context |
the progress callback context More... | |
int | id_ |
int | thread_id_ |
int | status_done_ |
int | flags_ |
oyJob_Add_f | oyJob_Add = oyJob_AddInit |
Add one unique oyJob_s to the job qeue. More... | |
oyJob_Get_f | oyJob_Get = oyJob_GetInit |
Get one unique oyJob_s from the job qeue. More... | |
oyMsg_Add_f | oyMsg_Add = oyMsg_AddInit |
Add one unique message from the message qeue. More... | |
oyJobResult_f | oyJobResult = oyJobResultInit |
Poll for messages and finished jobs. More... | |
![]() | |
const oyOBJECT_e | type_ |
Type of object. More... | |
oyStruct_Copy_f | copy |
Copy function. More... | |
oyStruct_Release_f | release |
Release function. More... | |
oyObject_s | oy_ |
Oyranos internal object. More... | |
Asynchron job ticket.
A generic job is added to the single job queue with oyJob_Add(). The job queue is worked on by an internal maintained thead.
oyJobCallback_f oyJob_s::cb_progress |
the progress callback, called inside the observating thread; optional
oyJob_s::cb_progress_context may contain a GUI context, like a widget object, to be used to display the progress information from within the main/GUI thread. The callback is optional.
oyStruct_s* oyJob_s::cb_progress_context |
the progress callback context
optional data
oyStruct_s* oyJob_s::context |
the workload data; optional
oyStruct_Copy_f oyJob_s::copy_not |
keep to zero; as it is dangerous in a threaded context
int(* oyJob_s::finish) (oyJob_s *job) |
int oyJob_s::flags_ |
oyJob_Add() provided flags; keep read only
int oyJob_s::id_ |
thread plug-in provided work ID, keep read only
oyObject_s oyJob_s::oy_ |
Oyranos internal object; not needed, keep to zero.
oyStruct_Release_f oyJob_s::release |
Release function; optional.
int oyJob_s::status_done_ |
Oyranos internal variable
int oyJob_s::status_work_return |
return value of the work() function
int oyJob_s::thread_id_ |
thread plug-in provided ID; keep read only
oyOBJECT_e oyJob_s::type_ |
oyOBJECT_JOB_S
Referenced by oyJob_Release().
int(* oyJob_s::work) (oyJob_s *job) |
the working thread callback
Main job function. Here the job does its processing. Data from oyJob_s::context can be used for this.