57 /** |
57 /** |
58 * Creates a new CDrmUtilityUI object and returns a pointer to it |
58 * Creates a new CDrmUtilityUI object and returns a pointer to it |
59 * |
59 * |
60 * @return A functional CDrmUtilityUI -object |
60 * @return A functional CDrmUtilityUI -object |
61 * @leave System wide error code |
61 * @leave System wide error code |
62 */ |
62 */ |
63 IMPORT_C static CDrmUtilityUI* NewL( CCoeEnv* aCoeEnv = NULL ); |
63 IMPORT_C static CDrmUtilityUI* NewL( CCoeEnv* aCoeEnv = NULL ); |
64 |
64 |
65 /** |
65 /** |
66 * Creates a new CDrmUtilityUI object and returns a pointer to it |
66 * Creates a new CDrmUtilityUI object and returns a pointer to it |
67 * leaves the returned object to the cleanup stack |
67 * leaves the returned object to the cleanup stack |
68 * |
68 * |
69 * @return A functional CDrmUtilityUI -object |
69 * @return A functional CDrmUtilityUI -object |
70 * @leave System wide error code |
70 * @leave System wide error code |
71 */ |
71 */ |
72 IMPORT_C static CDrmUtilityUI* NewLC( CCoeEnv* aCoeEnv = NULL ); |
72 IMPORT_C static CDrmUtilityUI* NewLC( CCoeEnv* aCoeEnv = NULL ); |
73 |
73 |
74 /** |
74 /** |
75 * Destructor |
75 * Destructor |
76 */ |
76 */ |
77 virtual ~CDrmUtilityUI(); |
77 virtual ~CDrmUtilityUI(); |
78 |
78 |
79 /** |
79 /** |
80 * Display query dialog |
80 * Display query dialog |
81 */ |
81 */ |
82 IMPORT_C TInt DisplayQueryWithIdL( TInt aTextResourceId, |
82 IMPORT_C TInt DisplayQueryWithIdL( TInt aTextResourceId, |
83 TInt aQueryResourceId ); |
83 TInt aQueryResourceId ); |
84 |
84 |
85 IMPORT_C TInt DisplayQueryWithIdValueL( TInt aTextResourceId, |
85 IMPORT_C TInt DisplayQueryWithIdValueL( TInt aTextResourceId, |
86 TInt aQueryResourceId, |
86 TInt aQueryResourceId, |
87 const TDesC& aString ); |
87 const TDesC& aString ); |
88 |
88 |
89 IMPORT_C TInt DisplayQueryL( TInt aTextResourceId, TInt aValue ); |
89 IMPORT_C TInt DisplayQueryL( TInt aTextResourceId, TInt aValue ); |
90 |
90 |
91 IMPORT_C TInt DisplayQueryL( TInt aTextResourceId, const TDesC& aString ); |
91 IMPORT_C TInt DisplayQueryL( TInt aTextResourceId, const TDesC& aString ); |
92 |
92 |
93 IMPORT_C TInt DisplayQueryL( TInt aTextResourceId, |
93 IMPORT_C TInt DisplayQueryL( TInt aTextResourceId, |
94 const TDesC& aString, |
94 const TDesC& aString, |
95 TInt aValue, |
95 TInt aValue, |
96 TInt aStringPos = -1, |
96 TInt aStringPos = -1, |
97 TInt aValuePos = -1 ); |
97 TInt aValuePos = -1 ); |
98 |
98 |
99 IMPORT_C TInt DisplayQueryL( TDesC& aPromptText, TInt aQueryResourceId ); |
99 IMPORT_C TInt DisplayQueryL( TDesC& aPromptText, TInt aQueryResourceId ); |
100 |
100 |
101 IMPORT_C TInt SetAutomatedQueryL( CDRMConstraint* aConstraint ); |
101 IMPORT_C TInt SetAutomatedQueryL( CDRMConstraint* aConstraint ); |
102 |
102 |
103 /** |
103 /** |
104 * Display note |
104 * Display note |
105 */ |
105 */ |
106 IMPORT_C void ShowFutureRightsNoteL( CDRMConstraint* aConstraint ); |
106 IMPORT_C void ShowFutureRightsNoteL( CDRMConstraint* aConstraint ); |
107 |
107 |
108 IMPORT_C void DisplayNoteL( TInt aTextResourceId ); |
108 IMPORT_C void DisplayNoteL( TInt aTextResourceId ); |
109 |
109 |
110 IMPORT_C void DisplayNoteL( TInt aTextResourceId, const TDesC& aString ); |
110 IMPORT_C void DisplayNoteL( TInt aTextResourceId, const TDesC& aString ); |
111 |
111 |
112 IMPORT_C void DisplayNoteL( TInt aTextResourceId, TInt aValue ); |
112 IMPORT_C void DisplayNoteL( TInt aTextResourceId, TInt aValue ); |
113 |
113 |
114 IMPORT_C void DisplayNoteL( TDesC& aPromptText, |
114 IMPORT_C void DisplayNoteL( TDesC& aPromptText, |
115 TInt aResourceId, |
115 TInt aResourceId, |
116 const TDesC& aString = KNullDesC, |
116 const TDesC& aString = KNullDesC, |
117 TInt aValue = -1 ); |
117 TInt aValue = -1 ); |
118 |
118 |
119 /** |
119 /** |
120 * Display list query |
120 * Display list query |
121 */ |
121 */ |
122 IMPORT_C TInt DisplayPopupWindowsForPreviewL( |
122 IMPORT_C TInt DisplayPopupWindowsForPreviewL( |
123 ContentAccess::CData& aContent, |
123 ContentAccess::CData& aContent, |
124 TInt aPreviewType, |
124 TInt aPreviewType, |
125 TInt aMediaType ); |
125 TInt aMediaType ); |
126 |
126 |
127 |
127 |
128 protected: |
128 protected: |
129 |
129 |
130 private: |
130 private: |
131 |
131 |
132 CDrmUtilityUI( CCoeEnv* aCoeEnv ); |
132 CDrmUtilityUI( CCoeEnv* aCoeEnv ); |
133 |
133 |
134 void ConstructL(); |
134 void ConstructL(); |
135 |
135 |
136 CAknResourceNoteDialog* CreateNoteForResourceL( TInt aResId ); |
136 CAknResourceNoteDialog* CreateNoteForResourceL( TInt aResId ); |
137 |
137 |
138 TAknGlobalNoteType GlobalNoteTypeForResource( TInt aResId ); |
138 TAknGlobalNoteType GlobalNoteTypeForResource( TInt aResId ); |
139 |
139 |
140 TInt GetOmaStartTime( CDRMConstraint* aConstraint, TTime& aStartTime ); |
140 TInt GetOmaStartTime( CDRMConstraint* aConstraint, TTime& aStartTime ); |
141 |
141 |
142 TInt EvaluatePreviewMediaTypeL( ContentAccess::CData& aContent, |
142 TInt EvaluatePreviewMediaTypeL( ContentAccess::CData& aContent, |
143 TInt aPreviewType ); |
143 TInt aPreviewType ); |
144 |
144 |
145 void PrepareSecondaryDisplayL( CEikDialog& aDialog, |
145 void PrepareSecondaryDisplayL( CEikDialog& aDialog, |
146 TInt aResourceId, |
146 TInt aResourceId, |
147 const TDesC& aString = KNullDesC, |
147 const TDesC& aString = KNullDesC, |
148 TInt aValue = -1 ); |
148 TInt aValue = -1 ); |
149 |
149 |
150 void CancelSecondaryDisplayL( TInt aResourceId ); |
150 void CancelSecondaryDisplayL( TInt aResourceId ); |
151 |
151 |
152 |
152 |
153 private: // Data members |
153 private: // Data members |
154 |
154 |
155 // Control environment, not owned |
155 // Control environment, not owned |
156 CCoeEnv* iCoeEnv; |
156 CCoeEnv* iCoeEnv; |
157 |
157 |
158 // Paths of the resource files |
158 // Paths of the resource files |
159 HBufC* iUtilityResourceFile; |
159 HBufC* iUtilityResourceFile; |
160 HBufC* iAvkonResourceFile; |
160 HBufC* iAvkonResourceFile; |
161 |
161 |
162 // Resource offsets in CoeEnv, when it is available |
162 // Resource offsets in CoeEnv, when it is available |