williamr@2: // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: #ifndef __ASALTDEFS_H__ williamr@2: #define __ASALTDEFS_H__ williamr@2: williamr@2: /** @file williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: // System includes williamr@2: #include williamr@2: #include williamr@2: williamr@2: /** williamr@2: Flags used to indicate the States for enum TASAltStateFlags williamr@2: */ williamr@2: typedef TBitFlags TASAltClientServerStateFlags; williamr@2: williamr@2: /** williamr@2: Major Version used while connecting to the Alarm Alert Server williamr@2: */ williamr@2: const TInt KASAltVersionMajor = 3; williamr@2: williamr@2: /** williamr@2: Minor Version used while connecting to the Alarm Alert Server williamr@2: */ williamr@2: const TInt KASAltVersionMinor = 0; williamr@2: williamr@2: /** williamr@2: Build Version used while connecting to the Alarm Alert Server williamr@2: */ williamr@2: const TInt KASAltVersionBuild = 0; williamr@2: williamr@2: /** williamr@2: Number of message Slots williamr@2: */ williamr@2: const TInt KAlmMessageSlots = 5; williamr@2: williamr@2: /** williamr@2: The individual op codes which the Alert Server and Alarm Server williamr@2: handshake using williamr@2: */ williamr@2: enum TASAltOpCode williamr@2: { williamr@2: /** williamr@2: Notify the alarm server (asynchronously) when the Alert Server williamr@2: wishes to perform some action. williamr@2: */ williamr@2: EASAltOpCodeNotify = 0, williamr@2: williamr@2: /** williamr@2: Cancel an earlier notification williamr@2: */ williamr@2: EASAltOpCodeNotifyCancel, williamr@2: williamr@2: /** williamr@2: Change the visibility of the Alert Server UI furniture williamr@2: */ williamr@2: EASAltOpCodeVisible, williamr@2: williamr@2: /** williamr@2: Update the Alert Server flags williamr@2: */ williamr@2: EASAltOpCodeSetState, williamr@2: williamr@2: /** williamr@2: Inform the Alert Server of the currently notifying alarm williamr@2: */ williamr@2: EASAltOpCodeSetAlarm, williamr@2: williamr@2: /** williamr@2: Inform the Alert Server that the currently alerting alarm williamr@2: has been snoozed. williamr@2: */ williamr@2: EASAltOpCodeSetDeferTime, williamr@2: williamr@2: /** williamr@2: Retrieve the time from the Alert Server when a quiet period williamr@2: should be terminated williamr@2: */ williamr@2: EASAltOpCodeGetUserTime, williamr@2: williamr@2: /** williamr@2: Create an outstanding request with the Alert Server. Used williamr@2: as a mechanism to obtain Alert Server thread death notifications. williamr@2: */ williamr@2: EASAltOpCodeLogon, williamr@2: williamr@2: /** williamr@2: Ask the Alert Server to start playing the specified alarm sound williamr@2: */ williamr@2: EASAltOpCodeStartPlayingSound, williamr@2: williamr@2: /** williamr@2: Ask the Alert Server to stop playing any sound williamr@2: */ williamr@2: EASAltOpCodeStopPlayingSound williamr@2: williamr@2: /** williamr@2: Ask the Alert Server to change vissibility for all alarms williamr@2: */ williamr@2: , EASAltOpCodeVisibleAll, williamr@2: williamr@2: /** williamr@2: Ask the Alert Server to update states for all alarms williamr@2: */ williamr@2: EASAltOpCodeSetStateAll, williamr@2: williamr@2: /** williamr@2: Ask the Alert Server to stop playing all sounds. williamr@2: */ williamr@2: EASAltOpCodeStopPlayingSoundAll, williamr@2: williamr@2: /** williamr@2: Ask the Alert Server to delete alarm with provided Id williamr@2: */ williamr@2: EASAltOpCodeDeleteAlarm, williamr@2: williamr@2: /** williamr@2: Retrieve the time from the Alert Server when a quiet period williamr@2: should be terminated williamr@2: */ williamr@2: williamr@2: EASAltOpCodeGetEndQuietTime, williamr@2: williamr@2: /** williamr@2: Ask the Alarm Server to get number of simultaneously supported alarms williamr@2: */ williamr@2: EASAltOpCodeGetMaxAlarms, williamr@2: williamr@2: /** williamr@2: Ask the Alert Server to delete all alarms williamr@2: */ williamr@2: EASAltOpCodeDeleteAlarmAll, williamr@2: williamr@2: EASAltOpCodeLast williamr@2: williamr@2: williamr@2: }; williamr@2: williamr@2: /** williamr@2: All communication from the Alert Server to the Alarm Server williamr@2: occurs via a single outstanding TRequesStatus which is handled williamr@2: by the Alarm Server (as an active object). This enumeration williamr@2: describes the type of action that the Alarm Server should take in williamr@2: response to a request from the Alert Server. williamr@2: */ williamr@2: enum TASAltAlertServerResponse williamr@2: { williamr@2: /** williamr@2: The Alert Server wishes the Alarm Server to williamr@2: silence all alarms. williamr@2: */ williamr@2: EASAltAlertServerResponseSilence = 0, williamr@2: williamr@2: /** williamr@2: The Alert Server wishes the Alarm Server to williamr@2: enter a global quiet period. williamr@2: */ williamr@2: EASAltAlertServerResponseQuietPeriod, williamr@2: williamr@2: /** williamr@2: The Alert Server wishes the Alarm Server to williamr@2: acknowledge (clear) the currently notifying alarm. williamr@2: */ williamr@2: EASAltAlertServerResponseClear, williamr@2: williamr@2: /** williamr@2: The Alert Server wishes the Alarm Server to williamr@2: acknowledge (clear) the currently notifying alarm williamr@2: and all others that are awaiting notification. williamr@2: */ williamr@2: EASAltAlertServerResponseClearAll, williamr@2: williamr@2: /** williamr@2: The Alert Server wishes the Alarm Server to williamr@2: snooze the currently notifying alarm. williamr@2: */ williamr@2: EASAltAlertServerResponseSnooze, williamr@2: williamr@2: /** williamr@2: The Alert Server wishes the Alarm Server to williamr@2: temporarily pause all sound (i.e stop sending sound williamr@2: play events to the Alert Server). williamr@2: */ williamr@2: EASAltAlertServerResponsePauseSound williamr@2: }; williamr@2: williamr@2: /** williamr@2: Flags for TASAltClientServerStateFlags williamr@2: */ williamr@2: enum TASAltStateFlags williamr@2: { williamr@2: /** williamr@2: The Alert Server should not play any sound williamr@2: */ williamr@2: EASAltStateFlagsSilentRunning = 1, williamr@2: williamr@2: /** williamr@2: The Alarm Server is currently within a quiet period williamr@2: */ williamr@2: EASAltStateFlagsInQuietPeriod = 2, williamr@2: williamr@2: /** williamr@2: The Alarm Server currently has more than one alarm williamr@2: ready to notify. williamr@2: */ williamr@2: EASAltStateFlagsMoreThanOneDueAlarm = 3, williamr@2: williamr@2: /** williamr@2: There wasn't sufficient memory within the Alarm williamr@2: Server to allocate room for a snoozed alarm. I'm williamr@2: note convinced we need this anymore williamr@2: */ williamr@2: EASAltStateFlagsNoMemoryForSnoozeAlarm = 4, williamr@2: williamr@2: /** williamr@2: There isn't any sound filename for the current williamr@2: alarm. williamr@2: */ williamr@2: EASAltStateFlagsAlarmHasNoSoundFileName = 5, williamr@2: williamr@2: /** williamr@2: This isn't used by the Alert Server. williamr@2: */ williamr@2: EASAltStateFlagsSoundIsPaused = 6 williamr@2: williamr@2: }; williamr@2: williamr@2: // Literal constants williamr@2: _LIT(KAlarmAlertServerName, "!AlarmAlertServer"); williamr@2: williamr@2: williamr@2: #endif