This interface is implemented by the toolkit, and is provided to clients of IAAFFile to allow them to supply the raw bits of a file before open. More...
Public Member Functions | |
HRESULT | WriteAt ([in, size_is(bufSize)] aafMemPtr_t buf,[in] aafUInt32 bufSize,[in] aafUInt64 position) |
Writes bufsize bytes into this file at the given byte offset. | |
HRESULT | SetSize ([in] aafUInt64 size) |
Attempts to reserve size bytes of storage. |
This interface is implemented by the toolkit, and is provided to clients of IAAFFile to allow them to supply the raw bits of a file before open.
Note that this and the IAAFGetFileBits interfaces are different than the IAAFRawStorage interfaces in that those are implemented by clients to provide access to the desired media; these are provided by the toolkit to provide read OR write (but not both simultaneously) access to the raw bits.
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 IAAFSetFileBits::SetSize | ( | [in] aafUInt64 | size | ) |
Attempts to reserve size bytes of storage.
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_DATA_SIZE
size | [in] The requested file size |
HRESULT IAAFSetFileBits::WriteAt | ( | [in, size_is(bufSize)] aafMemPtr_t | buf, |
[in] aafUInt32 | bufSize, | ||
[in] aafUInt64 | position | ||
) |
Writes bufsize bytes into this file at the given byte offset.
Obtains the data from buf. A value of zero for position indicates the beginning of the stream.
Succeeds if sufficient space is available in the file to write the given number of bytes at the given position. It's possible to guarantee that this method will succeed if SetSize() is first called to reserve the required space. If SetSize() is not first called to reserve the space, this method will attempt to request it, but this attempt may fail.
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_DATA_SIZE
buf | [in, size_is(bufSize)] Buffer from which data is written |
bufSize | [in] Number of bytes |
position | [in] The position in bytes at which to read |