CXdmEngine Class Reference

class CXdmEngine : public CActive

Inherits from

Public Member Functions
~CXdmEngine ()
IMPORT_C void CancelUpdate ( CXdmDocument *)
IMPORT_C void CancelUpdate ( CXdmDirectory *)
HBufC8 * ConvertToUTF8L (const TDesC &)
IMPORT_C CXdmDirectory * CreateDirectoryModelL (const TDesC &)
IMPORT_C CXdmDocument * CreateDocumentModelL (const TDesC &, const TXdmDocType )
IMPORT_C CXdmDocumentNode * CreateDocumentNodeL ()
IMPORT_C void DeleteDirectoryModelL (const CXdmDirectory *)
IMPORT_C void DeleteDocumentModelL (const CXdmDocument *)
IMPORT_C const RPointerArray < CXdmDirectory > & DirectoryCollection ()
IMPORT_C const RPointerArray < CXdmDocument > & DocumentCollection ()
IMPORT_C CXdmEngine * NewL (const CXdmProtocolInfo &)
IMPORT_C void UpdateL ( CXdmDocument *, TRequestStatus &)
IMPORT_C void UpdateL ( TRequestStatus &, CXdmDirectory *, TDirUpdatePhase )
void WriteToLog ( TRefByValue < const TDesC8 >, ...)
CXdmProtocol * XdmProtocol ()
IMPORT_C CDesC16Array * XdmSettingsLC ( RArray < TInt > &)
Private Member Functions
CXdmEngine ()
void ConstructL ( CXdmProtocolInfo &)
void DoCancel ()
void RunL ()
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::RunError(TInt)
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Private Member Enumerations
enum TXdmEngineState { EXdmEngineIdle  = 0, EXdmEngineStartDocUpdate , EXdmEngineStartDirUpdate }
Inherited Enumerations
CActive:TPriority
Private Attributes
TRequestStatus * iClientStatus
CXdmDirectory * iCurrentDir
CXdmDocument * iCurrentDoc
RPointerArray < CXdmDirectory > iDirUpdateQueue
RPointerArray < CXdmDirectory > iDirectoryQueue
RPointerArray < CXdmDocument > iDocUpdateQueue
RPointerArray < CXdmDocument > iDocumentQueue
CXdmLogWriter * iLogWriter
CXdmProtocol * iXdmProtocol
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CXdmEngine()

CXdmEngine ( ) [private]

C++ default constructor is private

~CXdmEngine()

IMPORT_C ~CXdmEngine ( ) [virtual]

Destructor.

Member Functions Documentation

CancelUpdate(CXdmDocument *)

IMPORT_C void CancelUpdate ( CXdmDocument * aDocument )

Cancel an update operation on a document

Parameters

CXdmDocument * aDocument

CancelUpdate(CXdmDirectory *)

IMPORT_C void CancelUpdate ( CXdmDirectory * aDirectory )

Cancel an update operation on a directory

Parameters

CXdmDirectory * aDirectory

ConstructL(CXdmProtocolInfo &)

void ConstructL ( CXdmProtocolInfo & aProtocolInfo ) [private]

Symbian OS second-phase constructor

Parameters

CXdmProtocolInfo & aProtocolInfo

ConvertToUTF8L(const TDesC &)

HBufC8 * ConvertToUTF8L ( const TDesC & aUnicodeDesc ) [static]

Convert data from UNICODE to UTF-8

Parameters

const TDesC & aUnicodeDesc

CreateDirectoryModelL(const TDesC &)

IMPORT_C CXdmDirectory * CreateDirectoryModelL ( const TDesC & aDirectoryPath )

Create a new document model

Parameters

const TDesC & aDirectoryPath

CreateDocumentModelL(const TDesC &, const TXdmDocType)

IMPORT_C CXdmDocument * CreateDocumentModelL ( const TDesC & aDocumentName,
const TXdmDocType aDocumentType
)

Create a new document model

NOTE! It is important to keep in mind that the Xdm Engine DOES NOT maintain the documents created on this engine object. It is the responsibility of the client application to deallocate the documents it creates by calling CXdmEngine::DeleteDocumentModelL( model ). The engine does keep track of the documents that are constructed on it, but it does not own them in the sense which would suggest deallocation of the memory reserved for them.

