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.
Public Member Functions | |
---|---|
TPresCondValidity () | |
IMPORT_C TInt | AddValidityL (const TDesC &, const TTimePeriod ) |
IMPORT_C TInt | DeleteAllValidityL (const TDesC &) |
IMPORT_C TInt | GetValidityL (const TDesC &, RArray < TTimePeriod > &) |
IMPORT_C void | Init ( CPresenceXDM *const ) |
IMPORT_C TBool | IsTimeValidL (const TDesC &, const TTimePeriod ) |
Private Member Functions | |
---|---|
void | ConvertToLocal ( TTime &) |
void | ConvertToUniversal ( TTime &) |
TInt | FormatToXMLTimeStringL ( TDes &, const TTime ) |
CXdmDocumentNode * | GetValidityNodeL (const TDesC &, TBool ) |
void | LogDateTime ( TDateTime ) |
TInt | ParseFromXMLTimeString (const TDesC &, TTime &) |
Private Attributes | |
---|---|
CPresenceXDM * | iPresXDM |
IMPORT_C | TPresCondValidity | ( | ) |
C++ Constructor, After contructing Init must be called before using this object.
IMPORT_C TInt | AddValidityL | ( | const TDesC & | aRuleID, |
const TTimePeriod | aValidTime | |||
) |
Adds condition validity to a rule
const TDesC & aRuleID | |
const TTimePeriod aValidTime |
void | ConvertToLocal | ( | TTime & | aUniversalDateTime | ) | [private] |
Convert universal time to local time
TTime & aUniversalDateTime |
void | ConvertToUniversal | ( | TTime & | aLocalDateTime | ) | [private] |
Convert local time to universal time
TTime & aLocalDateTime |
IMPORT_C TInt | DeleteAllValidityL | ( | const TDesC & | aRuleID | ) |
Deletes condition validity values from a rule
const TDesC & aRuleID |
TInt | FormatToXMLTimeStringL | ( | TDes & | aXMLTimeString, |
const TTime | aDateTime | |||
) | [private] |
Parse to XML time string from TTime
IMPORT_C TInt | GetValidityL | ( | const TDesC & | aRuleID, |
RArray < TTimePeriod > & | aValidTimes | |||
) |
Gets condition validity values from a rule
const TDesC & aRuleID | |
RArray < TTimePeriod > & aValidTimes |
CXdmDocumentNode * | GetValidityNodeL | ( | const TDesC & | aRuleID, |
TBool | aCreate | |||
) | [private] |
Gets the Validity node pointer in a rule
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 |
IMPORT_C TBool | IsTimeValidL | ( | const TDesC & | aRuleID, |
const TTimePeriod | aTime | |||
) |
Checks if rule is valid for given time
const TDesC & aRuleID | |
const TTimePeriod aTime |
void | LogDateTime | ( | TDateTime | aDateTime | ) | [private] |
Logs Given dateTime
TDateTime aDateTime |
TInt | ParseFromXMLTimeString | ( | const TDesC & | aXMLTimeString, |
TTime & | aDateTime | |||
) | [private] |
Parse from XML time string to TTime
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.