Adobe.com
Contents Suites Classes Class Index Member Index

SPAdapts.h

Go to the documentation of this file.
00001 /***********************************************************************/
00002 /*                                                                     */
00003 /* SPAdapts.h                                                                                                              */
00004 /*                                                                     */
00005 /* ADOBE SYSTEMS INCORPORATED                                          */
00006 /* Copyright 1995-2007 Adobe Systems Incorporated.                     */
00007 /* All Rights Reserved.                                                */
00008 /*                                                                     */
00009 /* NOTICE:  Adobe permits you to use, modify, and distribute this file */
00010 /* in accordance with the terms of the Adobe license agreement         */
00011 /* accompanying it. If you have received this file from a source other */
00012 /* than Adobe, then your use, modification, or distribution of it      */
00013 /* requires the prior written permission of Adobe.                     */
00014 /*                                                                     */
00015 /* Patents Pending                                                     */
00016 /*                                                                     */
00017 /*                                                                     */
00018 /***********************************************************************/
00019 
00020 #ifndef __SPAdapters__
00021 #define __SPAdapters__
00022 
00023 
00024 /*******************************************************************************
00025  **
00026  **     Imports
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  ** Constants
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 // Second generation adapters (has property 'adpt'/2)
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 // First generation adapters (no 'adpt' property, or 'adpt'/1 )
00127 //-------------------------------------------------------------
00128 // These messages are only for the "SP2 Adapter" that is built into
00129 // Sweet Pea and maybe legacy adapters (i.e., AI6Adapter for AI7).
00130 // For newer adapters, all of these methods are now deprecated.
00131 // New adapters should do the vast majority of their processing via
00132 // the message kSPAdaptersSendMessageSelector.
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  ** Types
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;  /* use these if you need name, apiVersion, internalVersion */
00206         struct SPSuite *suite;
00209         struct SPPlugin *host;                  /* plug-in hosting the suite, to be aquired/released by adapter */
00212         const void *suiteProcs;                 /* returned here if reallocated */
00215         ai::int32 acquired;                                     /* returned here */
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  ** Suite
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  ** Errors
00398  **
00399  **/
00400 
00401 #include "SPErrorCodes.h"
00402 
00403 
00404 #ifdef __cplusplus
00405 }
00406 #endif
00407 
00408 #include "SPHeaderEnd.h"
00409 
00410 #endif


Contents Suites Classes Class Index Member Index
Adobe Solutions Network
 
Copyright © 2014 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks