AAFA Developer Support

Public Member Functions
IAAFRandomRawStorage 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 ReadAt ([in] aafUInt64 position,[out, size_is(bufSize), length_is(*pNumRead)] aafMemPtr_t buf,[in] aafUInt32 bufSize,[out] aafUInt32 *pNumRead)
 Attempts to read bufsize bytes from this storage.
HRESULT WriteAt ([in] aafUInt64 position,[in, size_is(bufSize)] aafMemConstPtr_t buf,[in] aafUInt32 bufSize,[out] aafUInt32 *pNumWritten)
 Writes bufsize bytes into this storage.
HRESULT GetSize ([out] aafUInt64 *pSize)
 Returns the highest byte position in this storage which has been written so far.
HRESULT IsExtendable ([out] aafBoolean_t *pResult)
 Sets *pResult to true if the memory allocated to this storage can be dynamically extened; sets it to false otherwise.
HRESULT GetExtent ([out] aafUInt64 *pExtent)
 Returns the number of bytes currently allocated storage.
HRESULT SetExtent ([in] aafUInt64 extent)
 Requests the given capacity for this 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.

Assumes that the storage has at least random 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

IAAFRawStorage

Definition at line 23319 of file AAF.idl.


Member Function Documentation

HRESULT IAAFRandomRawStorage::GetExtent ( [out] aafUInt64 *  pExtent)

Returns the number of bytes currently allocated storage.

Succeeds if:

  • The pSize 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

  • pExtent arg is NULL.
Parameters:
pExtent[out] Number of bytes currently allocated for this storage
HRESULT IAAFRandomRawStorage::GetSize ( [out] aafUInt64 *  pSize)

Returns the highest byte position in this storage which has been written so far.

Succeeds if:

  • The pSize 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

  • pSize arg is NULL.
Parameters:
pSize[out] Number of bytes currently in this storage
HRESULT IAAFRandomRawStorage::IsExtendable ( [out] aafBoolean_t *  pResult)

Sets *pResult to true if the memory allocated to this storage can be dynamically extened; 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 extendable
HRESULT IAAFRandomRawStorage::ReadAt ( [in] aafUInt64  position,
[out, size_is(bufSize), length_is(*pNumRead)] aafMemPtr_t  buf,
[in] aafUInt32  bufSize,
[out] aafUInt32 *  pNumRead 
)

Attempts to read bufsize bytes from this storage.

Places the data into buf, and puts the actual number of bytes read into pNumRead. If the end of the storage 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 pNumRead pointer is valid.
  • This storage 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 storage is not open for read or read/write.
Parameters:
position[in] position in this storage from which data is read
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 IAAFRandomRawStorage::SetExtent ( [in] aafUInt64  extent)

Requests the given capacity for this storage.

If successful, subsequent calls to WriteAt() and IAAFRawStorage::Write() within that capacity are guaranteed to succeed.

Succeeds if:

  • It is permissible to set the extent of this 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.)

AAFRESULT_OFFSET_SIZE

  • This storage has insufficient capacity to perform the write.
Parameters:
extent[in] Number of bytes capacity requested for this storage
HRESULT IAAFRandomRawStorage::WriteAt ( [in] aafUInt64  position,
[in, size_is(bufSize)] aafMemConstPtr_t  buf,
[in] aafUInt32  bufSize,
[out] aafUInt32 *  pNumWritten 
)

Writes bufsize bytes into this storage.

Obtains the data from buf.

This call may fail if the capacity of this storage cannot be extended sufficiently to complete the request. The client can call SetSize() to attempt to reserve capacity for the storage; if the SetSize() call succeeds, subsequent Write() calls within requested that capacty are guaranteed to succeed.

This call will advance the current position by bufSize bytes.

Succeeds if:

  • The pNumWritten pointer is valid.
  • This storage is open for write or read/write.
  • Sufficient capacity exists in this storage 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_NULL_PARAM

  • pNumWritten arg is NULL.

AAFRESULT_NOT_WRITEABLE

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

AAFRESULT_OFFSET_SIZE

  • It is not possible to extend the allocated size of this storage.
Parameters:
position[in] position in this storage into which data is written
buf[in, size_is(bufSize)] Buffer from which data is written
bufSize[in] Number of bytes
pNumWritten[out] Number of bytes written

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