epoc32/include/mw/asaltdefs.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 #ifndef __ASALTDEFS_H__
    17 #define __ASALTDEFS_H__
    18 
    19 /** @file
    20 @publishedAll
    21 @released
    22 */
    23 // System includes
    24 #include <e32std.h>
    25 #include <babitflags.h>
    26 
    27 /** 
    28  Flags used to indicate the States for enum TASAltStateFlags
    29  */
    30 typedef TBitFlags TASAltClientServerStateFlags;
    31 
    32 /** 
    33  Major Version used while connecting to the Alarm Alert Server
    34  */
    35 const TInt KASAltVersionMajor = 3;
    36 
    37 /** 
    38  Minor Version used while connecting to the Alarm Alert Server
    39  */
    40 const TInt KASAltVersionMinor = 0;
    41 
    42 /** 
    43  Build Version used while connecting to the Alarm Alert Server
    44  */
    45 const TInt KASAltVersionBuild = 0;
    46 
    47 /** 
    48  Number of message Slots
    49  */
    50 const TInt KAlmMessageSlots	= 5;
    51 
    52 /** 
    53  The individual op codes which the Alert Server and Alarm Server
    54  handshake using
    55  */
    56 enum TASAltOpCode
    57     {
    58 	/**
    59 	 Notify the alarm server (asynchronously) when the Alert Server
    60 	 wishes to perform some action.
    61 	 */
    62     EASAltOpCodeNotify = 0,
    63 
    64 	/**
    65 	 Cancel an earlier notification
    66 	 */
    67     EASAltOpCodeNotifyCancel,
    68 
    69 	/**
    70 	 Change the visibility of the Alert Server UI furniture
    71 	 */
    72 	EASAltOpCodeVisible,
    73 
    74 	/**
    75 	 Update the Alert Server flags
    76 	 */
    77     EASAltOpCodeSetState,
    78 
    79 	/**
    80 	 Inform the Alert Server of the currently notifying alarm
    81 	 */
    82     EASAltOpCodeSetAlarm,
    83 
    84 	/**
    85 	 Inform the Alert Server that the currently alerting alarm
    86 	 has been snoozed.
    87 	 */
    88 	EASAltOpCodeSetDeferTime,
    89 
    90 	/**
    91 	 Retrieve the time from the Alert Server when a quiet period 
    92 	 should be terminated
    93 	 */
    94 	EASAltOpCodeGetUserTime,
    95 
    96 	/**
    97 	 Create an outstanding request with the Alert Server. Used
    98 	 as a mechanism to obtain Alert Server thread death notifications.
    99 	 */
   100 	EASAltOpCodeLogon,
   101 
   102 	/**
   103 	 Ask the Alert Server to start playing the specified alarm sound
   104 	 */
   105 	EASAltOpCodeStartPlayingSound,
   106 
   107 	/**
   108 	 Ask the Alert Server to stop playing any sound
   109 	 */
   110 	EASAltOpCodeStopPlayingSound
   111 
   112 	/**
   113 	Ask the  Alert Server to change vissibility for all alarms
   114 	*/
   115 	, EASAltOpCodeVisibleAll,
   116 	
   117 	/**
   118 	Ask the  Alert Server to update states for all alarms
   119 	*/
   120 	EASAltOpCodeSetStateAll,
   121 	
   122 	/**
   123 	Ask the  Alert Server to stop playing all sounds.
   124 	*/
   125 	EASAltOpCodeStopPlayingSoundAll,
   126 	
   127 	/**
   128 	Ask the  Alert Server to delete alarm with provided Id
   129 	*/
   130 	EASAltOpCodeDeleteAlarm,
   131 
   132 	/**
   133 	 Retrieve the time from the Alert Server when a quiet period 
   134 	 should be terminated
   135 	 */
   136 
   137 	EASAltOpCodeGetEndQuietTime,
   138 
   139 	/**
   140 	Ask the Alarm Server to get number of simultaneously supported alarms
   141 	*/
   142 	EASAltOpCodeGetMaxAlarms,
   143 	
   144 	/**
   145 	Ask the  Alert Server to delete all alarms
   146 	*/
   147 	EASAltOpCodeDeleteAlarmAll,
   148 			
   149 	EASAltOpCodeLast
   150 	
   151 	
   152     };
   153 
   154 /**
   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.
   160  */
   161 enum TASAltAlertServerResponse
   162 	{
   163 	/**
   164 	 The Alert Server wishes the Alarm Server to
   165 	 silence all alarms.
   166 	 */
   167 	EASAltAlertServerResponseSilence = 0,
   168 
   169 	/**
   170 	 The Alert Server wishes the Alarm Server to
   171 	 enter a global quiet period.
   172 	 */
   173 	EASAltAlertServerResponseQuietPeriod,
   174 
   175 	/**
   176 	 The Alert Server wishes the Alarm Server to
   177 	 acknowledge (clear) the currently notifying alarm.
   178 	 */
   179 	EASAltAlertServerResponseClear,
   180 
   181 	/**
   182 	 The Alert Server wishes the Alarm Server to
   183 	 acknowledge (clear) the currently notifying alarm
   184 	 and all others that are awaiting notification.
   185 	 */
   186 	EASAltAlertServerResponseClearAll,
   187 
   188 	/**
   189 	 The Alert Server wishes the Alarm Server to
   190 	  snooze the currently notifying alarm.
   191 	 */
   192 	EASAltAlertServerResponseSnooze,
   193 
   194 	/**
   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).
   198 	 */
   199 	EASAltAlertServerResponsePauseSound
   200 	};
   201 
   202 /**
   203  Flags for TASAltClientServerStateFlags
   204  */
   205 enum TASAltStateFlags
   206 	{
   207 	/**
   208 	 The Alert Server should not play any sound
   209 	 */
   210 	EASAltStateFlagsSilentRunning = 1,
   211 
   212 	/**
   213 	 The Alarm Server is currently within a quiet period
   214 	 */
   215 	EASAltStateFlagsInQuietPeriod = 2,
   216 
   217 	/**
   218 	 The Alarm Server currently has more than one alarm
   219 	 ready to notify.
   220 	 */
   221 	EASAltStateFlagsMoreThanOneDueAlarm	= 3,
   222 
   223 	/**
   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
   227 	 */
   228 	EASAltStateFlagsNoMemoryForSnoozeAlarm = 4,
   229 
   230 	/**
   231 	 There isn't any sound filename for the current
   232 	 alarm.
   233 	 */
   234 	EASAltStateFlagsAlarmHasNoSoundFileName	= 5,
   235 
   236 	/**
   237 	 This isn't used by the Alert Server.
   238 	 */
   239 	EASAltStateFlagsSoundIsPaused = 6
   240 
   241 	};
   242 
   243 // Literal constants
   244 _LIT(KAlarmAlertServerName, "!AlarmAlertServer");
   245 
   246 
   247 #endif