Adobe.com
Contents Files

SoCClient.h

Go to the documentation of this file.
00001 /**************************************************************************
00002 * ADOBE SYSTEMS INCORPORATED
00003 * Copyright 1998 Adobe Systems Incorporated
00004 * All Rights Reserved
00005 *
00006 * NOTICE:  Adobe permits you to use, modify, and distribute this file in accordance with the
00007 * terms of the Adobe license agreement accompanying it.  If you have received this file from a
00008 * source other than Adobe, then your use, modification, or distribution of it requires the prior
00009 * written permission of Adobe.
00010 **************************************************************************/
00011 
00017 #if SC_ONCE
00018 #pragma once
00019 #endif
00020 
00021 #ifndef _SoCClient_h
00022 #define _SoCClient_h
00023 
00024 #ifndef PUBLIC
00025 #include <stddef.h>
00026 #include "SoSharedLibDefs.h"
00027 #endif
00028 
00029 #ifdef __cplusplus
00030 extern "C" {
00031 #endif
00032 
00033 #ifndef PUBLIC
00034 
00038 #endif
00039 
00040 /* ----------------------------------------------------------- */
00041 /* blind pointers (C reference to server and objects)          */
00042 /* ----------------------------------------------------------- */
00048 typedef long* SoHServer ;
00049 typedef long* SoHObject ;
00050 
00051 
00052 /* ----------------------------------------------------------- */
00053 /* SoCClientName                                               */
00054 /* ----------------------------------------------------------- */
00061 struct SoCClientName_s
00062 {
00063         const char* name_sig ;
00064         int                     id       ;
00065         char*       desc     ;
00066 };
00067 typedef struct SoCClientName_s SoCClientName   ;
00068 typedef SoCClientName*         SoCClientName_p ;
00069 
00070 
00071 /* ----------------------------------------------------------- */
00072 /* memory callbacks                                            */
00073 /* ----------------------------------------------------------- */
00080 typedef void* (*SoMemoryMalloc_f)(size_t) ;
00081 typedef void  (*SoMemoryFree_f)  (void*)  ;
00082 struct SoMemoryInterface_s
00083 {
00084   SoMemoryMalloc_f malloc ;
00085   SoMemoryFree_f   free   ;
00086 } ;
00087 typedef struct SoMemoryInterface_s SoMemoryInterface   ;
00088 typedef        SoMemoryInterface*  SoMemoryInterface_p ;
00089 
00090 
00091 /* ----------------------------------------------------------- */
00092 /* Object callbacks                                            */
00093 /* ----------------------------------------------------------- */
00104 typedef ESerror_t (*SoObjectInitialize_f)( SoHObject hObject, int argc,TaggedData* argv) ;
00105 typedef ESerror_t (*SoObjectGet_f       )( SoHObject hObject, SoCClientName* name,TaggedData*  pValue) ;
00106 typedef ESerror_t (*SoObjectPut_f       )( SoHObject hObject, SoCClientName* name, TaggedData* pValue) ;
00107 typedef ESerror_t (*SoObjectCall_f      )( SoHObject hObject, SoCClientName* name,int argc,TaggedData* argv,TaggedData* pResult) ;
00108 typedef ESerror_t (*SoObjectValueOf_f   )( SoHObject hObject, TaggedData* pResult) ;
00109 typedef ESerror_t (*SoObjectToString_f  )( SoHObject hObject, TaggedData* pResult) ;
00110 typedef ESerror_t (*SoObjectFinalize_f  )( SoHObject hObject) ;
00111 
00112 typedef struct SoObjectInterface_s
00113 {
00114   SoObjectInitialize_f    initialize    ;
00115   SoObjectPut_f           put           ;
00116   SoObjectGet_f           get           ;
00117   SoObjectCall_f          call          ;
00118   SoObjectValueOf_f       valueOf       ;
00119   SoObjectToString_f      toString      ;
00120   SoObjectFinalize_f      finalize      ;
00121 } SoObjectInterface, *SoObjectInterface_p ;
00122 
00123 /* ----------------------------------------------------------- */
00124 /* Server callbacks                                            */
00125 /* ----------------------------------------------------------- */
00126 
00127 typedef struct SoServerInterface_s SoServerInterface   ;
00128 typedef        SoServerInterface*  SoServerInterface_p ;
00129 
00130 typedef void*     (*SoServerMalloc_f        )(SoHServer hServer,size_t nBytes ) ;
00131 typedef void      (*SoServerFree_f          )(SoHObject hObject,void*  pMem   ) ;
00132 typedef ESerror_t (*SoServerDumpServer_f    )(SoHServer hServer ) ;
00133 typedef ESerror_t (*SoServerDumpObject_f    )(SoHObject hObject ) ;
00134 typedef ESerror_t (*SoServerAddClass_f      )(SoHServer hServer,char* name,SoObjectInterface_p objectInterface) ;
00135 typedef ESerror_t (*SoServerAddMethod_f     )(SoHObject hObject,const char* name,int id,char* desc) ;
00136 typedef ESerror_t (*SoServerAddMethods_f    )(SoHObject hObject,SoCClientName_p pNames            ) ;
00137 typedef ESerror_t (*SoServerAddProperty_f   )(SoHObject hObject,const char* name,int id,char* desc) ;
00138 typedef ESerror_t (*SoServerAddProperties_f )(SoHObject hObject,SoCClientName_p pNames            ) ;
00139 typedef ESerror_t (*SoServerGetClass_f      )(SoHObject hObject,char* name,int name_l             ) ;
00140 typedef ESerror_t (*SoServerGetServer_f     )(SoHObject hObject,SoHServer* phServer   ,SoServerInterface_p* ppServerInterface) ;
00141 typedef ESerror_t (*SoServerSetClientData_f )(SoHObject hObject,void*      pClientData) ;
00142 typedef ESerror_t (*SoServerGetClientData_f )(SoHObject hObject,void**    ppClientData) ;
00143 typedef ESerror_t (*SoServerEval_f          )(SoHObject hServer,char* string,TaggedData* pTaggedData) ;
00144 typedef ESerror_t (*SoServerTaggedDataInit_f)(SoHObject hServer,TaggedData* pTaggedData) ;
00145 typedef ESerror_t (*SoServerTaggedDataFree_f)(SoHServer hServer,TaggedData* pTaggedData) ;
00146 #ifndef PUBLIC
00147 typedef ESerror_t (*SoServerCallLiveObject_f)(SoHServer hServer,SoHObject hObject,char* method,int argc,TaggedData* argv,TaggedData* pResult) ;
00148 typedef ESerror_t (*SoServerGetLiveObject_f )(SoHServer hServer,SoHObject hObject,char* method,TaggedData* pResult) ;
00149 typedef ESerror_t (*SoServerPutLiveObject_f )(SoHServer hServer,SoHObject hObject,char* method,TaggedData* pValue ) ;
00150 #else
00151 typedef ESerror_t (*SoReserved_f)(void) ;
00152 #endif
00153 
00171 #ifndef PUBLIC
00172 /*
00173 @param  SoServerCallLiveObject_f        Call a live object
00174 @param  SoServerGetLiveObject_f         Get a live object property
00175 @param  SoServerPutLiveObject_f         Set a live object property
00176 */
00177 #endif
00178 
00179 struct SoServerInterface_s
00180 {
00181   SoServerDumpServer_f      dumpServer    ;
00182   SoServerDumpObject_f      dumpObject    ;
00183   SoServerAddClass_f        addClass      ;
00184 
00185   SoServerAddMethod_f       addMethod     ;
00186   SoServerAddMethods_f      addMethods    ;
00187   SoServerAddProperty_f     addProperty   ;
00188   SoServerAddProperties_f   addProperties ;
00189 
00190   SoServerGetClass_f        getClass       ;
00191   SoServerGetServer_f       getServer      ;
00192 
00193   SoServerSetClientData_f   setClientData  ;
00194   SoServerGetClientData_f   getClientData  ;
00195 
00196   SoServerEval_f            eval           ;
00197   SoServerTaggedDataInit_f  taggedDataInit ;
00198   SoServerTaggedDataFree_f      taggedDataFree ;
00199 
00200 #ifndef PUBLIC
00201   SoServerCallLiveObject_f  callLiveObject ;
00202   SoServerGetLiveObject_f   getLiveObject  ;
00203   SoServerPutLiveObject_f   putLiveObject  ;
00204 #else
00205   SoReserved_f                          reserved1  ;
00206   SoReserved_f                          reserved2  ;
00207   SoReserved_f                          reserved3  ;
00208 #endif
00209 } ;
00210 
00211 /* ----------------------------------------------------------- */
00212 /* CClient interface                                           */
00213 /* ----------------------------------------------------------- */
00214 typedef enum
00215 { kSoCClient_init,
00216   kSoCClient_term,
00217   __SoClient__32bit__   = 0x7FFFFFFF
00218 } SoCClient_e ;
00219 
00220 
00227 typedef ESerror_t (*SoCClient_f)
00228 ( SoCClient_e        eReason
00229 , SoServerInterface* pServer
00230 , SoHServer          hServer
00231 ) ;
00232 
00233 /* ----------------------------------------------------------- */
00234 /* library entry points                                        */
00235 /* ----------------------------------------------------------- */
00241 extern ESerror_t SoCClientInitialize(SoCClient_f,SoMemoryInterface_p) ;
00242 
00247 extern ESerror_t SoCClientTerminate (SoCClient_f) ;
00248 
00253 extern ESerror_t SoCClientTerminateAll() ;
00254 
00255 
00256 
00257 
00258 #ifdef __cplusplus
00259 }
00260 #endif
00261 #endif
Contents Files
Adobe Solutions Network
 
Copyright © 2010 Adobe Systems Incorporated. All rights reserved.
Terms of Use Online Privacy Policy Adobe and accessibility Avoid software piracy Permissions and Trademarks