EPOC   SDK Home Glossary Indexes Previous Next Up

MBasicGsmPhoneClockAndAlarm class


Contents


MBasicGsmPhoneClockAndAlarm class — Protocol for accessing clock and alarm capabilities

Section Contents


Overview

Derivation

MBasicGsmPhoneClockAndAlarm

Mixin: interface for controlling phone clock and alarm functionality.

Defined in

etelbgsm.h

Link against

gsmbas.lib

Description

This class defines the protocol for implementing phone clock and alarm functionality.


Construction and destruction


MBasicGsmPhoneClockAndAlarm() — Protected default C++ constructor

protected: MBasicGsmPhoneClockAndAlarm()

Description

The default C++ constructor is protected, which prevents objects of this class from being constructed. This class is intended only as an abstract base for other classes.


Phone clock and alarm capability functions


GetClockCaps() — Get clock and alarm capabilities

virtual TInt GetClockCaps(TClockAndAlarmCapsFlags& aCaps) const=0;

Description

This function retrieves the clock and alarm capabilities.

Arguments

TClockAndAlarmCapsFlags& aCaps

On return, contains the phone’s clock and alarm capabilities.

Return value

TInt

An error code: see System error codes.


NotifyClockCaps() — Notification of changes to clock and alarm capabilities

virtual void NotifyClockCaps(TRequestStatus& aStatus, TClockAndAlarmCapsFlags& aCaps)=0;

Description

This function requests notification of a change of the clock and alarm capabilities.

Arguments

TRequestStatus& aStatus

A variable that indicates the completion status of the request.

TClockAndAlarmCapsFlags& aCaps

On request completion, contains the current clock and alarm capabilities.


NotifyClockCapsCancel() — Cancel notification of changes to clock and alarm capabilities

virtual void NotifyClockCapsCancel() const=0;

Description

This function cancels an outstanding clock and alarm capabilities change notification request, placed using the NotifyClockCaps() function.


Clock functions


ReadClock() — Read the phone clock — synchronous

virtual TInt ReadClock(TGsmDateTime& aGsmDateTime) const=0;

Description

This function synchronously retrieves the phone’s current date and time.

Arguments

TGsmDateTime& aGsmDateTime

On return, contains the current date and time.

Return value

TInt

An error code: see System error codes.


ReadClock() — Read the phone clock — asynchronous

virtual void ReadClock(TRequestStatus& aStatus, TGsmDateTime& aGsmDateTime) const=0;

Description

This function asynchronously retrieves the phone’s current date and time.

Arguments

TRequestStatus& aStatus

A variable that indicates the completion status of the request.

TGsmDateTime& aGsmDateTime

On request completion, contains the current date and time.


ReadClockCancel() — Cancel request to read the clock

virtual void ReadClockCancel() const=0;

Description

This function cancels an outstanding request to read the clock, placed using the asynchronous variant of the ReadClock() function.


SetClock() — Set the phone clock — synchronous

virtual TInt SetClock(const TGsmDateTime& aGsmDateTime) const=0;

Description

This function synchronously sets the phone’s date and time to a given value.

Arguments

const TGsmDateTime& aGsmDateTime

The value to which the phone’s date and time is to be set.

Return value

TInt

An error code: see System error codes.


SetClock() — Set the phone clock — asynchronous

virtual void SetClock(TRequestStatus& aStatus, const TGsmDateTime& aGsmDateTime) const=0;

Description

This function asynchronously sets the phone’s date and time to a given value.

Arguments

TRequestStatus& aStatus

A variable that indicates the completion status of the request.

const TGsmDateTime& aGsmDateTime

The value to which the phone’s date and time is to be set.


SetClockCancel() — Cancel request to set the phone clock

virtual void SetClockCancel() const=0;

Description

This function cancels an outstanding request to set the phone clock, placed using the asynchronous variant of the SetClock() function.


Alarm functions


EnumerateAlarm() — Enumerate alarms — synchronous

virtual TInt EnumerateAlarm(TInt& aCount) const=0;

