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
Public Member Functions
TPresCondValidity()
IMPORT_C TIntAddValidityL(const TDesC &, const TTimePeriod)
IMPORT_C TIntDeleteAllValidityL(const TDesC &)
IMPORT_C TIntGetValidityL(const TDesC &, RArray< TTimePeriod > &)
IMPORT_C voidInit(CPresenceXDM *const )
IMPORT_C TBoolIsTimeValidL(const TDesC &, const TTimePeriod)
Private Member Functions
voidConvertToLocal(TTime &)
voidConvertToUniversal(TTime &)
TInt FormatToXMLTimeStringL(TDes &, const TTime)
CXdmDocumentNode *GetValidityNodeL(const TDesC &, TBool)
voidLogDateTime(TDateTime)
TInt ParseFromXMLTimeString(const TDesC &, TTime &)
Private Attributes
CPresenceXDM *iPresXDM

Constructor & Destructor Documentation

TPresCondValidity()

IMPORT_CTPresCondValidity()

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

Member Functions Documentation

AddValidityL(const TDesC &, const TTimePeriod)

IMPORT_C TIntAddValidityL(const TDesC &aRuleID,
const TTimePeriodaValidTime
)

Adds condition validity to a rule

Parameters

const TDesC & aRuleID
const TTimePeriod aValidTime

ConvertToLocal(TTime &)

voidConvertToLocal(TTime &aUniversalDateTime)[private]

Convert universal time to local time

Parameters

TTime & aUniversalDateTime

ConvertToUniversal(TTime &)

voidConvertToUniversal(TTime &aLocalDateTime)[private]

Convert local time to universal time

Parameters

TTime & aLocalDateTime

DeleteAllValidityL(const TDesC &)

IMPORT_C TIntDeleteAllValidityL(const TDesC &aRuleID)

Deletes condition validity values from a rule

Parameters

const TDesC & aRuleID

FormatToXMLTimeStringL(TDes &, const TTime)

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

Parse to XML time string from TTime

Parameters

TDes & aXMLTimeString
const TTime aDateTime

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

IMPORT_C TIntGetValidityL(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,
TBoolaCreate
)[private]

Gets the Validity node pointer in a rule

Parameters

const TDesC & aRuleID
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

IsTimeValidL(const TDesC &, const TTimePeriod)

IMPORT_C TBoolIsTimeValidL(const TDesC &aRuleID,
const TTimePeriodaTime
)

Checks if rule is valid for given time

Parameters

const TDesC & aRuleID
const TTimePeriod aTime

LogDateTime(TDateTime)

voidLogDateTime(TDateTimeaDateTime)[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]