00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _GATREGISTRY_H_
00020 #define _GATREGISTRY_H_ 1
00021
00022 #include "GATPreferences.h"
00023
00024
00025 typedef struct CPIRegistryList_S *CPIRegistryList;
00026 typedef struct CPIRegistryList_S const *CPIRegistryList_const;
00027
00028 typedef GATResult (*GATCPICallback)(CPIRegistryList_const, void *);
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 #define CPI(object) \
00046 int GATRegistry_AddGAT ## object ## CPI(GATRegistry registry, \
00047 GAT ## object ## CPI cpi, \
00048 void *token, \
00049 GATPreferences_const preferences); \
00050 \
00051 struct GAT ## object ## CPIList_S \
00052 { \
00053 struct GAT ## object ## CPIList_S *next; \
00054 GAT ## object ## CPI cpi; \
00055 }; \
00056 \
00057 typedef struct GAT ## object ## CPIList_S *GAT ## object ## CPIList; \
00058 typedef struct GAT ## object ## CPIList_S const * \
00059 GAT ## object ## CPIList_const; \
00060 \
00061 GAT ## object ## CPIList GATRegistry_FindGAT ## object ## CPI( \
00062 GATRegistry_const reg, GATPreferences_const preferences); \
00063 \
00064 void GAT ## object ## CPIList_Destroy(GAT ## object ## CPIList list); \
00065 \
00066 GAT ## object ## CPIList GATRegistry_CloneGAT ## object ## CPIList( \
00067 GAT ## object ## CPIList_const list); \
00068 \
00069 typedef GATResult (*GAT ## object ## CPICallback)(GAT ## object ## CPI, \
00070 void *); \
00071 \
00072 GATResult GATRegistry_WalkGAT ## object ## CPIList(GATRegistry_const registry,\
00073 GATCPICallback, void *data); \
00074 \
00075 GATResult GATRegistry_AddGAT ## object ## ToCPIList(GATContext ctx, \
00076 GAT ## object ## CPI cpi, GAT ## object obj); \
00077 \
00078 GATResult GATRegistry_RemoveGAT ## object ## FromCPIList( \
00079 GATContext ctx, GAT ## object ## CPI cpi, \
00080 GAT ## object obj) \
00081
00082
00083
00084 #include "GATFileStreamCPI.h"
00085 #include "GATPipeCPI.h"
00086 #include "GATEndpointCPI.h"
00087 #include "GATFileCPI.h"
00088 #include "GATLogicalFileCPI.h"
00089 #include "GATResourceBrokerCPI.h"
00090 #include "GATReservationCPI.h"
00091 #include "GATResourceCPI.h"
00092 #include "GATJobCPI.h"
00093 #include "GATSelfCPI.h"
00094 #include "GATRequestCPI.h"
00095 #include "GATAdvertServiceCPI.h"
00096
00097 #ifdef __cplusplus
00098 extern "C" {
00099 #endif
00100
00101
00102 GATRegistry GATRegistry_Create(void);
00103
00104 void GATRegistry_Destroy(GATRegistry *registry);
00105
00106 int GATRegistry_RemoveByToken(GATRegistry registry, void *token);
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121 GATResult
00122 GATRegistry_internal_ServiceActions(GATRegistry_const registry,
00123 GATContext context, GATTimePeriod_const timeout);
00124
00125
00126 CPI(FileStream);
00127 CPI(Pipe);
00128 CPI(Endpoint);
00129 CPI(File);
00130 CPI(LogicalFile);
00131 CPI(ResourceBroker);
00132 CPI(Reservation);
00133 CPI(Resource);
00134 CPI(Job);
00135 CPI(Self);
00136 CPI(Request);
00137 CPI(AdvertService);
00138
00139 #ifdef __cplusplus
00140 }
00141 #endif
00142
00143
00144 #undef CPI
00145
00146 #endif