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.
williamr@2
     1
// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@4
     4
// under the terms of "Eclipse Public License v1.0"
williamr@2
     5
// which accompanies this distribution, and is available
williamr@4
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
//
williamr@2
    15
williamr@2
    16
#ifndef __ASALTDEFS_H__
williamr@2
    17
#define __ASALTDEFS_H__
williamr@2
    18
williamr@2
    19
/** @file
williamr@2
    20
@publishedAll
williamr@2
    21
@released
williamr@2
    22
*/
williamr@2
    23
// System includes
williamr@2
    24
#include <e32std.h>
williamr@2
    25
#include <babitflags.h>
williamr@2
    26
williamr@2
    27
/** 
williamr@2
    28
 Flags used to indicate the States for enum TASAltStateFlags
williamr@2
    29
 */
williamr@2
    30
typedef TBitFlags TASAltClientServerStateFlags;
williamr@2
    31
williamr@2
    32
/** 
williamr@2
    33
 Major Version used while connecting to the Alarm Alert Server
williamr@2
    34
 */
williamr@2
    35
const TInt KASAltVersionMajor = 3;
williamr@2
    36
williamr@2
    37
/** 
williamr@2
    38
 Minor Version used while connecting to the Alarm Alert Server
williamr@2
    39
 */
williamr@2
    40
const TInt KASAltVersionMinor = 0;
williamr@2
    41
williamr@2
    42
/** 
williamr@2
    43
 Build Version used while connecting to the Alarm Alert Server
williamr@2
    44
 */
williamr@2
    45
const TInt KASAltVersionBuild = 0;
williamr@2
    46
williamr@2
    47
/** 
williamr@2
    48
 Number of message Slots
williamr@2
    49
 */
williamr@2
    50
const TInt KAlmMessageSlots	= 5;
williamr@2
    51
williamr@2
    52
/** 
williamr@2
    53
 The individual op codes which the Alert Server and Alarm Server
williamr@2
    54
 handshake using
williamr@2
    55
 */
williamr@2
    56
enum TASAltOpCode
williamr@2
    57
    {
williamr@2
    58
	/**
williamr@2
    59
	 Notify the alarm server (asynchronously) when the Alert Server
williamr@2
    60
	 wishes to perform some action.
williamr@2
    61
	 */
williamr@2
    62
    EASAltOpCodeNotify = 0,
williamr@2
    63
williamr@2
    64
	/**
williamr@2
    65
	 Cancel an earlier notification
williamr@2
    66
	 */
williamr@2
    67
    EASAltOpCodeNotifyCancel,
williamr@2
    68
williamr@2
    69
	/**
williamr@2
    70
	 Change the visibility of the Alert Server UI furniture
williamr@2
    71
	 */
williamr@2
    72
	EASAltOpCodeVisible,
williamr@2
    73
williamr@2
    74
	/**
williamr@2
    75
	 Update the Alert Server flags
williamr@2
    76
	 */
williamr@2
    77
    EASAltOpCodeSetState,
williamr@2
    78
williamr@2
    79
	/**
williamr@2
    80
	 Inform the Alert Server of the currently notifying alarm
williamr@2
    81
	 */
williamr@2
    82
    EASAltOpCodeSetAlarm,
williamr@2
    83
williamr@2
    84
	/**
williamr@2
    85
	 Inform the Alert Server that the currently alerting alarm
williamr@2
    86
	 has been snoozed.
williamr@2
    87
	 */
williamr@2
    88
	EASAltOpCodeSetDeferTime,
williamr@2
    89
williamr@2
    90
	/**
williamr@2
    91
	 Retrieve the time from the Alert Server when a quiet period 
williamr@2
    92
	 should be terminated
williamr@2
    93
	 */
williamr@2
    94
	EASAltOpCodeGetUserTime,
williamr@2
    95
williamr@2
    96
	/**
williamr@2
    97
	 Create an outstanding request with the Alert Server. Used
williamr@2
    98
	 as a mechanism to obtain Alert Server thread death notifications.
williamr@2
    99
	 */
williamr@2
   100
	EASAltOpCodeLogon,
williamr@2
   101
williamr@2
   102
	/**
williamr@2
   103
	 Ask the Alert Server to start playing the specified alarm sound
williamr@2
   104
	 */
williamr@2
   105
	EASAltOpCodeStartPlayingSound,
williamr@2
   106
williamr@2
   107
	/**
williamr@2
   108
	 Ask the Alert Server to stop playing any sound
williamr@2
   109
	 */
williamr@2
   110
	EASAltOpCodeStopPlayingSound
williamr@2
   111
williamr@2
   112
	/**
williamr@2
   113
	Ask the  Alert Server to change vissibility for all alarms
williamr@2
   114
	*/
williamr@2
   115
	, EASAltOpCodeVisibleAll,
williamr@2
   116
	
williamr@2
   117
	/**
williamr@2
   118
	Ask the  Alert Server to update states for all alarms
williamr@2
   119
	*/
williamr@2
   120
	EASAltOpCodeSetStateAll,
williamr@2
   121
	
williamr@2
   122
	/**
williamr@2
   123
	Ask the  Alert Server to stop playing all sounds.
williamr@2
   124
	*/
williamr@2
   125
	EASAltOpCodeStopPlayingSoundAll,
williamr@2
   126
	
williamr@2
   127
	/**
williamr@2
   128
	Ask the  Alert Server to delete alarm with provided Id
williamr@2
   129
	*/
williamr@2
   130
	EASAltOpCodeDeleteAlarm,
williamr@2
   131
williamr@2
   132
	/**
williamr@2
   133
	 Retrieve the time from the Alert Server when a quiet period 
williamr@2
   134
	 should be terminated
williamr@2
   135
	 */
williamr@2
   136
williamr@2
   137
	EASAltOpCodeGetEndQuietTime,
williamr@2
   138
williamr@2
   139
	/**
williamr@2
   140
	Ask the Alarm Server to get number of simultaneously supported alarms
williamr@2
   141
	*/
williamr@2
   142
	EASAltOpCodeGetMaxAlarms,
williamr@2
   143
	
williamr@2
   144
	/**
williamr@2
   145
	Ask the  Alert Server to delete all alarms
williamr@2
   146
	*/
williamr@2
   147
	EASAltOpCodeDeleteAlarmAll,
williamr@2
   148
			
williamr@2
   149
	EASAltOpCodeLast
williamr@2
   150
	
williamr@2
   151
	
williamr@2
   152
    };
