#include <FmsFileAdaptor.h>
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 () |
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. | anonymous enum |
| virtual IFmsFileResponse::~IFmsFileResponse | ( | ) | [virtual] |
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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.
| 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. |