Oyranos  git-devel
Oyranos is a full featured Color Management System
Public Member Functions | Data Fields
oyJob_s Struct Reference

Asynchron job ticket. More...

#include <oyranos_threads.h>

Inheritance diagram for oyJob_s:
Inheritance graph
Collaboration diagram for oyJob_s:
Collaboration graph

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_soyJob_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...
- Public Member Functions inherited from oyStruct_s
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...
 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...
 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...
- Data Fields inherited from oyStruct_s
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...

Detailed Description

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.

Oyranos: 0.9.6
2014/01/27 (Oyranos: 0.9.5)

Field Documentation

◆ cb_progress

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.


◆ cb_progress_context

oyStruct_s* oyJob_s::cb_progress_context

the progress callback context

optional data

◆ context

oyStruct_s* oyJob_s::context

the workload data; optional


◆ copy_not

oyStruct_Copy_f oyJob_s::copy_not

keep to zero; as it is dangerous in a threaded context

◆ finish

int(* oyJob_s::finish) (oyJob_s *job)

the managing thread callback; optional

See also

◆ flags_

int oyJob_s::flags_

oyJob_Add() provided flags; keep read only

◆ id_

int oyJob_s::id_

thread plug-in provided work ID, keep read only

◆ oy_

oyObject_s oyJob_s::oy_

Oyranos internal object; not needed, keep to zero.

◆ release

oyStruct_Release_f oyJob_s::release

Release function; optional.

◆ status_done_

int oyJob_s::status_done_

Oyranos internal variable

◆ status_work_return

int oyJob_s::status_work_return

return value of the work() function

◆ thread_id_

int oyJob_s::thread_id_

thread plug-in provided ID; keep read only

◆ type_

oyOBJECT_e oyJob_s::type_


Referenced by oyJob_Release().

◆ work

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.