williamr@2
   153
williamr@2
   154
/**
williamr@2
   155
 All communication from the Alert Server to the Alarm Server
williamr@2
   156
 occurs via a single outstanding TRequesStatus which is handled
williamr@2
   157
 by the Alarm Server (as an active object). This enumeration
williamr@2
   158
 describes the type of action that the Alarm Server should take in
williamr@2
   159
 response to a request from the Alert Server.
williamr@2
   160
 */
williamr@2
   161
enum TASAltAlertServerResponse
williamr@2
   162
	{
williamr@2
   163
	/**
williamr@2
   164
	 The Alert Server wishes the Alarm Server to
williamr@2
   165
	 silence all alarms.
williamr@2
   166
	 */
williamr@2
   167
	EASAltAlertServerResponseSilence = 0,
williamr@2
   168
williamr@2
   169
	/**
williamr@2
   170
	 The Alert Server wishes the Alarm Server to
williamr@2
   171
	 enter a global quiet period.
williamr@2
   172
	 */
williamr@2
   173
	EASAltAlertServerResponseQuietPeriod,
williamr@2
   174
williamr@2
   175
	/**
williamr@2
   176
	 The Alert Server wishes the Alarm Server to
williamr@2
   177
	 acknowledge (clear) the currently notifying alarm.
williamr@2
   178
	 */
williamr@2
   179
	EASAltAlertServerResponseClear,
williamr@2
   180
williamr@2
   181
	/**
williamr@2
   182
	 The Alert Server wishes the Alarm Server to
williamr@2
   183
	 acknowledge (clear) the currently notifying alarm
williamr@2
   184
	 and all others that are awaiting notification.
williamr@2
   185
	 */
williamr@2
   186
	EASAltAlertServerResponseClearAll,
williamr@2
   187
williamr@2
   188
	/**
williamr@2
   189
	 The Alert Server wishes the Alarm Server to
williamr@2
   190
	  snooze the currently notifying alarm.
williamr@2
   191
	 */
williamr@2
   192
	EASAltAlertServerResponseSnooze,
williamr@2
   193
williamr@2
   194
	/**
williamr@2
   195
	 The Alert Server wishes the Alarm Server to
williamr@2
   196
	 temporarily pause all sound (i.e stop sending sound
williamr@2
   197
	 play events to the Alert Server).
williamr@2
   198
	 */
williamr@2
   199
	EASAltAlertServerResponsePauseSound
williamr@2
   200
	};
williamr@2
   201
williamr@2
   202
/**
williamr@2
   203
 Flags for TASAltClientServerStateFlags
williamr@2
   204
 */
williamr@2
   205
enum TASAltStateFlags
williamr@2
   206
	{
williamr@2
   207
	/**
williamr@2
   208
	 The Alert Server should not play any sound
williamr@2
   209
	 */
williamr@2
   210
	EASAltStateFlagsSilentRunning = 1,
williamr@2
   211
williamr@2
   212
	/**
williamr@2
   213
	 The Alarm Server is currently within a quiet period
williamr@2
   214
	 */
williamr@2
   215
	EASAltStateFlagsInQuietPeriod = 2,
williamr@2
   216
williamr@2
   217
	/**
williamr@2
   218
	 The Alarm Server currently has more than one alarm
williamr@2
   219
	 ready to notify.
williamr@2
   220
	 */
williamr@2
   221
	EASAltStateFlagsMoreThanOneDueAlarm	= 3,
williamr@2
   222
williamr@2
   223
	/**
williamr@2
   224
	 There wasn't sufficient memory within the Alarm
williamr@2
   225
	 Server to allocate room for a snoozed alarm. I'm
williamr@2
   226
	 note convinced we need this anymore
williamr@2
   227
	 */
williamr@2
   228
	EASAltStateFlagsNoMemoryForSnoozeAlarm = 4,
williamr@2
   229
williamr@2
   230
	/**
williamr@2
   231
	 There isn't any sound filename for the current
williamr@2
   232
	 alarm.
williamr@2
   233
	 */
williamr@2
   234
	EASAltStateFlagsAlarmHasNoSoundFileName	= 5,
williamr@2
   235
williamr@2
   236
	/**
williamr@2
   237
	 This isn't used by the Alert Server.
williamr@2
   238
	 */
williamr@2
   239
	EASAltStateFlagsSoundIsPaused = 6
williamr@2
   240
williamr@2
   241
	};
williamr@2
   242
williamr@2
   243
// Literal constants
williamr@2
   244
_LIT(KAlarmAlertServerName, "!AlarmAlertServer");
williamr@2
   245
williamr@2
   246
williamr@2
   247
#endif