AAFA Developer Support

Public Member Functions
IAAFFile Interface Reference

This interface is used with an object representing an AAF file. More...

List of all members.

Public Member Functions

HRESULT Open ()
 Associates this IAAFFile-supporting object with the storage to which it is to be associated.
HRESULT SaveCopyAs ([in] IAAFFile *pDestFile)
 Copies the contents of this file to *pDestFile.
HRESULT GetHeader ([out, retval] IAAFHeader **ppHeader)
 Returns the IAAFHeader-supporting object associated with this file.
HRESULT GetRevision ([out, retval] aafFileRev_t *pRev)
 Get the revision of the current AAF file, and returns it in pRev.
HRESULT Save ()
 If this IAAFFile-supporting object is open, all unsaved changes made to the contents of this object are saved.
HRESULT Close ()
 Dissociates this IAAFFile-supporting object from its currently-associated storage.
HRESULT GetDictionary ([out, retval] IAAFDictionary **ppDictionary)
 Places the dictionary that contains all types of aaf definition objects into the *ppDictionary argument.

Detailed Description

This interface is used with an object representing an AAF file.

Any filesystem file can be opened for reading by multiple IAAFFile-supporting objects.

It is not recommended to Close an IAAFFile-implementing object which contains objects to which outstanding references are held in client code. Nevertheless, even if that is done, the Close() method will succeed and all referenced objects will be put into a Detached state in which may cause any methods on such objects to fail with the error status of AAFRESULT_NOT_IN_FILE.

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 9457 of file AAF.idl.


Member Function Documentation

HRESULT IAAFFile::Close ( )

Dissociates this IAAFFile-supporting object from its currently-associated storage.

Any AAF objects which were contained within this object will then no longer be available to the client.

If the client is maintaining any references to any objects which are contained in this object, those objects will be marked as dissociated, and methods on them will fail.

Any unsaved changes will be written to the file before the Close operation is complete.

This method will succeed only if all of the following are true:

  • This object is currently open.

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_OPEN

  • This object is not already open.
HRESULT IAAFFile::GetDictionary ( [out, retval] IAAFDictionary **  ppDictionary)

Places the dictionary that contains all types of aaf definition objects into the *ppDictionary argument.

The returned dictionary is AddRef()ed before it is returned. Note that the dictionary is automatically created when the header object is created.

Succeeds if all of the following are true:

  • the ppDictionary pointer is valid.

If this method fails no state will be changed.

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

  • ppDictionary is null.
Parameters:
ppDictionary[out, retval] The AAF Dictionary
HRESULT IAAFFile::GetHeader ( [out, retval] IAAFHeader **  ppHeader)

Returns the IAAFHeader-supporting object associated with this file.

If this object has never been associated with a file, a new empty IAAFHeader-supporting object will be created and returned. The returned header is AddRef()ed before it is returned. Note that the header is automatically created when the file object is created.

Succeeds if:

  • This object has already been Initialize()d.
  • This file object is open.
  • the given header pointer is valid.
  • this object contains a header.

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_INITIALIZED

  • This object has not yet had Initialize() called on it.

AAFRESULT_NOT_OPEN

  • This object is not open.

AAFRESULT_NULL_PARAM

  • the header pointer arg is NULL.

AAFRESULT_NO_HEADER

  • this object contains no header.
Parameters:
ppHeader[out, retval] Set to header of the current file
HRESULT IAAFFile::GetRevision ( [out, retval] aafFileRev_t *  pRev)

Get the revision of the current AAF file, and returns it in pRev.

Succeeds if:

  • This object has already been Initialize()d.
  • the given revision 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_NOT_INITIALIZED

  • This object has not yet had Initialize() called on it.

AAFRESULT_NULL_PARAM

  • the revision pointer arg is NULL.

AAFRESULT_NOT_OPEN

  • This object is not open.
Parameters:
pRev[out, retval] Revision of the current file
HRESULT IAAFFile::Open ( )

Associates this IAAFFile-supporting object with the storage to which it is to be associated.

It will then be possible to access objects within this file.

This method will succeed only if all of the following are true:

  • This object has not already been opened.

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_ALREADY_OPEN

  • This object has already been Open()ed.
HRESULT IAAFFile::Save ( )

If this IAAFFile-supporting object is open, all unsaved changes made to the contents of this object are saved.

This method will succeed only if all of the following are true:

  • This object is currently open.
  • Sufficient space remains in the storage for the data to be written.

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_OPEN

  • This object is not open.

AAFRESULT_WRONG_OPENMODE

  • This object is not open for writing or modification.

AAFRESULT_INSUFFICIENT_SPACE

  • There is insufficient space in the storage to save the contents of this object.
HRESULT IAAFFile::SaveCopyAs ( [in] IAAFFile pDestFile)

Copies the contents of this file to *pDestFile.

Requires that pDestFile be open, writeable or modifiable, and not yet contain any objects.

NOTE! Stub only. Implementation not yet added.

Succeeds if:

  • This object is currently open.
  • The named filesystem file is writable.

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_OPEN

  • This object is not open.

AAFRESULT_NOT_WRITEABLE

  • The named file cannot be written.
Parameters:
pDestFile[in] File to recieve contents

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