FireSync API
 All Classes Files Functions Variables Typedefs Friends Macros Modules Pages
kUpgThread.z.h
1 #ifndef kFS_UPGTHREAD_Z_H
2 #define kFS_UPGTHREAD_Z_H
3 
5 #include <kApi/Data/kArrayList.h>
6 
7 kBeginHeader()
8 
9 typedef enum
10 {
11  kFS_UPG_THREAD_READY,
12  kFS_UPG_THREAD_RUNNING,
13  kFS_UPG_THREAD_DONE
14 } kUpgThreadState;
15 
16 typedef struct
17 {
18  kObjectClass base;
19  kUpgThreadState state;
20  k32u currentTask;
21  k32u currentTaskWeight;
22  kStatus completionStatus;
23  kArrayList tasks;
24  k32u weight;
25  k32u completedWeight;
26  k32u inprogressWeight;
27 } kUpgThreadClass;
28 
29 #define kUpgThread_Cast_(CONTEXT) kCastClass_(kUpgThread, CONTEXT)
30 
31 kFsFx(kStatus) kUpgThread_Init(kUpgThread task, kType type, kAlloc alloc);
32 kFsFx(kStatus) kUpgThread_VRelease(kUpgThread thread);
33 
34 kFsFx(kStatus) kUpgThread_BeginTask(kUpgThread thread);
35 kFsFx(kStatus) kUpgThread_EndTask(kUpgThread thread, kBool* waiting);
36 
37 kFsFx(kStatus) kUpgThread_TaskProgressFx(kUpgThread thread, kObject sender, void* param);
38 
39 kEndHeader()
40 #endif
Declares the kUpgThread class.
Runs a list of asynchronous tasks in order.