00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __SPAdapters__
00021 #define __SPAdapters__
00022
00023
00024
00025
00026
00027
00028
00029
00030 #include "SPTypes.h"
00031 #include "SPCaches.h"
00032 #include "SPMData.h"
00033 #include "SPProps.h"
00034
00035 #include "SPHeaderBegin.h"
00036
00037 #ifdef __cplusplus
00038 extern "C" {
00039 #endif
00040
00041
00042
00043
00044
00045
00046
00047
00048
00050 #define kSPAdaptersSuite "SP Adapters Suite"
00051
00052 #define kSPAdaptersSuiteVersion 3
00053
00061 #define kSPAdaptersCaller "SP Adapters"
00062
00068 #define kSPAdaptersStartupSelector "Start up"
00069
00074 #define kSPAdaptersShutdownSelector "Shut down"
00075
00081 #define kSPAdaptersDisposeInfoSelector "Dispose info"
00082
00086 #define kSPAdaptersFlushSelector "Flush"
00087
00088
00089
00104 #define kSPAdaptersRegisterPluginsSelector "Register plugins"
00105
00111 #define kSPAdaptersLoadPluginSelector "Load plugin"
00112
00117 #define kSPAdaptersReleasePluginSelector "Release plugin"
00118
00124 #define kSPAdaptersSendMessageSelector "Send message"
00125
00126
00127
00128
00129
00130
00131
00132
00134 #define kSPAdaptersFindPropertySelector "Find property"
00135
00136 #define kSPAdaptersAboutSelector "About"
00137
00138 #define kSPAdaptersAcquireSuiteHostSelector "Acquire Suite"
00139
00140 #define kSPAdaptersReleaseSuiteHostSelector "Release Suite"
00141
00144 #define kSPRuntimeAdapterList ((SPAdapterListRef)NULL)
00145
00146
00147
00148
00149
00150
00151
00152
00154 typedef struct SPAdapter *SPAdapterRef;
00158 typedef struct SPAdapterList *SPAdapterListRef;
00161 typedef struct SPAdapterListIterator *SPAdapterListIteratorRef;
00162
00165 typedef struct SPAdaptersMessage {
00167 SPMessageData d;
00170 SPAdapterRef adapter;
00171
00175 struct SPPlugin *targetPlugin;
00177 SPErr targetResult;
00178
00181 PIType vendorID;
00184 PIType propertyKey;
00187 ai::int32 propertyID;
00190 void *property;
00191
00196 SPFlushCachesProc flushProc;
00199 ai::int32 flushed;
00200
00203 struct SPSuiteList *suiteList;
00206 struct SPSuite *suite;
00209 struct SPPlugin *host;
00212 const void *suiteProcs;
00215 ai::int32 acquired;
00216
00219 const char *plugin_caller;
00222 const char *plugin_selector;
00225 void *plugin_message;
00226 } SPAdaptersMessage;
00227
00229 struct SPStringPool;
00230
00231
00232
00233
00234
00235
00290 typedef struct SPAdaptersSuite {
00291
00297 SPAPI SPErr (*AllocateAdapterList)( struct SPStringPool *stringPool, SPAdapterListRef *adapterList );
00302 SPAPI SPErr (*FreeAdapterList)( SPAdapterListRef adapterList );
00316 SPAPI SPErr (*AddAdapter)( SPAdapterListRef adapterList, struct SPPlugin *host, const char *name,
00317 ai::int32 version, SPAdapterRef *adapter );
00318
00325 SPAPI SPErr (*SPFindAdapter)( SPAdapterListRef adapterList, const char *name, SPAdapterRef *adapter );
00326
00334 SPAPI SPErr (*NewAdapterListIterator)( SPAdapterListRef adapterList, SPAdapterListIteratorRef *iter );
00342 SPAPI SPErr (*NextAdapter)( SPAdapterListIteratorRef iter, SPAdapterRef *adapter );
00347 SPAPI SPErr (*DeleteAdapterListIterator)( SPAdapterListIteratorRef iter );
00348
00353 SPAPI SPErr (*GetAdapterHost)( SPAdapterRef adapter, struct SPPlugin **plugin );
00358 SPAPI SPErr (*GetAdapterName)( SPAdapterRef adapter, const char **name );
00363 SPAPI SPErr (*GetAdapterVersion)( SPAdapterRef adapter, ai::int32 *version );
00364
00365 } SPAdaptersSuite;
00366
00367
00369 SPAPI SPErr SPAllocateAdapterList( struct SPStringPool *stringPool, SPAdapterListRef *adapterList );
00371 SPAPI SPErr SPFreeAdapterList( SPAdapterListRef adapterList );
00372
00374 SPAPI SPErr SPAddAdapter( SPAdapterListRef adapterList, struct SPPlugin *host, const char *name,
00375 ai::int32 version, SPAdapterRef *adapter );
00376
00378 SPAPI SPErr SPFindAdapter( SPAdapterListRef adapterList, const char *name, SPAdapterRef *adapter );
00379
00381 SPAPI SPErr SPNewAdapterListIterator( SPAdapterListRef adapterList, SPAdapterListIteratorRef *iter );
00383 SPAPI SPErr SPNextAdapter( SPAdapterListIteratorRef iter, SPAdapterRef *adapter );
00385 SPAPI SPErr SPDeleteAdapterListIterator( SPAdapterListIteratorRef iter );
00386
00388 SPAPI SPErr SPGetAdapterHost( SPAdapterRef adapter, struct SPPlugin **plugin );
00390 SPAPI SPErr SPGetAdapterName( SPAdapterRef adapter, const char **name );
00392 SPAPI SPErr SPGetAdapterVersion( SPAdapterRef adapter, ai::int32 *version );
00393
00394
00395
00396
00397
00398
00399
00400
00401 #include "SPErrorCodes.h"
00402
00403
00404 #ifdef __cplusplus
00405 }
00406 #endif
00407
00408 #include "SPHeaderEnd.h"
00409
00410 #endif