Parameters

const TDesC & aDocumentName
const TXdmDocType aDocumentType

CreateDocumentNodeL()

IMPORT_C CXdmDocumentNode * CreateDocumentNodeL ( )

Create a new element.

The returning CXdmDocumentNode object does not yet belong to any document. Therefore it is the responsibility of the client application to deallocate the memory reserved for the element.

The new element can be "attached" to a document by using AppendToModelL() or ReplaceInModelL(). It is important to note that even after calling either of these methods, the ownership of the object does not change.

DeleteDirectoryModelL(const CXdmDirectory *)

IMPORT_C void DeleteDirectoryModelL ( const CXdmDirectory * aDocument )

Create a new document model

Parameters

const CXdmDirectory * aDocument

DeleteDocumentModelL(const CXdmDocument *)

IMPORT_C void DeleteDocumentModelL ( const CXdmDocument * aDocument )

Create a new document model

Parameters

const CXdmDocument * aDocument

DirectoryCollection()

IMPORT_C const RPointerArray < CXdmDirectory > & DirectoryCollection ( ) const

Get the list of directories created on this instance

DoCancel()

void DoCancel ( ) [private, virtual]

From CActive .

DocumentCollection()

IMPORT_C const RPointerArray < CXdmDocument > & DocumentCollection ( ) const

Get the list of documents created on this instance

NewL(const CXdmProtocolInfo &)

IMPORT_C CXdmEngine * NewL ( const CXdmProtocolInfo & aProtocolInfo ) [static]

Create an instance of the Engine object

Parameters

const CXdmProtocolInfo & aProtocolInfo

RunL()

void RunL ( ) [private, virtual]

From CActive .

UpdateL(CXdmDocument *, TRequestStatus &)

IMPORT_C void UpdateL ( CXdmDocument * aDocument,
TRequestStatus & aStatus
)

Update the changes to the specified document model

Parameters

CXdmDocument * aDocument
TRequestStatus & aStatus

UpdateL(TRequestStatus &, CXdmDirectory *, TDirUpdatePhase)

IMPORT_C void UpdateL ( TRequestStatus & aStatus,
CXdmDirectory * aDirectory,
TDirUpdatePhase aUpdatePhase
)

Update the contents of the specified directory model

Parameters

TRequestStatus & aStatus
CXdmDirectory * aDirectory
TDirUpdatePhase aUpdatePhase

WriteToLog(TRefByValue< const TDesC8 >, ...)

void WriteToLog ( TRefByValue < const TDesC8 > aFmt,
...
) const

Logging function

Parameters

TRefByValue < const TDesC8 > aFmt
...

XdmProtocol()

CXdmProtocol * XdmProtocol ( ) const

Return the protocol this engine uses

XdmSettingsLC(RArray< TInt > &)

IMPORT_C CDesC16Array * XdmSettingsLC ( RArray < TInt > & aSettingIds ) [static]

Fetch the IDs of the XDM Settings which have been configured to this device.

Parameters

RArray < TInt > & aSettingIds

Member Enumerations Documentation

Enum TXdmEngineState

Enumerators

EXdmEngineIdle = 0
EXdmEngineStartDocUpdate
EXdmEngineStartDirUpdate

Member Data Documentation

TRequestStatus * iClientStatus

TRequestStatus * iClientStatus [private]

CXdmDirectory * iCurrentDir

CXdmDirectory * iCurrentDir [private]

CXdmDocument * iCurrentDoc

CXdmDocument * iCurrentDoc [private]

RPointerArray< CXdmDirectory > iDirUpdateQueue

RPointerArray < CXdmDirectory > iDirUpdateQueue [private]

RPointerArray< CXdmDirectory > iDirectoryQueue

RPointerArray < CXdmDirectory > iDirectoryQueue [private]

RPointerArray< CXdmDocument > iDocUpdateQueue

RPointerArray < CXdmDocument > iDocUpdateQueue [private]

RPointerArray< CXdmDocument > iDocumentQueue

RPointerArray < CXdmDocument > iDocumentQueue [private]

CXdmLogWriter * iLogWriter

CXdmLogWriter * iLogWriter [private]

CXdmProtocol * iXdmProtocol

CXdmProtocol * iXdmProtocol [private]