CPresenceXDM Class Reference

class CPresenceXDM : public CActive

This class deals with the Presence rules as a whole and has communication with the server. Rules can be manipulated using this class, however the three childrens of rule namely condition, action and transform manipulation also requires their respective classes in conjunction with this class.

rlspresxdm.lib
Since
S60 3.2

Inherits from

Public Member Functions
~CPresenceXDM ()
IMPORT_C void CancelUpdateL ()
IMPORT_C TInt CreateNewRuleL ( TDes &)
IMPORT_C void DeleteAllRules ()
IMPORT_C void DeleteEmptyRulesL ()
IMPORT_C TInt DeleteRuleL (const TDesC &)
void DoCancel ()
IMPORT_C void GetAllRulesL ( CDesCArray &)
IMPORT_C TBool IsRuleExist (const TDesC &)
IMPORT_C CPresenceXDM * NewL (const TInt )
IMPORT_C CPresenceXDM * NewLC (const TInt )
TInt RunError ( TInt )
void RunL ()
IMPORT_C TInt UpdateAllFromServerL ( MRLSPresXDMAsyncHandler *const )
IMPORT_C TInt UpdateToServerL ( MRLSPresXDMAsyncHandler *const )
Protected Member Functions
void RemoveFromModelL ( CXdmDocumentNode *)
Private Member Functions
CPresenceXDM ()
void ConstructL (const TInt )
void CreateRootIfNeededL ()
CXdmDocumentNode * GetConditionChildNodeL (const TDesC &, const TDesC &, TBool )
CXdmDocumentNode * GetRuleChildNodeL (const TDesC &, const TDesC &, TBool )
void GetUniqueRuleId ( TDes &)
CXdmDocumentNode * IsRuleExistInt (const TDesC &)
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::Extension_(TUint,TAny *&,TAny *)
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
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()
Inherited Enumerations
CActive:TPriority
Private Attributes
MRLSPresXDMAsyncHandler * iAsyncHandler
TInt iAsyncReq
CXdmDocument * iPresDocument
CXdmEngine * iXDMEngine
CXdmProtocolInfo * iXDMProtocolInfo
Inherited Attributes
CActive::iStatus

Constructor & Destructor Documentation

CPresenceXDM()

CPresenceXDM ( ) [private]

C++ constructor

~CPresenceXDM()

~CPresenceXDM ( )

Destructor

Member Functions Documentation

CancelUpdateL()

IMPORT_C void CancelUpdateL ( )

Cancels document update to/from server if going on. This results in HandlePresUpdateCancelL on completion.

ConstructL(const TInt)

void ConstructL ( const TInt aSettingId ) [private]

Second phase constructor

Parameters

const TInt aSettingId

CreateNewRuleL(TDes &)

IMPORT_C TInt CreateNewRuleL ( TDes & aRuleId )

Add a new rule. If aRuleId contains a valid descriptor it is used as rule id for the new rule. If a NULL descriptor is provided instead, a random id is generated automatically and returned in aRuleId. The new rule is created without condition, action or transformation. Those elements can be created using their respective classes.

Parameters

TDes & aRuleId

CreateRootIfNeededL()

void CreateRootIfNeededL ( ) [private]

Creates the document root if needed

DeleteAllRules()

IMPORT_C void DeleteAllRules ( )

Delete all data by deleting all rules and their children

DeleteEmptyRulesL()

IMPORT_C void DeleteEmptyRulesL ( )

Deletes all rules which are empty

DeleteRuleL(const TDesC &)

IMPORT_C TInt DeleteRuleL ( const TDesC & aRuleId )

Delete Rule and associated coditions/actions/transforms

Parameters

const TDesC & aRuleId

DoCancel()

void DoCancel ( ) [virtual]

GetAllRulesL(CDesCArray &)

IMPORT_C void GetAllRulesL ( CDesCArray & aRuleIds )

Gets all rule IDs in an array

Parameters

CDesCArray & aRuleIds

GetConditionChildNodeL(const TDesC &, const TDesC &, TBool)

CXdmDocumentNode * GetConditionChildNodeL ( const TDesC & aRuleId,
const TDesC & aCondChild,
TBool aCreate
) [private]

Gets the conditions child node pointer in a rule. It is caller's responsiblity to provide a valid child name.

Parameters

const TDesC & aRuleId
const TDesC & aCondChild child node of condition
TBool aCreate

GetRuleChildNodeL(const TDesC &, const TDesC &, TBool)

CXdmDocumentNode * GetRuleChildNodeL ( const TDesC & aRuleId,
const TDesC & aRuleChild,
TBool aCreate
) [private]

Gets the condition, action or transform node. It is caller's responsiblity to provide a valid child name.

Parameters

const TDesC & aRuleId
const TDesC & aRuleChild child node of a rule
TBool aCreate

GetUniqueRuleId(TDes &)

void GetUniqueRuleId ( TDes & aRuleId ) [private]

Gets a unique rule id

Parameters

TDes & aRuleId

IsRuleExist(const TDesC &)

IMPORT_C TBool IsRuleExist ( const TDesC & aRuleId )

Finds if a Rule Exist

Parameters

const TDesC & aRuleId

IsRuleExistInt(const TDesC &)

CXdmDocumentNode * IsRuleExistInt ( const TDesC & aRuleId ) [private]

Finds if a Rule Exist, returns its pointer

Parameters

const TDesC & aRuleId

NewL(const TInt)

IMPORT_C CPresenceXDM * NewL ( const TInt aSettingId ) [static]

Parameters

const TInt aSettingId

NewLC(const TInt)

IMPORT_C CPresenceXDM * NewLC ( const TInt aSettingId ) [static]

Create CPresenceXDM , leaves pointer to stack

Parameters

const TInt aSettingId

RemoveFromModelL(CXdmDocumentNode *)

void RemoveFromModelL ( CXdmDocumentNode * aNode ) [protected]

Removes given node from document model

Parameters

CXdmDocumentNode * aNode

RunError(TInt)

TInt RunError ( TInt aError ) [virtual]

Parameters

TInt aError

RunL()

void RunL ( ) [virtual]

UpdateAllFromServerL(MRLSPresXDMAsyncHandler *const)

IMPORT_C TInt UpdateAllFromServerL ( MRLSPresXDMAsyncHandler *const aHandler )

Updates all information (document) from server. This results in HandlePresUpdateDocumentL on completion.

Parameters

MRLSPresXDMAsyncHandler *const aHandler

UpdateToServerL(MRLSPresXDMAsyncHandler *const)

IMPORT_C TInt UpdateToServerL ( MRLSPresXDMAsyncHandler *const aHandler )

Updates information (document) to server. This results in HandlePresUpdateDocumentL on completion.

Parameters

MRLSPresXDMAsyncHandler *const aHandler

Member Data Documentation

MRLSPresXDMAsyncHandler * iAsyncHandler

MRLSPresXDMAsyncHandler * iAsyncHandler [private]

TInt iAsyncReq

TInt iAsyncReq [private]

CXdmDocument * iPresDocument

CXdmDocument * iPresDocument [private]

CXdmEngine * iXDMEngine

CXdmEngine * iXDMEngine [private]

CXdmProtocolInfo * iXDMProtocolInfo

CXdmProtocolInfo * iXDMProtocolInfo [private]