author | Simon Howkins <simonh@symbian.org> |
Wed, 27 Oct 2010 16:22:14 +0100 | |
changeset 1284 | 0b4a09013baf |
parent 872 | 17498133d9ad |
permissions | -rw-r--r-- |
117
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
1 |
// Copyright (c) 1999-2009 Nokia Corporation and/or its subsidiary(-ies). |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
2 |
// All rights reserved. |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
3 |
// This component and the accompanying materials are made available |
872 | 4 |
// under the terms of the License "Eclipse Public License v1.0" |
117
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
5 |
// which accompanies this distribution, and is available |
872 | 6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html". |
117
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
7 |
// |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
8 |
// Initial Contributors: |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
9 |
// Nokia Corporation - initial contribution. |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
10 |
// |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
11 |
// Contributors: |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
12 |
// |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
13 |
// Description: |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
14 |
// |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
15 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
16 |
#ifndef __CONSOLEALARMALERTSESSION_H__ |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
17 |
#define __CONSOLEALARMALERTSESSION_H__ |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
18 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
19 |
// System includes |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
20 |
#include <e32base.h> |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
21 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
22 |
// User includes |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
23 |
#include "asaltdefs.h" |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
24 |
#include "asshdalarm.h" |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
25 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
26 |
// Type definitions |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
27 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
28 |
// Constants |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
29 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
30 |
// Classes referenced |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
31 |
class CConsoleAlarmAlertConsole; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
32 |
class CConsoleAlarmAlertLEDFlasher; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
33 |
class CConsoleAlarmAlertServer; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
34 |
// Enumerations |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
35 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
36 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
37 |
struct TAgnAlarmInfo |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
38 |
/** |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
39 |
Copy of System-Wide Unique Agenda Entry Reference defined in agmalarm.h |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
40 |
*/ |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
41 |
{ |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
42 |
TUid iAlarmCategory; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
43 |
TUint32 iAgnUniqueId; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
44 |
TFileName iFileName; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
45 |
}; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
46 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
47 |
/////////////////////////////////////////////////////////////////////////////////////// |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
48 |
// ----> CConsoleAlarmAlertSession (header) |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
49 |
/////////////////////////////////////////////////////////////////////////////////////// |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
50 |
class CConsoleAlarmAlertSession : public CSession2 |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
51 |
{ |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
52 |
/////////////////////////////////////////////////////////////////////////////////////// |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
53 |
public: // STATIC CONSTRUCT / DESTRUCT |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
54 |
/////////////////////////////////////////////////////////////////////////////////////// |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
55 |
static CConsoleAlarmAlertSession* NewL(CConsoleAlarmAlertServer* aServer); |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
56 |
~CConsoleAlarmAlertSession(); |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
57 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
58 |
/////////////////////////////////////////////////////////////////////////////////////// |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
59 |
private: // INTERNAL CONSTRUCT |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
60 |
/////////////////////////////////////////////////////////////////////////////////////// |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
61 |
CConsoleAlarmAlertSession(CConsoleAlarmAlertServer* aServer); |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
62 |
void ConstructL(); |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
63 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
64 |
/////////////////////////////////////////////////////////////////////////////////////// |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
65 |
public: // ACCESS |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
66 |
/////////////////////////////////////////////////////////////////////////////////////// |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
67 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
68 |
TTime DeferTime() const; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
69 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
70 |
inline const TASShdAlarm& Alarm() const { return iAlarm; } |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
71 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
72 |
inline TInt AlarmDataSize() const { return iAlarmAssociatedDataSize; } |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
73 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
74 |
inline const TAgnAlarmInfo& AlarmData() const { return iAlarmData; } |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
75 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
76 |
void Notify(TASAltAlertServerResponse aFlag); |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
77 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
78 |
void Notify(TASAltAlertServerResponse aFlag, const TTime& aDeferTime); |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
79 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
80 |
TAny * InstructionSet(); |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
81 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
82 |
/////////////////////////////////////////////////////////////////////////////////////// |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
83 |
private: // FROM CSession2 |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
84 |
/////////////////////////////////////////////////////////////////////////////////////// |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
85 |
void ServiceL(const RMessage2& aMessage); |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
86 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
87 |
/////////////////////////////////////////////////////////////////////////////////////// |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
88 |
private: // CMD - DEBUG ONLY |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
89 |
/////////////////////////////////////////////////////////////////////////////////////// |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
90 |
TBool CmdL(); |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
91 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
92 |
/////////////////////////////////////////////////////////////////////////////////////// |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
93 |
private: // INTERNAL METHODS |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
94 |
/////////////////////////////////////////////////////////////////////////////////////// |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
95 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
96 |
void SetAlarmL(const RMessage2& aMessage); |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
97 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
98 |
void GetUserTimeL(const RMessage2& aMessage); |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
99 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
100 |
void SetDeferTimeL(const RMessage2& aMessage); |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
101 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
102 |
static TBool SoundPlaybackCallbackL(TAny* aSelf); |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
103 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
104 |
/////////////////////////////////////////////////////////////////////////////////////// |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
105 |
private: // MEMBER DATA |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
106 |
/////////////////////////////////////////////////////////////////////////////////////// |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
107 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
108 |
TTime iDeferTime; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
109 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
110 |
TASShdAlarm iAlarm; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
111 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
112 |
TInt iAlarmAssociatedDataSize; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
113 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
114 |
TAgnAlarmInfo iAlarmData; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
115 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
116 |
TBool iLoggedOn; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
117 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
118 |
TBool iHasMessage; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
119 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
120 |
TBool iMsgComplete; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
121 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
122 |
RMessage2 iMsgPtr; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
123 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
124 |
CPeriodic* iSoundCallbackTimer; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
125 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
126 |
CConsoleAlarmAlertLEDFlasher* iSoundLEDFlasher; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
127 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
128 |
CConsoleAlarmAlertConsole* iConsole; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
129 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
130 |
CConsoleAlarmAlertServer* iServer; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
131 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
132 |
TAny* iInstructionSet; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
133 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
134 |
TBool iInstructionSetFound; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
135 |
}; |
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
136 |
|
483f966c6335
Add first draft of smoketests
Louis Henry Nayegon <louisn@symbian.org>
parents:
diff
changeset
|
137 |
#endif |