IFmsFileResponse Class Reference
[File plug-in]

The response interface provided to the File plug-in. More...

#include <FmsFileAdaptor.h>

List of all members.

Public Types

enum  { kSystemErrors = 0x0000ffff, kVendorError = 0xffff0000, kUnimplemented = 1, kInvalidHandle = 2 }

Public Member Functions

virtual void onOpen (U32 uStatus, int iHandle, FmsFileAttribute *pAttrs, int nAttrs, void *pCtx)=0
virtual void onGetAttributes (U32 uStatus, FmsFileAttribute *pAttrValues, int nAttrs, void *pCtx)=0
virtual void onRead (U32 uStatus, void *pBuffer, int nBytes, void *pCtx)=0
virtual void onWrite (U32 uStatus, int nBytes, void *pCtx)=0
virtual void onClose (U32 uStatus, void *pCtx)=0
virtual void onRemove (U32 uStatus, void *pCtx)=0
virtual void onCreateDir (U32 uStatus, void *pCtx)=0
virtual ~IFmsFileResponse ()


Detailed Description

The interface to a response object provided to the File plug-in. The plug-in calls back methods on the response object to report completion of previously initiated asynchronous operations. Attributes are reported back in either the onOpen() or onGetAttributes() callback functions. If the attribute value is a pointer quantity, a null-terminated string, or a buffer, the server makes a copy. Since the plug-in need not guarantee the validity beyond the onOpen() or onGetAttributes() callbacks, it can delete the pointers at the end of the call or even use temporary copies. For example, if the plug-in needs to report, the value may be an int, long.

Member Enumeration Documentation

anonymous enum

Enumerator:
kSystemErrors  Mask to extract system error.
kVendorError  Mask to extract vendor error.
kUnimplemented  Unimplemented API call.
kInvalidHandle  Invalid handle.


Constructor & Destructor Documentation

virtual IFmsFileResponse::~IFmsFileResponse (  )  [virtual]


Member Function Documentation

virtual void IFmsFileResponse::onOpen ( U32  uStatus,
int  iHandle,
FmsFileAttribute pAttrs,
int  nAttrs,
void *  pCtx 
) [pure virtual]

Plug-in callback to report the completion of an asynchronous file open request.

Parameters:
uStatus 0 on success. Otherwise, the error code reported has two parts: the lower 16 bits consist of the generic system errors, and the upper 16 bits consist of a plug-in specific code.
iHandle A handle to an open file on success; must be ignored otherwise.
pAttrs An array of attribute values corresponding to those requested in the open() call.
nAttrs The number of elements in the pAttrs array.
pCtx The opaque context that was passed into the asynchronous operation.

virtual void IFmsFileResponse::onGetAttributes ( U32  uStatus,
FmsFileAttribute pAttrValues,
int  nAttrs,
void *  pCtx 
) [pure virtual]

Plug-in callback to report the completion of an asynchronous getAttributes() request.

Parameters:
uStatus 0 on success. Otherwise, the error code reported has two parts: the lower 16 bits consist of the generic system errors, and the upper 16 bits consist of a plug-in specific code.
pAttrValues An array of attribute values corresponding to those requested in the open() call.
nAttrs The number of elements in the pAttrs array.
pCtx The opaque context that was passed into the asynchronous operation.

virtual void IFmsFileResponse::onRead ( U32  uStatus,
void *  pBuffer,
int  nBytes,
void *  pCtx 
) [pure virtual]

Plug-in callback to report the completion of an asynchronous getAttributes() request.

Note: Do not call onRead() if a call to read() returns -1.

Parameters:
uStatus 0 on success. Otherwise, the error code reported has two parts: the lower 16 bits consist of the generic system errors, and the upper 16 bits consist of a plug-in specific code.
pBuffer The buffer that was provided for the asynchronous read operation.
nBytes The number of bytes that were successfully read into the buffer.
pCtx The opaque context that was passed into the asynchronous operation.

virtual void IFmsFileResponse::onWrite ( U32  uStatus,
int  nBytes,
void *  pCtx 
) [pure virtual]

Plug-in callback to report the completion of an asynchronous getAttributes() request.

Parameters:
uStatus 0 on success. Otherwise, the error code reported has two parts: the lower 16 bits consist of the generic system errors, and the upper 16 bits consist of a plug-in specific code.
nBytes The number of bytes that were successfully written out from the buffer.
pCtx The opaque context that was passed into the asynchronous operation.

virtual void IFmsFileResponse::onClose ( U32  uStatus,
void *  pCtx 
) [pure virtual]

Plug-in callback to report the completion of an asynchronous getAttributes() request.

Parameters:
uStatus 0 on success. Otherwise, the error code reported has two parts: the lower 16 bits consist of the generic system errors, and the upper 16 bits consist of a plug-in specific code.
pCtx The opaque context that was passed into the asynchronous operation.

virtual void IFmsFileResponse::onRemove ( U32  uStatus,
void *  pCtx 
) [pure virtual]

Plug-in callback to report the completion of an asynchronous getAttributes() request.

Parameters:
uStatus 0 on success. Otherwise, the error code reported has two parts: the lower 16 bits consist of the generic system errors, and the upper 16 bits consist of a plug-in specific code.
pCtx The opaque context that was passed into the asynchronous operation.

virtual void IFmsFileResponse::onCreateDir ( U32  uStatus,
void *  pCtx 
) [pure virtual]

Plug-in callback to report the completion of an asynchronous getAttributes() request.

Parameters:
uStatus 0 on success. Otherwise, the error code reported has two parts: the lower 16 bits consist of the generic system errors, and the upper 16 bits consist of a plug-in specific code.
pCtx The opaque context that was passed into the asynchronous operation.


The documentation for this class was generated from the following file: FMS Adaptors Footer

 

©2007 Adobe Systems Incorporated.  All Rights Reserved.