TPresenceTransformXDM Class Reference

class TPresenceTransformXDM

This class should be used in conjunction with an already created CPresenceXDM. The CPresenceXDM deals with the Presence rules as a whole and has communication with the server. TPresenceTransformXDM is used to manipulate the Transformation part of a rule. Remember to call Init function after constructing this object.

Here the Presence transforms are classified into three categories according to their xml data types. These three categories are: complex transforms types, boolean transform types and other transform types. Refer to RLSPresXDMConsts.h to find transforms and their categories. Constants from rlspresxdmconsts.h may be used for transform names.

rlspresxdm.lib
Since
S60 3.2
Public Member Functions
TPresenceTransformXDM()
IMPORT_C TIntAddOrRepProvideAllTransComplexL(const TDesC &, const TDesC &)
IMPORT_C TIntAddOrRepTransKnownBoolL(const TDesC &, const TDesC &, TBool)
IMPORT_C TIntAddOrRepTransUnknownBoolL(const TDesC &, const TDesC &, TBool)
IMPORT_C TIntAddTransComplexL(const TDesC &, const TDesC &, const RArray< TTransDataCompo > &)
IMPORT_C TIntGetTransComplexL(const TDesC &, const TDesC &, RArray< TTransDataCompo > &)
IMPORT_C TIntGetTransKnownBoolL(const TDesC &, const TDesC &, TBool &)
IMPORT_C TIntGetTransUnknownBoolL(const TDesC &, const TDesC &, TBool &)
IMPORT_C voidInit(CPresenceXDM *const )
IMPORT_C TBoolIsTransformExistL(const TDesC &, const TDesC &)
IMPORT_C TIntRemoveTransformL(const TDesC &, const TDesC &)
Private Member Functions
TInt AddOrRepTransBoolL(const TDesC &, const TDesC &, TBool)
TBool AreNodeNamesValid(const TDesC &, const RArray< TTransDataCompo > &)
TInt GetTransBoolL(const TDesC &, const TDesC &, TBool &)
CXdmDocumentNode *GetTransformChildNodeL(const TDesC &, const TDesC &, TBool)
TBool IsBoolChildSupported(const TDesC &)
TBool IsProvideAllExistL(const TDesC &, const TDesC &)
Private Attributes
CPresenceXDM *iPresXDM

Constructor & Destructor Documentation

TPresenceTransformXDM()

IMPORT_CTPresenceTransformXDM()

C++ Constructor, After contructing Init must be called before using this object.

Member Functions Documentation

AddOrRepProvideAllTransComplexL(const TDesC &, const TDesC &)

IMPORT_C TIntAddOrRepProvideAllTransComplexL(const TDesC &aRuleID,
const TDesC &aComplexChild
)

Adds or replace transform's complex child provide-all element to a rule

Parameters

const TDesC & aRuleID
const TDesC & aComplexChild

AddOrRepTransBoolL(const TDesC &, const TDesC &, TBool)

TInt AddOrRepTransBoolL(const TDesC &aRuleID,
const TDesC &aBoolChild,
TBoolaValue
)[private]

Add or replace the transform's boolean child

Parameters

const TDesC & aRuleID
const TDesC & aBoolChild
TBool aValue

AddOrRepTransKnownBoolL(const TDesC &, const TDesC &, TBool)

IMPORT_C TIntAddOrRepTransKnownBoolL(const TDesC &aRuleID,
const TDesC &aBoolChild,
TBoolaValue
)

Adds or replace transform's boolean child element to a rule

Parameters

const TDesC & aRuleID
const TDesC & aBoolChild
TBool aValue

AddOrRepTransUnknownBoolL(const TDesC &, const TDesC &, TBool)

IMPORT_C TIntAddOrRepTransUnknownBoolL(const TDesC &aRuleID,
const TDesC &aName,
TBoolaValue
)

Adds or replace transform's unknown boolean element to a rule

Parameters

const TDesC & aRuleID
const TDesC & aName
TBool aValue

AddTransComplexL(const TDesC &, const TDesC &, const RArray< TTransDataCompo > &)

IMPORT_C TIntAddTransComplexL(const TDesC &aRuleID,
const TDesC &aComplexChild,
const RArray< TTransDataCompo > &aTypeAndValues
)

