CXdmEngine Class Reference

class CXdmEngine : public CActive

Inherits from

Public Member Functions
~CXdmEngine()
IMPORT_C voidCancelUpdate(CXdmDocument *)
IMPORT_C voidCancelUpdate(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 voidDeleteDirectoryModelL(const CXdmDirectory *)
IMPORT_C voidDeleteDocumentModelL(const CXdmDocument *)
IMPORT_C const RPointerArray< CXdmDirectory > &DirectoryCollection()
IMPORT_C const RPointerArray< CXdmDocument > &DocumentCollection()
IMPORT_C CXdmEngine *NewL(const CXdmProtocolInfo &)
IMPORT_C voidUpdateL(CXdmDocument *, TRequestStatus &)
IMPORT_C voidUpdateL(TRequestStatus &, CXdmDirectory *, TDirUpdatePhase)
voidWriteToLog(TRefByValue< const TDesC8 >, ...)
CXdmProtocol *XdmProtocol()
IMPORT_C CDesC16Array *XdmSettingsLC(RArray< TInt > &)
Private Member Functions
CXdmEngine()
voidConstructL(CXdmProtocolInfo &)
voidDoCancel()
voidRunL()
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
enumTXdmEngineState { 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 voidCancelUpdate(CXdmDocument *aDocument)

Cancel an update operation on a document

Parameters

CXdmDocument * aDocument

CancelUpdate(CXdmDirectory *)

IMPORT_C voidCancelUpdate(CXdmDirectory *aDirectory)

Cancel an update operation on a directory

Parameters

CXdmDirectory * aDirectory

ConstructL(CXdmProtocolInfo &)

voidConstructL(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 TXdmDocTypeaDocumentType
)

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 voidDeleteDirectoryModelL(const CXdmDirectory *aDocument)

Create a new document model

Parameters

const CXdmDirectory * aDocument

DeleteDocumentModelL(const CXdmDocument *)

IMPORT_C voidDeleteDocumentModelL(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()

voidDoCancel()[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()

voidRunL()[private, virtual]

From CActive.

UpdateL(CXdmDocument *, TRequestStatus &)

IMPORT_C voidUpdateL(CXdmDocument *aDocument,
TRequestStatus &aStatus
)

Update the changes to the specified document model

Parameters

CXdmDocument * aDocument
TRequestStatus & aStatus

UpdateL(TRequestStatus &, CXdmDirectory *, TDirUpdatePhase)

IMPORT_C voidUpdateL(TRequestStatus &aStatus,
CXdmDirectory *aDirectory,
TDirUpdatePhaseaUpdatePhase
)

Update the contents of the specified directory model

Parameters

TRequestStatus & aStatus
CXdmDirectory * aDirectory
TDirUpdatePhase aUpdatePhase

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

voidWriteToLog(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]