31
|
1 |
/*
|
|
2 |
* Copyright (c) 2007 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: Enumerations and constants used in the DRM Utility
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef DRMUTILITYTYPES_H
|
|
20 |
#define DRMUTILITYTYPES_H
|
|
21 |
|
|
22 |
namespace DRM
|
|
23 |
{
|
|
24 |
|
|
25 |
/*** Names:
|
|
26 |
|
|
27 |
EAU = Automated usage
|
|
28 |
EUH = UI handling
|
|
29 |
ERI = Rights Info
|
|
30 |
EU = Utility / Common
|
|
31 |
|
|
32 |
***/
|
|
33 |
|
|
34 |
|
|
35 |
/** Automated usage types */
|
|
36 |
enum TDrmAutomatedType
|
|
37 |
{
|
|
38 |
//This is a new type
|
|
39 |
EAUAutomatedTypeVideoRingingTone,
|
|
40 |
//These are from TDRMHelperAutomatedType
|
|
41 |
EAUAutomatedTypeRingingTone,
|
|
42 |
EAUAutomatedTypeMessageAlert,
|
|
43 |
EAUAutomatedTypeEmailAlert,
|
|
44 |
EAUAutomatedTypeIMAlert,
|
|
45 |
EAUAutomatedTypeCalendarAlarm,
|
|
46 |
EAUAutomatedTypeScreenSaver,
|
|
47 |
EAUAutomatedTypeWallpaper,
|
|
48 |
EAUAutomatedTypeTheme,
|
|
49 |
EAUAutomatedTypeClockAlarm,
|
|
50 |
EAUAutomatedTypeOther = KMaxTUint8
|
|
51 |
};
|
|
52 |
|
|
53 |
|
|
54 |
/**
|
|
55 |
* Automated service types
|
|
56 |
* EAUActive registering application listens to expiry notifications
|
|
57 |
* EAUPassive registering application does not listen to expiry
|
|
58 |
* notifications
|
|
59 |
*/
|
|
60 |
enum TDrmAutomatedServiceType
|
|
61 |
{
|
|
62 |
EAUPassive = 0,
|
|
63 |
EAUActive
|
|
64 |
};
|
|
65 |
|
|
66 |
|
|
67 |
|
|
68 |
/** Automated usage events */
|
|
69 |
enum TAutomatedUsageEvent
|
|
70 |
{
|
|
71 |
EAUAutomatedContentSetOK = 0, // Content was successfully
|
|
72 |
// set as automated
|
|
73 |
EAUAutomatedContentExpired = 1, // Automated content was
|
|
74 |
// expired, remove from use
|
|
75 |
EAUAutomatedContentIdleAfterExpired = 2, // idle was activated, remove
|
|
76 |
// from automated usage.
|
|
77 |
EAUxxx = 3
|
|
78 |
};
|
|
79 |
|
|
80 |
/** Return code to indicate how to proceed */
|
|
81 |
enum TAutomatedUsageAction
|
|
82 |
{
|
|
83 |
EAUActionIgnore = KErrNotFound, // Nothing to be done.
|
|
84 |
EAUActionDefault = 0, // DRM Utility performs default
|
|
85 |
// handling
|
|
86 |
EAUActionRightsAquisition = 1, // Purchase new rights for the
|
|
87 |
// automated content
|
|
88 |
EAUActionClientHandles = 2 // client takes care of everything.
|
|
89 |
};
|
|
90 |
|
|
91 |
|
|
92 |
/**
|
|
93 |
* Return code to indicate how to proceed when embedded preview is
|
|
94 |
* available
|
|
95 |
*/
|
|
96 |
enum TEmbeddedPreviewAction
|
|
97 |
{
|
|
98 |
EUEmbeddedPreviewActionDefault, // < DRM Utility asks if user wants
|
|
99 |
// to play preview or acquire new
|
|
100 |
// rights
|
|
101 |
EUEmbeddedPreviewActionDefaultAudio, // < DRM Utility asks if user wants
|
|
102 |
// to play preview or acquire new
|
|
103 |
// rights for audio
|
|
104 |
EUEmbeddedPreviewActionDefaultVideo, // < DRM Utility asks if user wants
|
|
105 |
// to play preview or acquire new
|
|
106 |
// rights for video
|
|
107 |
EUEmbeddedPreviewActionFetchRights, // < DRM Utility acquires new
|
|
108 |
// rights, no query shown
|
|
109 |
EUEmbeddedPreviewActionPlayPreview, // < Observer takes care of playing
|
|
110 |
// preview
|
|
111 |
EUEmbeddedPreviewActionIgnore // < Nothing to be done.
|
|
112 |
};
|
|
113 |
|
|
114 |
/**
|
|
115 |
* Return code to indicate how to proceed when preview rights are
|
|
116 |
* available
|
|
117 |
*/
|
|
118 |
enum TPreviewRightsAction
|
|
119 |
{
|
|
120 |
EUPreviewRightsActionDefault, // < DRM Utility asks if user wants
|
|
121 |
// to acquire preview rights or
|
|
122 |
// normal rights and acquires them
|
|
123 |
EUPreviewRightsActionDefaultAudio, // < DRM Utility asks if user wants
|
|
124 |
// to acquire preview rights or
|
|
125 |
// normal rights for audio and
|
|
126 |
// acquires them
|
|
127 |
EUPreviewRightsActionDefaultVideo, // < DRM Utility asks if user wants
|
|
128 |
// to acquire preview rights or
|
|
129 |
// normal rights for video and
|
|
130 |
// acquires them
|
|
131 |
EUPreviewRightsActionFetchRights, // < DRM Utility acquires normal
|
|
132 |
// rights, no query shown
|
|
133 |
EUPreviewRightsActionFetchPreviewRights, // < Observer acquires
|
|
134 |
// preview rights
|
|
135 |
EUPreviewRightsActionIgnore // < Nothing to be done
|
|
136 |
};
|
|
137 |
|
|
138 |
/**
|
|
139 |
* Return code to indicate how to proceed when silent rights are
|
|
140 |
* available
|
|
141 |
*/
|
|
142 |
enum TSilentRightsAction
|
|
143 |
{
|
|
144 |
EUSilentRightsActionDefault, // < DRM Utility performs the
|
|
145 |
// default silent rights
|
|
146 |
// handling
|
|
147 |
EUSilentRightsActionFetchRights, // < DRM Utility acquires normal
|
|
148 |
// rights
|
|
149 |
EUSilentRightsActionFetchSilentRights, // < Observer acquires silent
|
|
150 |
// rights
|
|
151 |
EUSilentRightsActionIgnore // < Nothing to be done
|
|
152 |
};
|
|
153 |
|
|
154 |
/**
|
|
155 |
* Return code to indicate how to proceed when rights are
|
|
156 |
* available
|
|
157 |
*/
|
|
158 |
enum TRightsAction
|
|
159 |
{
|
|
160 |
EURightsActionDefault, // < DRM Utility performs the default
|
|
161 |
// rights handling
|
|
162 |
EURightsActionFetchRights, // < DRM Utility acquires normal rights
|
|
163 |
EURightsActionIgnore // < Nothing to be done
|
|
164 |
};
|
|
165 |
|
|
166 |
/**
|
|
167 |
* Information about rights status
|
|
168 |
*/
|
|
169 |
enum TDrmRightsInfo
|
|
170 |
{
|
|
171 |
EURightsInfoValid = 0,
|
|
172 |
EURightsInfoExpired = 1,
|
|
173 |
EURightsInfoMissing = 2,
|
|
174 |
EURightsInfoFuture = 3,
|
|
175 |
};
|
|
176 |
|
|
177 |
|
|
178 |
|
|
179 |
/** Return code to indicate how to proceed */
|
|
180 |
enum TCheckRightsAction
|
|
181 |
{
|
|
182 |
EUHCheckRightsActionDefault, // < DRM Utility performs the
|
|
183 |
// default handling
|
|
184 |
EUHCheckRightsActionOpenDetailsView, // < Details view is opened, no
|
|
185 |
// notes shown by DRM Utility
|
|
186 |
EUHCheckRightsActionAcquireNewRights, // < New rights are acquired, no
|
|
187 |
// notes shown by DRM Utility
|
|
188 |
EUHCheckRightsActionAcquirePreviewRights, // < Preview rights are
|
|
189 |
// acquired, no notes shown
|
|
190 |
// by DRM Utility
|
|
191 |
EUHCheckRightsActionIgnore // < DRM Utility does not do
|
|
192 |
// anything and stops the
|
|
193 |
// operation
|
|
194 |
};
|
|
195 |
|
|
196 |
/** Reason why rights are not valid */
|
|
197 |
enum TCheckRightsStatus
|
|
198 |
{
|
|
199 |
EUHCheckRightsExpiredRights, // < Rights have been expired
|
|
200 |
EUHCheckRightsNoRights, // < No rights at all
|
|
201 |
EUHCheckRightsFutureRights // < Rights will become valid in future
|
|
202 |
};
|
|
203 |
|
|
204 |
|
|
205 |
/** Url types for HandleUrl */
|
|
206 |
enum TDrmUiUrlType
|
|
207 |
{
|
|
208 |
EUHRightsIssuerUrl = 0x00000001,
|
|
209 |
EUHPreviewRightsUrl = 0x00000002,
|
|
210 |
EUHSilentRightsUrl = 0x00000004,
|
|
211 |
EUHInfoUrl = 0x00000008,
|
|
212 |
EUHDomainRiUrl = 0x00000010
|
|
213 |
};
|
|
214 |
|
|
215 |
/** Protection status of the drm content */
|
|
216 |
enum TDrmProtectionStatus
|
|
217 |
{
|
|
218 |
EUUnknown = KErrUnknown,
|
|
219 |
EUUnprotected = 0,
|
|
220 |
EUProtected = 1
|
|
221 |
};
|
|
222 |
|
|
223 |
|
|
224 |
// Rejection reason
|
|
225 |
enum TRejectionType
|
|
226 |
{
|
|
227 |
EURejectionNone = 0x00000000,
|
|
228 |
EURejectionStartTime = 0x00000001,
|
|
229 |
EURejectionEndTime = 0x00000002,
|
|
230 |
EURejectionInterval = 0x00000004,
|
|
231 |
EURejectionCounter = 0x00000008,
|
|
232 |
EURejectionTopLevel = 0x00000010,
|
|
233 |
EURejectionTimedCounter = 0x00000020,
|
|
234 |
EURejectionAccumulated = 0x00000040,
|
|
235 |
EURejectionIndividual = 0x00000080,
|
|
236 |
EURejectionSystem = 0x00000100,
|
|
237 |
EURejectionVendor = 0x00000200,
|
|
238 |
EURejectionSoftware = 0x00000400,
|
|
239 |
EURejectionMetering = 0x00000800,
|
|
240 |
EURejectionDrmTime = 0x10000000
|
|
241 |
};
|
|
242 |
|
|
243 |
}
|
|
244 |
|
|
245 |
#endif // DRMUTILITYTYPES_H
|