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 voidCancelUpdateL()
IMPORT_C TIntCreateNewRuleL(TDes &)
IMPORT_C voidDeleteAllRules()
IMPORT_C voidDeleteEmptyRulesL()
IMPORT_C TIntDeleteRuleL(const TDesC &)
voidDoCancel()
IMPORT_C voidGetAllRulesL(CDesCArray &)
IMPORT_C TBoolIsRuleExist(const TDesC &)
IMPORT_C CPresenceXDM *NewL(const TInt)
IMPORT_C CPresenceXDM *NewLC(const TInt)
TInt RunError(TInt)
voidRunL()
IMPORT_C TIntUpdateAllFromServerL(MRLSPresXDMAsyncHandler *const )
IMPORT_C TIntUpdateToServerL(MRLSPresXDMAsyncHandler *const )
Protected Member Functions
voidRemoveFromModelL(CXdmDocumentNode *)
Private Member Functions
CPresenceXDM()
voidConstructL(const TInt)
voidCreateRootIfNeededL()
CXdmDocumentNode *GetConditionChildNodeL(const TDesC &, const TDesC &, TBool)
CXdmDocumentNode *GetRuleChildNodeL(const TDesC &, const TDesC &, TBool)
voidGetUniqueRuleId(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 voidCancelUpdateL()

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

ConstructL(const TInt)

voidConstructL(const TIntaSettingId)[private]

Second phase constructor

Parameters

const TInt aSettingId

CreateNewRuleL(TDes &)

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

voidCreateRootIfNeededL()[private]

Creates the document root if needed

DeleteAllRules()

IMPORT_C voidDeleteAllRules()

Delete all data by deleting all rules and their children

DeleteEmptyRulesL()

IMPORT_C voidDeleteEmptyRulesL()

Deletes all rules which are empty

DeleteRuleL(const TDesC &)

IMPORT_C TIntDeleteRuleL(const TDesC &aRuleId)

Delete Rule and associated coditions/actions/transforms

Parameters

const TDesC & aRuleId

DoCancel()

voidDoCancel()[virtual]

From CActive

GetAllRulesL(CDesCArray &)

IMPORT_C voidGetAllRulesL(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,
TBoolaCreate
)[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 & aCondChildchild node of condition
TBool aCreate

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

CXdmDocumentNode *GetRuleChildNodeL(const TDesC &aRuleId,
const TDesC &aRuleChild,
TBoolaCreate
)[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 & aRuleChildchild node of a rule
TBool aCreate

GetUniqueRuleId(TDes &)

voidGetUniqueRuleId(TDes &aRuleId)[private]

Gets a unique rule id

Parameters

TDes & aRuleId

IsRuleExist(const TDesC &)

IMPORT_C TBoolIsRuleExist(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 TIntaSettingId)[static]

Create CPresenceXDM

Parameters

const TInt aSettingId

NewLC(const TInt)

IMPORT_C CPresenceXDM *NewLC(const TIntaSettingId)[static]

Create CPresenceXDM, leaves pointer to stack

Parameters

const TInt aSettingId

RemoveFromModelL(CXdmDocumentNode *)

voidRemoveFromModelL(CXdmDocumentNode *aNode)[protected]

Removes given node from document model

Parameters

CXdmDocumentNode * aNode

RunError(TInt)

TInt RunError(TIntaError)[virtual]

From CActive

Parameters

TInt aError

RunL()

voidRunL()[virtual]

From CActive

UpdateAllFromServerL(MRLSPresXDMAsyncHandler *const)

IMPORT_C TIntUpdateAllFromServerL(MRLSPresXDMAsyncHandler *const aHandler)

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

Parameters

MRLSPresXDMAsyncHandler *const aHandler

UpdateToServerL(MRLSPresXDMAsyncHandler *const)

IMPORT_C TIntUpdateToServerL(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]