|
1 /* |
|
2 * Copyright (c) 2006-2006 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: Call state source context definition. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef PSSTATESOURCECONTEXTDEF_H |
|
21 #define PSSTATESOURCECONTEXTDEF_H |
|
22 |
|
23 // Context values definition array |
|
24 // Values in this array can be compared to descriptors: |
|
25 // @<code> |
|
26 // TBuf<10> buf = _L( "Value" ); |
|
27 // _LIT_CONTEXT_VALUES( KValues ) = |
|
28 // { |
|
29 // L"Value" |
|
30 // }; |
|
31 // if( buf == TPtrC( KValues[0] ) |
|
32 // { |
|
33 // // Do something |
|
34 // } |
|
35 // @</code> |
|
36 // |
|
37 #ifndef _LIT_CONTEXT_VALUES |
|
38 #define _LIT_CONTEXT_VALUES( x ) static const TText* const x[] |
|
39 #endif |
|
40 |
|
41 //------------------------------------------------------------------------------ |
|
42 // Application state source. |
|
43 // Defines application specific internal states like view state. |
|
44 // These contexts are mapped from P&S category: KPSStateSourceAppStatePSUid |
|
45 //------------------------------------------------------------------------------ |
|
46 // |
|
47 |
|
48 /** |
|
49 * Source: 'Application' |
|
50 * Specifies application specific internal states. |
|
51 */ |
|
52 _LIT( KPSAppStateSource, "Application" ); |
|
53 |
|
54 /** |
|
55 * Type: 'MusicPlayer.View' |
|
56 * Describes in which view Music player application currently is. |
|
57 * |
|
58 * Security: |
|
59 * - ECapabilitySwEvent |
|
60 * - ECapabilityUserEnvironment |
|
61 * |
|
62 * Values: |
|
63 * - 'Now' |
|
64 * - 'Other' |
|
65 */ |
|
66 _LIT( KPSAppStateTypeMusicPlayerView, "MusicPlayer.View" ); |
|
67 |
|
68 _LIT_SECURITY_POLICY_C2( KPSAppStateTypeMusicPlayerViewSecurity, |
|
69 ECapabilitySwEvent, |
|
70 ECapabilityUserEnvironment ); |
|
71 |
|
72 // Map these with KPSStateSourceAppStatePSMusicPlayerState |
|
73 // @see PSStateSourceAppStateDomainPSKeys.h |
|
74 const TInt KPSAppStateTypeMusicPlayerViewValueCount = 2; |
|
75 _LIT_CONTEXT_VALUES( KPSAppStateTypeMusicPlayerViewValues ) = |
|
76 { |
|
77 _S("Now"), |
|
78 _S("Other") |
|
79 }; |
|
80 |
|
81 /** |
|
82 * Type: 'Gallery.View' |
|
83 * Describes in which view Gallery application currently is. |
|
84 * |
|
85 * Security: |
|
86 * - ECapabilitySwEvent |
|
87 * - ECapabilityUserEnvironment |
|
88 * |
|
89 * Values: |
|
90 * - 'Image' |
|
91 * - 'Other' |
|
92 */ |
|
93 _LIT( KPSAppStateTypeGalleryView, "Gallery.View" ); |
|
94 |
|
95 _LIT_SECURITY_POLICY_C2( KPSAppStateTypeGalleryViewSecurity, |
|
96 ECapabilitySwEvent, |
|
97 ECapabilityUserEnvironment ); |
|
98 |
|
99 // Map these with KPSStateSourceAppStatePSGalleryState |
|
100 // @see PSStateSourceAppStateDomainPSKeys.h |
|
101 const TInt KPSAppStateTypeGalleryViewValueCount = 2; |
|
102 _LIT_CONTEXT_VALUES( KPSAppStateTypeGalleryViewValues ) = |
|
103 { |
|
104 _S("Image"), |
|
105 _S("Other") |
|
106 }; |
|
107 |
|
108 /** |
|
109 * Type: 'NGI.State' |
|
110 * Describes in NGI inside states. |
|
111 * |
|
112 * Security: |
|
113 * - ECapabilitySwEvent |
|
114 * - ECapabilityUserEnvironment |
|
115 * |
|
116 * Values: |
|
117 * - 'ForegroundLandscape' |
|
118 * - 'ForegroundLandscapeUpsideDown' |
|
119 * - 'ForegroundPortrait' |
|
120 * - 'Background' |
|
121 */ |
|
122 _LIT( KPSAppStateTypeNGIState, "NGI.State" ); |
|
123 |
|
124 _LIT_SECURITY_POLICY_C2( KPSAppStateTypeNGIStateSecurity, |
|
125 ECapabilitySwEvent, |
|
126 ECapabilityUserEnvironment ); |
|
127 |
|
128 // Map these with KPSStateSourceAppStatePSNGIState |
|
129 // @see PSStateSourceAppStateDomainPSKeys.h |
|
130 const TInt KPSAppStateTypeNGIStateValueCount = 4; |
|
131 _LIT_CONTEXT_VALUES( KPSAppStateTypeNGIStateValues ) = |
|
132 { |
|
133 _S("ForegroundLandscape"), |
|
134 _S("ForegroundLandscapeUpsideDown"), |
|
135 _S("ForegroundPortrait"), |
|
136 _S("Background") |
|
137 }; |
|
138 |
|
139 #endif |