1 // Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __ASALTDEFS_H__
17 #define __ASALTDEFS_H__
25 #include <babitflags.h>
28 Flags used to indicate the States for enum TASAltStateFlags
30 typedef TBitFlags TASAltClientServerStateFlags;
33 Major Version used while connecting to the Alarm Alert Server
35 const TInt KASAltVersionMajor = 3;
38 Minor Version used while connecting to the Alarm Alert Server
40 const TInt KASAltVersionMinor = 0;
43 Build Version used while connecting to the Alarm Alert Server
45 const TInt KASAltVersionBuild = 0;
48 Number of message Slots
50 const TInt KAlmMessageSlots = 5;
53 The individual op codes which the Alert Server and Alarm Server
59 Notify the alarm server (asynchronously) when the Alert Server
60 wishes to perform some action.
62 EASAltOpCodeNotify = 0,
65 Cancel an earlier notification
67 EASAltOpCodeNotifyCancel,
70 Change the visibility of the Alert Server UI furniture
75 Update the Alert Server flags
80 Inform the Alert Server of the currently notifying alarm
85 Inform the Alert Server that the currently alerting alarm
88 EASAltOpCodeSetDeferTime,
91 Retrieve the time from the Alert Server when a quiet period
94 EASAltOpCodeGetUserTime,
97 Create an outstanding request with the Alert Server. Used
98 as a mechanism to obtain Alert Server thread death notifications.
103 Ask the Alert Server to start playing the specified alarm sound
105 EASAltOpCodeStartPlayingSound,
108 Ask the Alert Server to stop playing any sound
110 EASAltOpCodeStopPlayingSound
113 Ask the Alert Server to change vissibility for all alarms
115 , EASAltOpCodeVisibleAll,
118 Ask the Alert Server to update states for all alarms
120 EASAltOpCodeSetStateAll,
123 Ask the Alert Server to stop playing all sounds.
125 EASAltOpCodeStopPlayingSoundAll,
128 Ask the Alert Server to delete alarm with provided Id
130 EASAltOpCodeDeleteAlarm,
133 Retrieve the time from the Alert Server when a quiet period
137 EASAltOpCodeGetEndQuietTime,
140 Ask the Alarm Server to get number of simultaneously supported alarms
142 EASAltOpCodeGetMaxAlarms,
145 Ask the Alert Server to delete all alarms
147 EASAltOpCodeDeleteAlarmAll,
155 All communication from the Alert Server to the Alarm Server
156 occurs via a single outstanding TRequesStatus which is handled
157 by the Alarm Server (as an active object). This enumeration
158 describes the type of action that the Alarm Server should take in
159 response to a request from the Alert Server.
161 enum TASAltAlertServerResponse
164 The Alert Server wishes the Alarm Server to
167 EASAltAlertServerResponseSilence = 0,
170 The Alert Server wishes the Alarm Server to
171 enter a global quiet period.
173 EASAltAlertServerResponseQuietPeriod,
176 The Alert Server wishes the Alarm Server to
177 acknowledge (clear) the currently notifying alarm.
179 EASAltAlertServerResponseClear,
182 The Alert Server wishes the Alarm Server to
183 acknowledge (clear) the currently notifying alarm
184 and all others that are awaiting notification.
186 EASAltAlertServerResponseClearAll,
189 The Alert Server wishes the Alarm Server to
190 snooze the currently notifying alarm.
192 EASAltAlertServerResponseSnooze,
195 The Alert Server wishes the Alarm Server to
196 temporarily pause all sound (i.e stop sending sound
197 play events to the Alert Server).
199 EASAltAlertServerResponsePauseSound
203 Flags for TASAltClientServerStateFlags
205 enum TASAltStateFlags
208 The Alert Server should not play any sound
210 EASAltStateFlagsSilentRunning = 1,
213 The Alarm Server is currently within a quiet period
215 EASAltStateFlagsInQuietPeriod = 2,
218 The Alarm Server currently has more than one alarm
221 EASAltStateFlagsMoreThanOneDueAlarm = 3,
224 There wasn't sufficient memory within the Alarm
225 Server to allocate room for a snoozed alarm. I'm
226 note convinced we need this anymore
228 EASAltStateFlagsNoMemoryForSnoozeAlarm = 4,
231 There isn't any sound filename for the current
234 EASAltStateFlagsAlarmHasNoSoundFileName = 5,
237 This isn't used by the Alert Server.
239 EASAltStateFlagsSoundIsPaused = 6
244 _LIT(KAlarmAlertServerName, "!AlarmAlertServer");