CWriteFaxFile Class Reference

class CWriteFaxFile : public CBase

Creates and open a fax file for writing.

The class provides the functionality to create a fax file, to commit pages to the fax file, to abort and delete the file, and to close the file. The ability to add individual fax pages to the store is provided through the CWriteFaxPages data member, which is created when the file is opened.

In pre-v5.1 releases of Symbian OS, the import library was faxst2.lib.

Inherits from

Constructor & Destructor Documentation

CWriteFaxFile()

CWriteFaxFile()[protected]

~CWriteFaxFile()

IMPORT_C~CWriteFaxFile()

Destructor.

Closes the session with the file server, and frees all resources owned by the object, prior to its destruction.

Member Functions Documentation

AbortWrite()

IMPORT_C voidAbortWrite()

Aborts the creation of the fax store file, and then deletes the file.

It can be called by developer programs, and is called automatically if OpenL() leaves.
capability
None

Close()

IMPORT_C voidClose()

Closes the fax file, and deletes the resources owned by the object.

Although this function is called in the destructor, it is good programming practice to invoke it manually to pair previous OpenL() calls.
capability
None

CommitL()

IMPORT_C voidCommitL()

Commits the current fax page created using the CWriteFaxPages API to the fax file.

Committing a page writes it to the fax file, rather than storing it in temporary memory. The function should be called after each page is added, to ensure that only one fax page can be lost if there is an out of memory error.
capability
None

ConstructL()

voidConstructL()[protected]

DoOpenL(TInt)

voidDoOpenL(TIntaMaxScanLinesInBand)[protected]

Parameters

TInt aMaxScanLinesInBand

NewL()

IMPORT_C CWriteFaxFile *NewL()[static]

Constructs a CWriteFaxFile object, which offers the public API for creating a fax store file.

As part of the construction process, the object opens a session with the file server.

capability
None

OpenL(const TDesC &, TInt)

IMPORT_C voidOpenL(const TDesC &aFileName,
TIntaMaxScanLinesInBand
)

Creates and opens a fax file for writing.

The function also allocates memory to create a CWriteFaxPages object which is pointed to by the class data member. This object defines the API for writing pages to the file store.

Fax files which have been opened should be paired with a Close() function.

capability
None

Parameters

const TDesC & aFileNameThe name of the new fax file.
TInt aMaxScanLinesInBandThe maximum number of scan lines in a band. Fax pages are stored in bands for quick retrieval/display. If zero is passed then it will default to 64 otherwise the passed value will take effect.

Member Data Documentation

TFileName iFileName

TFileName iFileName[private]

CDirectFileStore * iFileStore

CDirectFileStore *iFileStore[private]

RFs iFs

RFs iFs[private]

CWriteFaxPages * iWriteFaxPages

CWriteFaxPages *iWriteFaxPages

A pointer to the object which can be used to add pages to the file. Memory is allocated for the object when the file is opened.