InDesign SDK  20.5
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
IBlackBoxCommands Class Referenceabstract

#include <IBlackBoxCommands.h>

Inheritance diagram for IBlackBoxCommands:
IPMUnknown

Public Types

enum  { kDefaultIID = IID_IBLACKBOXCOMMANDS }
 

Public Member Functions

virtual ErrorCode AddData (const UIDRef &obj, BlackBoxKey key, void *buffer, int32 length)=0
 
virtual ErrorCode AddData (const XMLReference &obj, BlackBoxKey key, void *buffer, int32 length)=0
 
virtual ErrorCode RemoveData (const UIDRef &obj, BlackBoxKey key)=0
 
virtual ErrorCode RemoveData (const XMLReference &obj, BlackBoxKey key)=0
 
virtual int32 GetData (const UIDRef &obj, BlackBoxKey key, void *buffer, int32 amountToRead)=0
 
virtual int32 GetData (const XMLReference &obj, BlackBoxKey key, void *buffer, int32 amountToRead)=0
 
- Public Member Functions inherited from IPMUnknown
virtual IPMUnknownQueryInterface (PMIID interfaceID) const =0
 
virtual void AddRef () const =0
 
virtual void Release () const =0
 

Detailed Description

This is an interface to a container for generic data. Use this interface if you want to attach data to an InDesign document, but you want complete control and responsibility over how the data is managed.

Member Function Documentation

virtual ErrorCode IBlackBoxCommands::AddData (const UIDRefobj,
BlackBoxKey key,
void * buffer,
int32 length 
)
pure virtual

Processes a command to add data to a UID-based object's black box.

Parameters
objspecify which object gets the data
keywhat key the data will be stored under for later refetch
bufferbuffer containing the data to write
lengthnumber of bytes to write
Returns
ErrorCode kSuccess or failure code if operation is unsuccessful
virtual ErrorCode IBlackBoxCommands::AddData (const XMLReferenceobj,
BlackBoxKey key,
void * buffer,
int32 length 
)
pure virtual

Processes a command to add data to an XML element's black box.

Parameters
objspecify which object gets the data
keywhat key the data will be stored under for later refetch
bufferbuffer containing the data to write
lengthnumber of bytes to write
Returns
ErrorCode kSuccess or failure code if operation is unsuccessful
virtual int32 IBlackBoxCommands::GetData (const UIDRefobj,
BlackBoxKey key,
void * buffer,
int32 amountToRead 
)
pure virtual
Processes a command to retrieve data from the UID-based object's black box.

Parameters
objspecify which object to get
keywhat key the data was be stored under originally
bufferOUT buffer where the data will be put
amountToReadmaximum amount to read
Returns
int32 number of bytes in output buffer
virtual int32 IBlackBoxCommands::GetData (const XMLReferenceobj,
BlackBoxKey key,
void * buffer,
int32 amountToRead 
)
pure virtual
Processes a command to retrieve data from the XML element's black box.

Parameters
objspecify which object to get
keywhat key the data was be stored under originally
bufferOUT buffer where the data will be put
amountToReadmaximum amount to read
Returns
int32 number of bytes in output buffer
virtual ErrorCode IBlackBoxCommands::RemoveData (const UIDRefobj,
BlackBoxKey key 
)
pure virtual

Processes a command to remove data from the UID-based object's black box.

Parameters
objspecify which object to remove from
keywhat key the data was be stored under originally
Returns
ErrorCode kSuccess or failure code if operation is unsuccessful
virtual ErrorCode IBlackBoxCommands::RemoveData (const XMLReferenceobj,
BlackBoxKey key 
)
pure virtual

Processes a command to remove data from an XML element's black box.

Parameters
objspecify which object to remove from
keywhat key the data was be stored under originally
Returns
ErrorCode kSuccess or failure code if operation is unsuccessful