Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: DAMIMPOR.H
Link against: damodl.lib

This item is not part of the S60 3rd Edition SDK for Symbian OS, Feature Pack 2.

Class CDaFileImporter

class CDaFileImporter : public CDaIncremental;

Description

Base class for classes that import a file into a data application model.

Derivation

Members

Defined in CDaFileImporter:
CDaFileImporter(), CloseL(), DoNext(), EBeforeStartOfToken, EEndOfFile, EReadingToken, EStartOfFile, HandleCancel(), HandleLeave(), ImportL(), Next(), OpenL(), TState, iColumnBuffer, iFile, iFileSize, iFs, iLineBuffer, iParams, iRecNo, iRow, iState, iTotalBytesRead, ~CDaFileImporter()

Inherited from CBase:
Delete(), Extension_(), operator new()

Inherited from CDaIncremental:
DoCancel(), Initialize(), SetActiveIncremental(), SetObserver(), TerminationState(), iActiveIncremental, iObserver, iRemainingSteps, iTerminationState


Construction and destruction


CDaFileImporter()

IMPORT_C CDaFileImporter(TDaFileImportParams const &aParams);

Description

Constructor.

Parameters

TDaFileImportParams const &aParams

Import parameters


~CDaFileImporter()

IMPORT_C ~CDaFileImporter();

Description

Destructor.

[Top]


Member functions


OpenL()

IMPORT_C void OpenL();

Description

Opens the database to which to import.


CloseL()

virtual IMPORT_C void CloseL();

Description

Closes the database.


ImportL()

virtual IMPORT_C TInt ImportL();

Description

Begins the data importation.

This calls Next() until that function says that there are no remaining steps.

Return value

TInt

System wide error code


Next()

virtual IMPORT_C TInt Next(TInt &aRemainingSteps);

Description

Interface to performing an incremental step in data importation.

The default implementation simply calls DoNext().

Parameters

TInt &aRemainingSteps

On return, number of remaining steps

Return value

TInt

System wide error code


DoNext()

virtual IMPORT_C TInt DoNext(TInt &);

Description

Implements an incremental step in data importation.

The default implementation simply returns KErrGeneral.

Parameters

TInt &

Return value

TInt

System wide error code.


HandleLeave()

virtual IMPORT_C void HandleLeave(TInt aError);

Description

Utility function to handle a leave occurring in data importation.

It calls the object's active object cancel function.

Parameters

TInt aError

System wide error code


HandleCancel()

virtual IMPORT_C void HandleCancel();

Description

Utility function to handle a cancel event occurring in data importation.

It calls the object's active object cancel function.

[Top]


Member enumerations


Enum TState

protected: TState

Description

Import operation states.

EBeforeStartOfToken

Read position is before the start of an input field.

EReadingToken

Input field is being read.

EEndOfFile

End of import file.

EStartOfFile

Start of import file.

[Top]


Member data


iParams

protected: TDaFileImportParams iParams;

Description

Import parameters set on construction.


iFs

protected: RFs iFs;

Description

File server handle.


iFile

protected: RFileBuf iFile;

Description

Handle to import file.


iState

protected: TState iState;

Description

Import operation state.


iRow

protected: CDaRow * iRow;

Description

Row pointer.


iLineBuffer

protected: CBufFlat * iLineBuffer;

Description

Input line buffer.


iColumnBuffer

protected: CBufFlat * iColumnBuffer;

Description

Column import buffer.


iRecNo

protected: TInt iRecNo;

Description

Number of records imported.


iTotalBytesRead

protected: TInt iTotalBytesRead;

Description

Number of bytes imported.


iFileSize

protected: TInt iFileSize;

Description

Import file size.