Adds transform's complex child element to a rule

Parameters

const TDesC & aRuleID
const TDesC & aComplexChild
const RArray< TTransDataCompo > & aTypeAndValues

AreNodeNamesValid(const TDesC &, const RArray< TTransDataCompo > &)

TBool AreNodeNamesValid(const TDesC &aComplexChild,
const RArray< TTransDataCompo > &aTypeAndValues
)[private]

Find whether the given transform child and its childrens are valid

Parameters

const TDesC & aComplexChild
const RArray< TTransDataCompo > & aTypeAndValues

GetTransBoolL(const TDesC &, const TDesC &, TBool &)

TInt GetTransBoolL(const TDesC &aRuleID,
const TDesC &aBoolChild,
TBool &aValue
)[private]

Gets the transform's boolean child

Parameters

const TDesC & aRuleID
const TDesC & aBoolChild
TBool & aValue

GetTransComplexL(const TDesC &, const TDesC &, RArray< TTransDataCompo > &)

IMPORT_C TIntGetTransComplexL(const TDesC &aRuleID,
const TDesC &aComplexChild,
RArray< TTransDataCompo > &aTypeAndValues
)

Gets transform's complex child element from a rule

Parameters

const TDesC & aRuleID
const TDesC & aComplexChild
RArray< TTransDataCompo > & aTypeAndValues

GetTransKnownBoolL(const TDesC &, const TDesC &, TBool &)

IMPORT_C TIntGetTransKnownBoolL(const TDesC &aRuleID,
const TDesC &aBoolChild,
TBool &aValue
)

Gets transform's boolean child element from a rule

Parameters

const TDesC & aRuleID
const TDesC & aBoolChild
TBool & aValue

GetTransUnknownBoolL(const TDesC &, const TDesC &, TBool &)

IMPORT_C TIntGetTransUnknownBoolL(const TDesC &aRuleID,
const TDesC &aName,
TBool &aValue
)

Gets transform's unknown boolean child element from a rule

Parameters

const TDesC & aRuleID
const TDesC & aName
TBool & aValue

GetTransformChildNodeL(const TDesC &, const TDesC &, TBool)

CXdmDocumentNode *GetTransformChildNodeL(const TDesC &aRuleID,
const TDesC &aTransformChild,
TBoolaCreate
)[private]

Gets the transform's child node

Parameters

const TDesC & aRuleID
const TDesC & aTransformChild
TBool aCreate

Init(CPresenceXDM *const)

IMPORT_C voidInit(CPresenceXDM *const aPresXDM)

Initializes the object with the given pointer to CPresenceXDM. This function must be called before using other functions.

Parameters

CPresenceXDM *const aPresXDM

IsBoolChildSupported(const TDesC &)

TBool IsBoolChildSupported(const TDesC &aBoolChild)[private]

Find whether the given boolean child is supported or not.

Parameters

const TDesC & aBoolChild

IsProvideAllExistL(const TDesC &, const TDesC &)

TBool IsProvideAllExistL(const TDesC &aRuleID,
const TDesC &aComplexChild
)[private]

Find whether the provide-all node exists in given complex child. the practicality of this is that if provide-all exists then it should be the only child of given complex child of transform.

Parameters

const TDesC & aRuleID
const TDesC & aComplexChild

IsTransformExistL(const TDesC &, const TDesC &)

IMPORT_C TBoolIsTransformExistL(const TDesC &aRuleID,
const TDesC &aChildElement
)

Finds whether given transform with childelement exists. This method is applicable for all transform types.

Parameters

const TDesC & aRuleID
const TDesC & aChildElement

RemoveTransformL(const TDesC &, const TDesC &)

IMPORT_C TIntRemoveTransformL(const TDesC &aRuleID,
const TDesC &aChildElement
)

Removes transform's child element from a given rule. If Child Element is NullDesC, whole transform with all childrens is removed from rule. This method is applicable to all transform types.

Parameters

const TDesC & aRuleID
const TDesC & aChildElement

Member Data Documentation

CPresenceXDM * iPresXDM

CPresenceXDM *iPresXDM[private]