http://www.adobe.com ExtendScript ToolKit

SoCClient.h File Reference

#include <stddef.h>
#include "SoSharedLibDefs.h"

Classes

struct  SoCClientName_s
struct  SoMemoryInterface_s
struct  SoObjectInterface_s
struct  SoServerInterface_s

Typedefs

typedef long * SoHServer
typedef long * SoHObject
typedef struct SoCClientName_s SoCClientName
typedef SoCClientNameSoCClientName_p
typedef void *(* SoMemoryMalloc_f )(size_t)
typedef void(* SoMemoryFree_f )(void *)
typedef struct SoMemoryInterface_s SoMemoryInterface
typedef SoMemoryInterfaceSoMemoryInterface_p
typedef ESerror_t(* SoObjectInitialize_f )(SoHObject hObject, int argc, TaggedData *argv)
typedef ESerror_t(* SoObjectGet_f )(SoHObject hObject, SoCClientName *name, TaggedData *pValue)
typedef ESerror_t(* SoObjectPut_f )(SoHObject hObject, SoCClientName *name, TaggedData *pValue)
typedef ESerror_t(* SoObjectCall_f )(SoHObject hObject, SoCClientName *name, int argc, TaggedData *argv, TaggedData *pResult)
typedef ESerror_t(* SoObjectValueOf_f )(SoHObject hObject, TaggedData *pResult)
typedef ESerror_t(* SoObjectToString_f )(SoHObject hObject, TaggedData *pResult)
typedef ESerror_t(* SoObjectFinalize_f )(SoHObject hObject)
typedef struct SoObjectInterface_s SoObjectInterface
typedef struct
SoObjectInterface_s
SoObjectInterface_p
typedef struct SoServerInterface_s SoServerInterface
typedef SoServerInterfaceSoServerInterface_p
typedef void *(* SoServerMalloc_f )(SoHServer hServer, size_t nBytes)
typedef void(* SoServerFree_f )(SoHObject hObject, void *pMem)
typedef ESerror_t(* SoServerDumpServer_f )(SoHServer hServer)
typedef ESerror_t(* SoServerDumpObject_f )(SoHObject hObject)
typedef ESerror_t(* SoServerAddClass_f )(SoHServer hServer, char *name, SoObjectInterface_p objectInterface)
typedef ESerror_t(* SoServerAddMethod_f )(SoHObject hObject, const char *name, int id, char *desc)
typedef ESerror_t(* SoServerAddMethods_f )(SoHObject hObject, SoCClientName_p pNames)
typedef ESerror_t(* SoServerAddProperty_f )(SoHObject hObject, const char *name, int id, char *desc)
typedef ESerror_t(* SoServerAddProperties_f )(SoHObject hObject, SoCClientName_p pNames)
typedef ESerror_t(* SoServerGetClass_f )(SoHObject hObject, char *name, int name_l)
typedef ESerror_t(* SoServerGetServer_f )(SoHObject hObject, SoHServer *phServer, SoServerInterface_p *ppServerInterface)
typedef ESerror_t(* SoServerSetClientData_f )(SoHObject hObject, void *pClientData)
typedef ESerror_t(* SoServerGetClientData_f )(SoHObject hObject, void **ppClientData)
typedef ESerror_t(* SoServerEval_f )(SoHObject hServer, char *string, TaggedData *pTaggedData)
typedef ESerror_t(* SoServerTaggedDataInit_f )(SoHObject hServer, TaggedData *pTaggedData)
typedef ESerror_t(* SoServerTaggedDataFree_f )(SoHServer hServer, TaggedData *pTaggedData)
typedef ESerror_t(* SoServerCallLiveObject_f )(SoHServer hServer, SoHObject hObject, char *method, int argc, TaggedData *argv, TaggedData *pResult)
typedef ESerror_t(* SoServerGetLiveObject_f )(SoHServer hServer, SoHObject hObject, char *method, TaggedData *pResult)
typedef ESerror_t(* SoServerPutLiveObject_f )(SoHServer hServer, SoHObject hObject, char *method, TaggedData *pValue)
typedef ESerror_t(* SoCClient_f )(SoCClient_e eReason, SoServerInterface *pServer, SoHServer hServer)

Enumerations

enum  SoCClient_e { kSoCClient_init, kSoCClient_term }

Functions

ESerror_t SoCClientInitialize (SoCClient_f, SoMemoryInterface_p)
ESerror_t SoCClientTerminate (SoCClient_f)
ESerror_t SoCClientTerminateAll ()

Typedef Documentation

typedef ESerror_t(* SoCClient_f)(SoCClient_e eReason, SoServerInterface *pServer, SoHServer hServer)

Your client function will be called to start and terminate your library

