TPresCondValidity Class Reference

class TPresCondValidity

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. TPresCondValidity is used to manipulate the validity part of Condition in a rule. Remember to call Init function after constructing this object.

rlspresxdm.lib
Since
S60 3.2

Constructor & Destructor Documentation

TPresCondValidity()

IMPORT_C TPresCondValidity ( )

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

Member Functions Documentation

AddValidityL(const TDesC &, const TTimePeriod)

IMPORT_C TInt AddValidityL ( const TDesC & aRuleID,
const TTimePeriod aValidTime
)

Adds condition validity to a rule

Parameters

const TDesC & aRuleID
const TTimePeriod aValidTime

ConvertToLocal(TTime &)

void ConvertToLocal ( TTime & aUniversalDateTime ) [private]

Convert universal time to local time

Parameters

TTime & aUniversalDateTime

ConvertToUniversal(TTime &)

void ConvertToUniversal ( TTime & aLocalDateTime ) [private]

Convert local time to universal time

Parameters

TTime & aLocalDateTime

DeleteAllValidityL(const TDesC &)

IMPORT_C TInt DeleteAllValidityL ( const TDesC & aRuleID )

Deletes condition validity values from a rule

Parameters

const TDesC & aRuleID

FormatToXMLTimeStringL(TDes &, const TTime)

TInt FormatToXMLTimeStringL ( TDes & aXMLTimeString,
const TTime aDateTime
) [private]

Parse to XML time string from TTime

Parameters

TDes & aXMLTimeString
const TTime aDateTime

GetValidityL(const TDesC &, RArray< TTimePeriod > &)

IMPORT_C TInt GetValidityL ( const TDesC & aRuleID,
RArray < TTimePeriod > & aValidTimes
)

Gets condition validity values from a rule

Parameters

const TDesC & aRuleID
RArray < TTimePeriod > & aValidTimes

GetValidityNodeL(const TDesC &, TBool)

CXdmDocumentNode * GetValidityNodeL ( const TDesC & aRuleID,
TBool aCreate
) [private]

Gets the Validity node pointer in a rule

Parameters

const TDesC & aRuleID
TBool aCreate

Init(CPresenceXDM *const)

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.

Parameters

CPresenceXDM *const aPresXDM

IsTimeValidL(const TDesC &, const TTimePeriod)

IMPORT_C TBool IsTimeValidL ( const TDesC & aRuleID,
const TTimePeriod aTime
)

Checks if rule is valid for given time

Parameters

const TDesC & aRuleID
const TTimePeriod aTime

LogDateTime(TDateTime)

void LogDateTime ( TDateTime aDateTime ) [private]

Logs Given dateTime

Parameters

TDateTime aDateTime

ParseFromXMLTimeString(const TDesC &, TTime &)

TInt ParseFromXMLTimeString ( const TDesC & aXMLTimeString,
TTime & aDateTime
) [private]

Parse from XML time string to TTime

Parameters

const TDesC & aXMLTimeString
TTime & aDateTime

Member Data Documentation

CPresenceXDM * iPresXDM

CPresenceXDM * iPresXDM [private]