Adobe.com
Contents Suites Classes Class Index Member Index

SPAccess.h

Go to the documentation of this file.
00001 /***********************************************************************/
00002 /*                                                                     */
00003 /* SPAccess.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 __SPAccess__
00021 #define __SPAccess__
00022 
00023 
00024 /*******************************************************************************
00025  **
00026  **     Imports
00027  **
00028  **/
00029 
00030 #include "SPTypes.h"
00031 #include "SPPlugs.h"
00032 #include "SPMData.h"
00033 
00034 #if defined(MAC_ENV) && !defined(IOS_ENV)
00035         #import <CoreServices/CoreServices.h>
00036 #endif
00037 
00038 #ifdef WIN_ENV
00039         #include "AIWinDef.h"
00040 #endif
00041 
00042 #include "SPHeaderBegin.h"
00043 
00044 #ifdef __cplusplus
00045 extern "C" {
00046 #endif
00047 
00048 
00049 /*******************************************************************************
00050  **
00051  ** Constants
00052  **
00053  **/
00054 
00055 /*
00056  *      The name and version number of the PICA Plug-in Access suite.
00057  */
00058 
00060 #define kSPAccessSuite                          "SP Access Suite"
00061 
00062 #define kSPAccessSuiteVersion           3
00063 
00095 #define kSPAccessCaller                         "SP Access"
00096 
00101 #define kSPAccessReloadSelector         "Reload"
00102 
00106 #define kSPAccessUnloadSelector         "Unload"
00107 
00137 #define kSPFlushAccessType                      "SP Flush Access"
00138 
00139 
00140 /*******************************************************************************
00141  **
00142  ** Types
00143  **
00144  **/
00145 
00153 typedef SPAPI SPErr (*SPEntry)( const char *caller, const char *selector, void *message );
00154 
00155 
00163 typedef struct SPAccess *SPAccessRef;
00164 
00165 
00166 
00167 
00168 
00169 #ifdef MAC_ENV
00170 #if     defined(IOS_ENV)
00171 typedef struct _SPMacResChain SPMacResChain;
00172 typedef SPMacResChain* SPPlatformAccessRef;
00173 #else
00174 #ifndef __FILES__
00175 #if __LP64__
00176         typedef int                             FSIORefNum;
00177 #else
00178         typedef short                          FSIORefNum;
00179 #endif  /* __LP64__ */
00180 #endif  
00181 
00182 typedef struct {
00184         FSIORefNum fileRefNum;
00186         CFBundleRef bundleRef;
00187 } SPMacResChain;
00188 
00190 typedef SPMacResChain *SPPlatformAccessRef;
00191 #endif  // !defined(IOS_ENV)
00192 
00193 #endif
00194 
00195 #ifdef WIN_ENV
00196 
00198 typedef HINSTANCE SPPlatformAccessRef;
00199 
00200 #endif
00201 
00202 #if     !defined(IOS_ENV)
00203 
00205 typedef struct {
00207         SPPlatformAccessRef defaultAccess;      /* */
00211         SPPlatformAccessRef resourceAccess;
00213         ai::uint32 lastAccessTicks;
00214 } SPPlatformAccessInfo;
00215 #endif  // !defined(IOS_ENV)
00216 
00217 
00218 
00222 typedef enum {
00225         kStartup = 0,
00229         kRuntime,
00232         kShutdown,
00238         kTerminal
00239 } SPAccessPoint;
00240 
00242 typedef struct SPAccessMessage {
00244         SPMessageData d;
00246         SPAccessPoint when;
00247 } SPAccessMessage;
00248 
00249 
00250 /*******************************************************************************
00251  **
00252  ** Suite
00253  **
00254  **/
00255 
00287 typedef struct SPAccessSuite {
00288 
00299         SPAPI SPErr (*AcquirePlugin)( SPPluginRef plugin, SPAccessRef *access );
00300 
00306         SPAPI SPErr (*ReleasePlugin)( SPAccessRef access );
00307 
00322         SPAPI SPErr (*GetPluginAccess)( SPPluginRef plugin, SPAccessRef *access );
00328         SPAPI SPErr (*GetAccessPlugin)( SPAccessRef access, SPPluginRef *plugin );
00335         SPAPI SPErr (*GetAccessEntry)( SPAccessRef access, SPEntry *entry );
00340         SPAPI SPErr (*GetAccessCount)( SPAccessRef access, ai::int32 *count );
00341 #if     !defined(IOS_ENV)
00342 
00347         SPAPI SPErr (*GetAccessInfo)( SPAccessRef access, SPPlatformAccessInfo *info );
00348 
00356         SPAPI SPErr (*GetPluginResourceAccess)( SPPluginRef plugin, SPPlatformAccessRef *resourceAccess );
00361         SPAPI SPErr (*SetPluginResourceAccess)( SPPluginRef plugin, SPPlatformAccessRef resourceAccess );
00362 #endif  // !defined(IOS_ENV)
00363 
00372         SPAPI SPErr (*CallPlugin)( SPAccessRef access, const char *caller, const char *selector,
00373                                         void *message, SPErr *result );
00374 
00381         SPAPI SPErr (*GetCurrentPlugin)( SPPluginRef *plugin );
00388         SPAPI SPErr (*SetCurrentPlugin)( SPPluginRef plugin );
00389 
00390 } SPAccessSuite;
00391 
00393 SPAPI SPErr SPAcquirePlugin( SPPluginRef plugin, SPAccessRef *access );
00395 SPAPI SPErr SPReleasePlugin( SPAccessRef access );
00396 
00398 SPAPI SPErr SPGetPluginAccess( SPPluginRef plugin, SPAccessRef *access );
00400 SPAPI SPErr SPGetAccessPlugin( SPAccessRef access, SPPluginRef *plugin );
00402 SPAPI SPErr SPGetAccessEntry( SPAccessRef access, SPEntry *entry );
00404 SPAPI SPErr SPGetAccessCount( SPAccessRef access, ai::int32 *count );
00405 #if     !defined(IOS_ENV)
00406 
00407 SPAPI SPErr SPGetAccessInfo( SPAccessRef access, SPPlatformAccessInfo *info );
00408 
00410 SPAPI SPErr SPGetPluginResourceAccess( SPPluginRef plugin, SPPlatformAccessRef *resourceAccess );
00412 SPAPI SPErr SPSetPluginResourceAccess( SPPluginRef plugin, SPPlatformAccessRef resourceAccess );
00413 #endif  // !defined(IOS_ENV)
00414 
00416 SPAPI SPErr SPCallPlugin( SPAccessRef access, const char *caller, const char *selector,
00417                         void *message, SPErr *result );
00418 
00420 SPAPI SPErr SPGetCurrentPlugin( SPPluginRef *plugin );
00422 SPAPI SPErr SPSetCurrentPlugin( SPPluginRef plugin );
00423 
00424 
00425 /*******************************************************************************
00426  **
00427  ** Errors
00428  **
00429  **/
00430 
00431 #include "SPErrorCodes.h"
00432 
00433 #ifdef __cplusplus
00434 }
00435 #endif
00436 
00437 #include "SPHeaderEnd.h"
00438 
00439 #endif


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