Parameters:
eReason init or terminate
pServer the server callback interface (to enable you to talk to ExtendScript)
hServer the server

typedef long* SoHObject

typedef long* SoHServer

This is the interface to enable C Clients to manage and use LiveObjects

Further information is available from TechNote: ES0018-CClientLibrary Blind pointers to C++ objects for use from C

Parameters:
SoHServer The Server object
SoHObject A LiveObject

typedef void(* SoMemoryFree_f)(void *)

typedef void*(* SoMemoryMalloc_f)(size_t)

Memory allocation and free functions

Parameters:
SoMemoryMalloc_f memory allocation
SoMemoryFree_f memory free

typedef ESerror_t(* SoObjectCall_f)(SoHObject hObject, SoCClientName *name, int argc, TaggedData *argv, TaggedData *pResult)

typedef ESerror_t(* SoObjectFinalize_f)(SoHObject hObject)

typedef ESerror_t(* SoObjectGet_f)(SoHObject hObject, SoCClientName *name, TaggedData *pValue)

typedef ESerror_t(* SoObjectInitialize_f)(SoHObject hObject, int argc, TaggedData *argv)

Object callbacks. ES will call your functions when required by JavaScript

Parameters:
SoObjectInitialize_f JS: new MyObject(....)
SoObjectGet_f JS: myObject.property
SoObjectPut_f JS: myObject.property = value
SoObjectCall_f JS: myObject.method()
SoObjectValueOf_f JS: myObject.valueOf()
SoObjectToString_f JS: myObject.toString()
SoObjectFinalize_f -- object is being destroyed -- (eg lib.unload for ExternalLibrary)

typedef ESerror_t(* SoObjectPut_f)(SoHObject hObject, SoCClientName *name, TaggedData *pValue)

typedef ESerror_t(* SoObjectToString_f)(SoHObject hObject, TaggedData *pResult)

typedef ESerror_t(* SoObjectValueOf_f)(SoHObject hObject, TaggedData *pResult)

typedef ESerror_t(* SoServerAddMethod_f)(SoHObject hObject, const char *name, int id, char *desc)

typedef ESerror_t(* SoServerAddProperty_f)(SoHObject hObject, const char *name, int id, char *desc)

typedef ESerror_t(* SoServerCallLiveObject_f)(SoHServer hServer, SoHObject hObject, char *method, int argc, TaggedData *argv, TaggedData *pResult)

typedef ESerror_t(* SoServerEval_f)(SoHObject hServer, char *string, TaggedData *pTaggedData)

typedef void(* SoServerFree_f)(SoHObject hObject, void *pMem)

typedef ESerror_t(* SoServerGetClass_f)(SoHObject hObject, char *name, int name_l)

typedef ESerror_t(* SoServerGetClientData_f)(SoHObject hObject, void **ppClientData)

typedef ESerror_t(* SoServerGetLiveObject_f)(SoHServer hServer, SoHObject hObject, char *method, TaggedData *pResult)

typedef ESerror_t(* SoServerGetServer_f)(SoHObject hObject, SoHServer *phServer,SoServerInterface_p *ppServerInterface)

typedef void*(* SoServerMalloc_f)(SoHServer hServer, size_t nBytes)

typedef ESerror_t(* SoServerPutLiveObject_f)(SoHServer hServer, SoHObject hObject, char *method, TaggedData *pValue)

typedef ESerror_t(* SoServerSetClientData_f)(SoHObject hObject, void *pClientData)

typedef ESerror_t(* SoServerTaggedDataFree_f)(SoHServer hServer, TaggedData *pTaggedData)

typedef ESerror_t(* SoServerTaggedDataInit_f)(SoHObject hServer, TaggedData *pTaggedData)


Enumeration Type Documentation

Enumerator:
kSoCClient_init 
kSoCClient_term 


Function Documentation

ESerror_t SoCClientInitialize ( SoCClient_f  ,
SoMemoryInterface_p   
)

SoCClientInitialize is used to initialize your library

Parameters:
SoCClient_f your client interface (objectInit, objectGet etc)
SoMemoryInterface_f your memory interface (malloc/free)

ESerror_t SoCClientTerminate ( SoCClient_f   ) 

SoCClientInitialize is used to terminate your library

Parameters:
SoCClient_f your client interface (objectInit, objectGet etc)

ESerror_t SoCClientTerminateAll (  ) 

SoCClientTerminateAll is used to close all client libraries

You MUST call this to terminate all ExternalObjects which created classes, before exiting the ExtendScript environment

Adobe Solutions NetworkCopyright© 2008 Adobe Systems Incorporated. All rights reserved.

Terms of Use  Online Privacy Policy  Adobe and accessibility  Avoid software piracy  Permissions and Trademarks