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.
Public Member Functions | |
---|---|
TPresenceTransformXDM () | |
IMPORT_C TInt | AddOrRepProvideAllTransComplexL (const TDesC &, const TDesC &) |
IMPORT_C TInt | AddOrRepTransKnownBoolL (const TDesC &, const TDesC &, TBool ) |
IMPORT_C TInt | AddOrRepTransUnknownBoolL (const TDesC &, const TDesC &, TBool ) |
IMPORT_C TInt | AddTransComplexL (const TDesC &, const TDesC &, const RArray < TTransDataCompo > &) |
IMPORT_C TInt | GetTransComplexL (const TDesC &, const TDesC &, RArray < TTransDataCompo > &) |
IMPORT_C TInt | GetTransKnownBoolL (const TDesC &, const TDesC &, TBool &) |
IMPORT_C TInt | GetTransUnknownBoolL (const TDesC &, const TDesC &, TBool &) |
IMPORT_C void | Init ( CPresenceXDM *const ) |
IMPORT_C TBool | IsTransformExistL (const TDesC &, const TDesC &) |
IMPORT_C TInt | RemoveTransformL (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 |
IMPORT_C | TPresenceTransformXDM | ( | ) |
C++ Constructor, After contructing Init must be called before using this object.
IMPORT_C TInt | AddOrRepProvideAllTransComplexL | ( | const TDesC & | aRuleID, |
const TDesC & | aComplexChild | |||
) |
Adds or replace transform's complex child provide-all element to a rule
TInt | AddOrRepTransBoolL | ( | const TDesC & | aRuleID, |
const TDesC & | aBoolChild, | |||
TBool | aValue | |||
) | [private] |
Add or replace the transform's boolean child
IMPORT_C TInt | AddOrRepTransKnownBoolL | ( | const TDesC & | aRuleID, |
const TDesC & | aBoolChild, | |||
TBool | aValue | |||
) |
Adds or replace transform's boolean child element to a rule
IMPORT_C TInt | AddOrRepTransUnknownBoolL | ( | const TDesC & | aRuleID, |
const TDesC & | aName, | |||
TBool | aValue | |||
) |
Adds or replace transform's unknown boolean element to a rule
IMPORT_C TInt | AddTransComplexL | ( | const TDesC & | aRuleID, |
const TDesC & | aComplexChild, | |||
const RArray < TTransDataCompo > & | aTypeAndValues | |||
) |
Adds transform's complex child element to a rule
const TDesC & aRuleID | |
const TDesC & aComplexChild | |
const RArray < TTransDataCompo > & aTypeAndValues |
TBool | AreNodeNamesValid | ( | const TDesC & | aComplexChild, |
const RArray < TTransDataCompo > & | aTypeAndValues | |||
) | [private] |
Find whether the given transform child and its childrens are valid
const TDesC & aComplexChild | |
const RArray < TTransDataCompo > & aTypeAndValues |
TInt | GetTransBoolL | ( | const TDesC & | aRuleID, |
const TDesC & | aBoolChild, | |||
TBool & | aValue | |||
) | [private] |
Gets the transform's boolean child
IMPORT_C TInt | GetTransComplexL | ( | const TDesC & | aRuleID, |
const TDesC & | aComplexChild, | |||
RArray < TTransDataCompo > & | aTypeAndValues | |||
) |
Gets transform's complex child element from a rule
const TDesC & aRuleID | |
const TDesC & aComplexChild | |
RArray < TTransDataCompo > & aTypeAndValues |
IMPORT_C TInt | GetTransKnownBoolL | ( | const TDesC & | aRuleID, |
const TDesC & | aBoolChild, | |||
TBool & | aValue | |||
) |
Gets transform's boolean child element from a rule
IMPORT_C TInt | GetTransUnknownBoolL | ( | const TDesC & | aRuleID, |
const TDesC & | aName, | |||
TBool & | aValue | |||
) |
Gets transform's unknown boolean child element from a rule
CXdmDocumentNode * | GetTransformChildNodeL | ( | const TDesC & | aRuleID, |
const TDesC & | aTransformChild, | |||
TBool | aCreate | |||
) | [private] |
Gets the transform's child node
IMPORT_C void | Init | ( | CPresenceXDM *const | aPresXDM | ) |
Initializes the object with the given pointer to CPresenceXDM . This function must be called before using other functions.
CPresenceXDM *const aPresXDM |
TBool | IsBoolChildSupported | ( | const TDesC & | aBoolChild | ) | [private] |
Find whether the given boolean child is supported or not.
const TDesC & aBoolChild |
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.
IMPORT_C TBool | IsTransformExistL | ( | const TDesC & | aRuleID, |
const TDesC & | aChildElement | |||
) |
Finds whether given transform with childelement exists. This method is applicable for all transform types.
IMPORT_C TInt | RemoveTransformL | ( | 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.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.