CTzUserData Class Reference

#include <mw/tz.h>

Link against: tzclient.lib

class CTzUserData : public CBase

Inherits from

  • CTzUserData

    Detailed Description

    The CTzUserData class allows the client to create, read, update or delete user-defined time zones.

    A user-defined time zone is comprised of time zone rules (encapsulated in a CTzRules object) and time zone names (encapsulated in a CTzUserNames object).

    A time zone identifier (encapsulated in a CTzId object) is used to uniquely identify a user-defined time zone.

    The CTzUserData class also allows the time zone identifiers for all existing user-defined time zones to be determined.

    Constructor & Destructor Documentation

    ~CTzUserData ( )

    IMPORT_C~CTzUserData()

    Destroys this CTzUserData object

    Member Function Documentation

    CreateL ( const CTzRules &, const CTzUserNames & )

    IMPORT_C CTzId *CreateL(const CTzRules &aTzUserRules,
    const CTzUserNames &aTzUserNames
    )

    Creates a new user-defined time zone from the given time zone rules and time zone names.

    leave
    KErrLocked The time zone Server Backup or Restore are in progress.
    leave
    KErrOverflow All the time zone user IDs have been used. To resolve this the user must delete one or more user defined time zones.
    capability
    WriteDeviceData
    ParameterDescription
    aTzUserRulesThe time zone rules to use for the newly created user-defined time zone.
    aTzUserNamesThe time zone names to use for the newly created user-defined time zone.

    Returns: A time zone identifier that identifies the newly created user-defined time zone. The caller takes ownership of this object.

    DeleteL ( const CTzId & )

    IMPORT_C voidDeleteL(const CTzId &aTzId)

    Deletes the user-defined time zone identified by the given time zone identifier.

    The current time zone is maintained through the CTzLocalizer class. If the given time zone identifier is referred to by the current time zone then the current time zone will revert to the default time zone specified by the system TZ rules database.

    Frequently used time zones are maintained through the CTzLocalizer class. If the given time zone identifier is referred to by a frequently used time zone then the frequently used time zone will revert to the default time zone specified by the system TZ rules database.

    If any Calendar entries are associated with the deleted user-defined time zone then they will not be affected. The Calendar entries maintain a copy of the associated time zone rules.

    leave
    KErrArgument The given time zone identifier does not identify a user-defined time zone.
    capability
    WriteDeviceData
    ParameterDescription
    aTzIdThe time zone identifier that identifies the user-defined time zone that is to be deleted.

    GetTzIdsL ( RPointerArray< CTzId > & )

    IMPORT_C voidGetTzIdsL(RPointerArray< CTzId > &aTzIds)const

    Returns the time zone identifiers for all existing user-defined time zones.

    ParameterDescription
    aTzIdsOn return the array will be populated with the time zone identifiers for all existing user-defined time zones. If no user-defined time zones exist the array will be empty.

    NewL ( RTz & )

    IMPORT_C CTzUserData *NewL(RTz &aTzServer)[static]

    Creates a new CTzUserData object.

    leave
    KErrNotReady The given connection to the time zone server is not connected.
    ParameterDescription
    aTzServerA connection to the time zone server.

    Returns: A fully initialised instance of the CTzUserData class. The caller takes ownership of this object.

    ReadNamesL ( const CTzId & )

    IMPORT_C CTzUserNames *ReadNamesL(const CTzId &aTzId)const

    Reads the time zone names for the given time zone identifier.

    leave
    KErrArgument The given time zone identifier does not identify a user-defined time zone.
    leave
    KErrNotFound The time zone names is not found for given time zone identifier.
    ParameterDescription
    aTzIdThe time zone identifier that identifies the user-defined time zone that is to be read.

    Returns: The time zone names for the given time zone identifier. The caller takes ownership of this object.

    ReadRulesL ( const CTzId & )

    IMPORT_C CTzRules *ReadRulesL(const CTzId &aTzId)const

    Reads the time zone rules for the given time zone identifier.

    leave
    KErrNotFound The time zone names is not found for given time zone identifier.
    leave
    KErrArgument The given time zone identifier does not identify a user-defined time zone.
    ParameterDescription
    aTzIdThe time zone identifier that identifies the user-defined time zone that is to be read.

    Returns: The time zone rules for the given time zone identifier. The caller takes ownership of this object.

    UpdateL ( const CTzId &, const CTzRules &, const CTzUserNames & )

    IMPORT_C voidUpdateL(const CTzId &aTzId,
    const CTzRules &aTzUserRules,
    const CTzUserNames &aTzUserNames
    )

    Updates a user-defined time zone using the given time zone rules and time zone names. The user-defined time zone to be updated is identified by the given time zone identifier.

    leave
    KErrArgument The given time zone identifier does not identify a user-defined time zone.
    capability
    WriteDeviceData
    ParameterDescription
    aTzIdThe time zone identifier that identifies the user-defined time zone that is to be read.
    aTzUserRulesThe time zone rules which are used to update the user-defined time zone. The user-defined time zone is identified by the given time zone identifier.
    aTzUserNamesThe time zone names which are used to update the user-defined time zone. The user-defined time zone is identified by the given time zone identifier.