This interface is used by the toolkit to access storage in which AAF files are to be read and written. More...
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. |
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
HRESULT IAAFRawStorage::IsReadable | ( | [out] aafBoolean_t * | pResult | ) |
Sets *pResult to true if this storage is readable; sets it to false otherwise.
Succeeds if:
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
AAFRESULT_NULL_PARAM
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:
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
AAFRESULT_NULL_PARAM
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:
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
AAFRESULT_NULL_PARAM
AAFRESULT_NOT_READABLE
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
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 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
AAFRESULT_NOT_WRITEABLE
AAFRESULT_SMALLBUF
buf | [in, size_is(bufSize)] Buffer from which data is written |
bufSize | [in] Number of bytes to write |
pNumWritten | [out] Number of bytes written |