AAFA Developer Support

Public Member Functions
IAAFRawStorage Interface Reference

This interface is used by the toolkit to access storage in which AAF files are to be read and written. More...

List of all members.

Public Member Functions

HRESULT IsReadable ([out] aafBoolean_t *pResult)
 Sets *pResult to true if this storage is readable; sets it to false otherwise.
HRESULT Read ([out, size_is(bufSize), length_is(*pNumRead)] aafMemPtr_t buf,[in] aafUInt32 bufSize,[out] aafUInt32 *pNumRead)
 Attempts to read bufsize bytes from this stream.
HRESULT IsWriteable ([out] aafBoolean_t *pResult)
 Sets *pResult to true if this storage is writeable; sets it to false otherwise.
HRESULT Write ([in, size_is(bufSize)] aafMemConstPtr_t buf,[in] aafUInt32 bufSize,[out] aafUInt32 *pNumWritten)
 Writes bufsize bytes into this stream.
HRESULT Synchronize ()
 Synchronizes any cached data with the underlying storage.

Detailed Description

This interface is used by the toolkit to access storage in which AAF files are to be read and written.

It is typically implemented by clients of IAAFFileXXX. Note that some implementations are provided as a convenience to IAAFFileXXX clients.

When writing to a stream, clients should be aware that the stream's capacity may be limited. To insure that writes will not fail due to insufficient stream capacity, clients can call SetSize() to pre-allocate capacity in the stream. Writes done within the size specified to the most recent successful SetSize() call are guaranteed to succeed.

Assumes that the storage has at least sequential access capability.

In addition to the specific error results listed for each method, all methods in this interface may also return one of the following values:

AAFRESULT_NOMEMORY

Definition at line 23555 of file AAF.idl.


Member Function Documentation

HRESULT IAAFRawStorage::IsReadable ( [out] aafBoolean_t *  pResult)

Sets *pResult to true if this storage is readable; sets it to false otherwise.

Succeeds if:

  • The pResult pointer is valid.

This method will return the following codes. If more than one of the listed errors is in effect, it will return the first one encountered in the order given below:

AAFRESULT_SUCCESS

  • succeeded. (This is the only code indicating success.)

AAFRESULT_NULL_PARAM

  • pResult arg is NULL.
Parameters:
pResult[out] set to true if readable
HRESULT IAAFRawStorage::IsWriteable ( [out] aafBoolean_t *  pResult)

Sets *pResult to true if this storage is writeable; sets it to false otherwise.

Succeeds if:

  • The pResult pointer is valid.

This method will return the following codes. If more than one of the listed errors is in effect, it will return the first one encountered in the order given below:

AAFRESULT_SUCCESS

  • succeeded. (This is the only code indicating success.)

AAFRESULT_NULL_PARAM

  • pResult arg is NULL.
Parameters:
pResult[out] set to true if writeable
HRESULT IAAFRawStorage::Read ( [out, size_is(bufSize), length_is(*pNumRead)] aafMemPtr_t  buf,
[in] aafUInt32  bufSize,
[out] aafUInt32 *  pNumRead 
)

Attempts to read bufsize bytes from this stream.

Places the data into buf, and puts the actual number of bytes read into pNumRead. If the end of the stream is encountered before bufSize bytes can be read, the value written into *pNumRead may be smaller than bufSize.

This call will advance the current position by *pNumRead bytes.

Succeeds if:

  • The pNumBytes pointer is valid.
  • This stream is open for read or read/write.

This method will return the following codes. If more than one of the listed errors is in effect, it will return the first one encountered in the order given below:

AAFRESULT_SUCCESS

  • succeeded. (This is the only code indicating success.)

AAFRESULT_NULL_PARAM

  • buf or pNumRead arg is NULL.

AAFRESULT_NOT_READABLE

  • This stream is not open for read or read/write.
Parameters:
buf[out, size_is(bufSize), length_is(*pNumRead)] Buffer into which data is read
bufSize[in] Size of buf in bytes
pNumRead[out] Number of bytes read
HRESULT IAAFRawStorage::Synchronize ( )

Synchronizes any cached data with the underlying storage.

This method will return the following codes. If more than one of the listed errors is in effect, it will return the first one encountered in the order given below:

AAFRESULT_SUCCESS

  • succeeded. (This is the only code indicating success.)
HRESULT IAAFRawStorage::Write ( [in, size_is(bufSize)] aafMemConstPtr_t  buf,
[in] aafUInt32  bufSize,
[out] aafUInt32 *  pNumWritten 
)

Writes bufsize bytes into this stream.

Obtains the data from buf.

This call may fail if the stream has insufficient capacity to complete the request. If this storage supports the IAAFRandomRawStorage interface, the client can call IAAFRandomRawStorage::SetSize() to attempt to reserve capacity in the stream; if the SetSize() call succeeds, subsequent Write() calls within that capacity are guaranteed to succeed.

This call will advance the current position by bufSize bytes.

Succeeds if:

  • This stream is open for write or read/write.
  • Sufficient capacity exists in this stream to perform the write.

This method will return the following codes. If more than one of the listed errors is in effect, it will return the first one encountered in the order given below:

AAFRESULT_SUCCESS

  • succeeded. (This is the only code indicating success.)

AAFRESULT_NOT_WRITEABLE

  • This stream is not open for write or read/write.

AAFRESULT_SMALLBUF

  • This stream has insufficient capacity to perform the write.
Parameters:
buf[in, size_is(bufSize)] Buffer from which data is written
bufSize[in] Number of bytes to write
pNumWritten[out] Number of bytes written

Generated on Wed Jul 4 2012 22:13:30 for AAF COM API by doxygen 1.7.4