|
1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Utility file. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef __CLK_COMMON_H__ |
|
19 #define __CLK_COMMON_H__ |
|
20 |
|
21 // System includes |
|
22 #include <e32base.h> |
|
23 #include <asshddefs.h> |
|
24 #include <asshdalarm.h> |
|
25 #include <almconst.h> |
|
26 #include <asclisession.h> |
|
27 |
|
28 // User includes |
|
29 |
|
30 // Constants |
|
31 const TInt KAlarmIdleObserverPriority( -0x0010 ); |
|
32 const TInt KAlarmListenerPriority( -0x0005 ); |
|
33 const TInt KGmtOffsetLength( 6 ); |
|
34 const TInt KDateStringLength( 12 ); |
|
35 const TInt KVGAPortraitVariant( 2 ); |
|
36 const TInt KVGALandscapeVariant( 3 ); |
|
37 const TInt KClockHideInBackground( -100 ); |
|
38 const TInt KZerothIndex( 0 ); |
|
39 |
|
40 // Literals |
|
41 _LIT( KSingleSpace, " " ); |
|
42 _LIT( KSeparatorComma, "," ); |
|
43 |
|
44 // Datatypes |
|
45 typedef TBuf< KGmtOffsetLength > TGmtOffsetText; |
|
46 typedef TBuf< KDateStringLength > TDateString; |
|
47 |
|
48 /** |
|
49 * @enum TClockEnvChanged |
|
50 * @brief enum listing the environment changes that clock application is concerned about. |
|
51 */ |
|
52 enum TClockEnvChanged |
|
53 { |
|
54 EEnvTimeChanged = 0x01, |
|
55 EEnvLocaleChanged = 0x02, |
|
56 EEnvChanged = EEnvTimeChanged | EEnvLocaleChanged |
|
57 }; |
|
58 |
|
59 /** |
|
60 * @enum TClockMainViewIconIndex |
|
61 * @brief Holds the index for the icons to be displayed for alarms. |
|
62 */ |
|
63 enum TClockMainViewIconIndex |
|
64 { |
|
65 EAlarmActiveIconIndex, |
|
66 EAlarmRepeatIconIndex, |
|
67 EAlarmInActiveIconIndex, |
|
68 EBlankIconIndex |
|
69 }; |
|
70 |
|
71 /** |
|
72 * @struct SClkAlarmInfo |
|
73 * @brief Holds the alarm information. |
|
74 */ |
|
75 struct SClkAlarmInfo |
|
76 { |
|
77 /** |
|
78 * @var iAlarmTime |
|
79 * @brief The alarm expiry time. |
|
80 */ |
|
81 TTime iAlarmTime; |
|
82 |
|
83 /** |
|
84 * @var iStatus |
|
85 * @brief The status of the alarm. |
|
86 */ |
|
87 TAlarmStatus iStatus; |
|
88 |
|
89 /** |
|
90 * @var iState |
|
91 * @brief The state of the alarm. |
|
92 */ |
|
93 TAlarmState iState; |
|
94 |
|
95 /** |
|
96 * @var iMessage |
|
97 * @brief The message displayed when alarm expires. |
|
98 */ |
|
99 TAlarmMessage iMessage; |
|
100 |
|
101 /** |
|
102 * @var iSound |
|
103 * @brief The sound played upon expiry. |
|
104 */ |
|
105 TAlarmSoundName iSound; |
|
106 |
|
107 /** |
|
108 * @var iRepeat |
|
109 * @brief The repeat type of alarm. |
|
110 */ |
|
111 TAlarmRepeatDefinition iRepeat; |
|
112 |
|
113 /** |
|
114 * @var iCategory |
|
115 * @brief The alarm category. |
|
116 */ |
|
117 TAlarmCategory iCategory; |
|
118 |
|
119 /** |
|
120 * @var iOrigExpiryTime |
|
121 * @brief The original alarm expiry time, will be same as iAlarmTime. |
|
122 */ |
|
123 TTime iOrigExpiryTime; |
|
124 }; |
|
125 |
|
126 #endif // __CLK_COMMON_H__ |
|
127 |
|
128 // End of file |
|
129 |