ires.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00047 #ifndef IRES_
00048 #define IRES_
00049
00052
00053
00054 #ifdef __cplusplus
00055 extern "C" {
00056 #endif
00057
00058 #include "ires_common.h"
00059
00060 typedef enum IRES_YieldResourceType {
00061 IRES_ALL = 0,
00064 IRES_SCRATCHMEMORY,
00067 IRES_SCRATCHDMA,
00070 IRES_RESOURCEHANDLE
00073 } IRES_YieldResourceType;
00074
00075 typedef Void (*IRES_ContextSaveFxn)(IALG_Handle algHandle, Void *contextArgs);
00076 typedef Void (*IRES_ContextRestoreFxn)
00077 (IALG_Handle algHandle, Void *contextArgs);
00078
00084 typedef struct IRES_YieldContext {
00085
00089 IALG_Handle algHandle;
00090
00097 IRES_Handle resourceHandle;
00098
00110 IRES_ContextSaveFxn contextSave;
00111
00125 IRES_ContextRestoreFxn contextRestore;
00126
00134 Void *contextArgs;
00135
00136 } IRES_YieldContext ;
00137
00138
00139 typedef IRES_YieldContext *IRES_YieldContextHandle;
00140 typedef Void *IRES_YieldArgs;
00141
00159 typedef Void (*IRES_YieldFxn)(IRES_YieldResourceType resourceType,
00160 IRES_YieldContextHandle algYieldContext, IRES_YieldArgs yieldArgs);
00161
00168 typedef struct IRES_Fxns {
00169
00174 Void *implementationId;
00175
00180 IRES_Status (*getResourceDescriptors)(IALG_Handle handle,
00181 IRES_ResourceDescriptor *resourceDescriptors);
00182
00190 Int32 (*numResourceDescriptors)(IALG_Handle handle);
00191
00199 IRES_Status (*initResources)(IALG_Handle handle,
00200 IRES_ResourceDescriptor * resourceDescriptor,
00201 IRES_YieldFxn yieldFxn,
00202 IRES_YieldArgs yieldArgs);
00203
00214 IRES_Status (*reinitResources)(IALG_Handle handle,
00215 IRES_ResourceDescriptor * resourceDescriptor,
00216 IRES_YieldFxn yieldFxn,
00217 IRES_YieldArgs yieldArgs);
00218
00223 IRES_Status (*deinitResources)(IALG_Handle handle,
00224 IRES_ResourceDescriptor * resourceDescriptor);
00225
00235 IRES_Status (*activateResource)(IALG_Handle handle,
00236 IRES_Handle resourceHandle);
00237
00244 IRES_Status (*activateAllResources)(IALG_Handle handle);
00245
00252 IRES_Status (*deactivateResource)(IALG_Handle handle,
00253 IRES_Handle resourceHandle);
00254
00261 IRES_Status (*deactivateAllResources)(IALG_Handle handle);
00262
00263 } IRES_Fxns;
00264
00268 #ifdef __cplusplus
00269 }
00270 #endif
00271
00272
00273 #endif
00274
00275
00276
00277