Description

This synchronous function retrieves the number of alarms which are currently set.

Arguments

TInt& aCount

On return, contains the number of active alarms.

Return value

TInt

An error code: see System error codes.


EnumerateAlarm() — Enumerate alarms — asynchronous

virtual void EnumerateAlarm(TRequestStatus& aStatus, TInt& aCount) const=0;

Description

This asynchronous function retrieves the number of alarms which are currently set.

Arguments

TRequestStatus& aStatus

A variable that indicates the completion status of the request.

TInt& aCount

On request completion, contains the number of active alarms.


EnumerateAlarmCancel() — Cancel request to enumerate alarms

virtual void EnumerateAlarmCancel() const=0;

Description

This function cancels an outstanding request to enumerate the phone’s alarms, placed using the asynchronous variant of the EnumerateAlarm() function.


GetAlarm() — Get alarm information — synchronous

virtual TInt GetAlarm(const TInt aIndex,TAlarm& aAlarm) const=0;

Description

This function synchronously retrieves the alarm information from a particular entry.

Arguments

const TInt aIndex

The index of the alarm to be read. The index may range from 0 to (n-1), where n is returned by the EnumerateAlarm() function.

TAlarm& aAlarm

On return, contains information for the specified alarm.

Return value

TInt

An error code: see System error codes.

Notes

GetAlarm() — Get alarm information — asynchronous

virtual void GetAlarm(TRequestStatus& aStatus, const TInt aIndex, TAlarm& aAlarm) const=0;

Description

This function asynchronously retrieves alarm information.      

Arguments

TRequestStatus& aStatus

A variable that indicates the completion status of the request.

const TInt aIndex

The index of the alarm to be read. The index may range from 0 to (n-1), where n is returned by the EnumerateAlarm() function.

TAlarm& aAlarm

On request completion, contains information for the specified alarm.

Notes

GetAlarmCancel() — Cancel request to retrieve alarm information

virtual void GetAlarmCancel() const=0;

Description

This function cancels an outstanding request to retrieve alarm information, placed using the asynchronous variant of the GetAlarm() function.


SetAlarm() — Set alarm — synchronous

virtual TInt SetAlarm(const TInt aIndex,const TAlarm& aAlarm) const=0;

Description

This function synchronously sets a phone alarm.

Arguments

const TInt aIndex

The index within the array at which the alarm should be stored.

const TAlarm& aAlarm

The alarm information to be stored.

Return value

TInt

An error code: see System error codes.

Note

SetAlarm() — Set alarm — asynchronous

virtual void SetAlarm(TRequestStatus& aStatus, const TInt aIndex,const TAlarm& aAlarm) const=0;

Description

This function asynchronously sets a phone alarm.

Arguments

TRequestStatus& aStatus

A variable that indicates the completion status of the request.

const TInt aIndex

The index at which the alarm should be stored.

const TAlarm& aAlarm

The alarm information to be stored.

Note

SetAlarmCancel() — Cancel request to set the phone alarm

virtual void SetAlarmCancel() const=0;

Description

This function cancels an outstanding request to set an alarm, placed using the asynchronous variant of the SetAlarm() function.


Enumerations


TClockCaps enum — Phone clock and alarm capability flags

KCapsClkClockAvailable

Indicates that the phone clock may be read and changed.

KCapsClkAlarmAvailable

Indicates that the phone alarms may be read and changed.


Anonymous enum — Alarm text size limit

KAlarmTextSize

The maximum size of alarm text messages — 256 characters.


Struct


TClockAndAlarmCapsFlags struct — Phone clock and alarm capability information

TUint iClockAndAlarmCaps

Contains phone clock and alarm information as a bitmask of TClockCaps capability flags.


TAlarm struct — Alarm information

TGsmDateTime iDateTime

The date and time of the alarm.

TBuf8<KAlarmTextSize> iText

The text to be displayed by the phone when the alarm goes off.

EPOC       SDK Home Glossary Indexes Previous Next Up