72
|
1 |
/*
|
|
2 |
* Copyright (c) 2006-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: View for DRMSettingsPlugin.
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
#ifndef DRMSETTINGSPLUGIN_H
|
|
20 |
#define DRMSETTINGSPLUGIN_H
|
|
21 |
|
|
22 |
// INCLUDES
|
|
23 |
#include <aknsettingpage.h>
|
|
24 |
#include <ConeResLoader.h>
|
|
25 |
#include <gsplugininterface.h>
|
|
26 |
#include <gsfwviewuids.h>
|
|
27 |
#include <gsbaseview.h>
|
|
28 |
#include <eikmenup.h>
|
|
29 |
|
|
30 |
#include "drmsettingsplugincontainer.h"
|
|
31 |
|
|
32 |
//CONSTANTS
|
|
33 |
const TUid KDRMSettingsPluginUid = { 0x1020750CC };
|
|
34 |
|
|
35 |
// Listbox item indexes of the transcaction tracking setting items
|
|
36 |
const TInt KDRMTTItemIndexDisabled = 1;
|
|
37 |
const TInt KDRMTTItemIndexEnabled = 0;
|
|
38 |
|
|
39 |
// Listbox item indexes of the automatic activation setting items
|
|
40 |
const TInt KDRMAAItemIndexDisabled = 1;
|
|
41 |
const TInt KDRMAAItemIndexEnabled = 0;
|
|
42 |
|
|
43 |
// FORWARD DECLARATIONS
|
|
44 |
class CAknViewAppUi;
|
|
45 |
class CDRMSettingsPluginContainer;
|
|
46 |
class CDRMSettingsModel;
|
|
47 |
|
|
48 |
// CLASS DECLARATION
|
|
49 |
|
|
50 |
/**
|
|
51 |
* CDRMSettingsPlugin view class
|
|
52 |
*
|
|
53 |
* View class for DRM Settings plugin
|
|
54 |
*/
|
|
55 |
class CDRMSettingsPlugin : public CGSBaseView
|
|
56 |
{
|
|
57 |
|
|
58 |
public: // Constructors and destructor
|
|
59 |
|
|
60 |
/**
|
|
61 |
* Symbian OS two-phased constructor
|
|
62 |
* @return connection view.
|
|
63 |
*/
|
|
64 |
static CDRMSettingsPlugin* NewL( TAny* aInitParams );
|
|
65 |
|
|
66 |
/**
|
|
67 |
* Destructor.
|
|
68 |
*/
|
|
69 |
~CDRMSettingsPlugin();
|
|
70 |
|
|
71 |
private:
|
|
72 |
/**
|
|
73 |
* Symbian OS default constructor.
|
|
74 |
*
|
|
75 |
*/
|
|
76 |
void ConstructL();
|
|
77 |
|
|
78 |
/**
|
|
79 |
* C++ default constructor.
|
|
80 |
*/
|
|
81 |
CDRMSettingsPlugin();
|
|
82 |
|
|
83 |
public: // from CAknView
|
|
84 |
|
|
85 |
/**
|
|
86 |
* Returns view id.
|
|
87 |
* @return An unsigned integer (view id).
|
|
88 |
*/
|
|
89 |
TUid Id() const;
|
|
90 |
|
|
91 |
public: // from MEikCommandObserver
|
|
92 |
|
|
93 |
/**
|
|
94 |
* Handles commands.
|
|
95 |
* @param aCommand Command to be handled.
|
|
96 |
*
|
|
97 |
*/
|
|
98 |
void HandleCommandL( TInt aCommand );
|
|
99 |
|
|
100 |
public: //new
|
|
101 |
|
|
102 |
/**
|
|
103 |
* Updates listbox's item's value.
|
|
104 |
* @param aItemId An item which is updated.
|
|
105 |
*
|
|
106 |
*/
|
|
107 |
void UpdateListBoxL( TInt aItemId );
|
|
108 |
|
|
109 |
public: // From CGSPluginInterface
|
|
110 |
|
|
111 |
/**
|
|
112 |
* @see CGSPluginInterface header file.
|
|
113 |
*/
|
|
114 |
void GetCaptionL( TDes& aCaption ) const;
|
|
115 |
|
|
116 |
/**
|
|
117 |
* @see CGSPluginInterface header file.
|
|
118 |
*/
|
|
119 |
TInt PluginProviderCategory() const;
|
|
120 |
|
|
121 |
/**
|
|
122 |
* @see CGSPluginInterface header file.
|
|
123 |
*/
|
|
124 |
TBool Visible() const;
|
|
125 |
|
|
126 |
private: // from CGSBaseView
|
|
127 |
//
|
|
128 |
void NewContainerL();
|
|
129 |
//
|
|
130 |
void HandleListBoxSelectionL();
|
|
131 |
|
|
132 |
private: // new
|
|
133 |
|
|
134 |
/**
|
|
135 |
* Update transaction tracking setting
|
|
136 |
*/
|
|
137 |
void UpdateTransactionTrackingSettingL( TBool aShowSettingPage );
|
|
138 |
|
|
139 |
/**
|
|
140 |
* Update automatic activation setting
|
|
141 |
*/
|
|
142 |
void UpdateAutomaticActivationSettingL( TBool aShowSettingPage );
|
|
143 |
|
|
144 |
/**
|
|
145 |
* Update usage reporting setting
|
|
146 |
*/
|
|
147 |
void UpdateUsageReportingSettingL();
|
|
148 |
|
|
149 |
/**
|
|
150 |
* Delete WMDRM license store
|
|
151 |
*/
|
|
152 |
void DoWMDRMLicenseDeletionL();
|
|
153 |
|
|
154 |
/**
|
|
155 |
* Display setting page
|
|
156 |
* @param aTTState Current state. This will be updated.
|
|
157 |
* @return ETrue if value is updated.
|
|
158 |
* EFalse if value is not updated.
|
|
159 |
*/
|
|
160 |
TBool ShowTransactionTrackingSettingPageL( TInt& aTTState );
|
|
161 |
|
|
162 |
/**
|
|
163 |
* Display setting page
|
|
164 |
* @param aAAState Current state. This will be updated.
|
|
165 |
* @return ETrue if value is updated.
|
|
166 |
* EFalse if value is not updated.
|
|
167 |
*/
|
|
168 |
TBool ShowAutomaticActivationSettingPageL( TInt& aAAState );
|
|
169 |
|
|
170 |
/**
|
|
171 |
* Get DRMSettingsPlugin's ccontainer.
|
|
172 |
*/
|
|
173 |
CDRMSettingsPluginContainer* Container();
|
|
174 |
|
|
175 |
protected: // From MEikMenuObserver
|
|
176 |
|
|
177 |
void DynInitMenuPaneL( TInt aResourceId, CEikMenuPane* aMenuPane );
|
|
178 |
|
|
179 |
private: // data
|
|
180 |
//resource loader
|
|
181 |
RConeResourceLoader iResourceLoader;
|
|
182 |
|
|
183 |
TBool iWmdrmSupported;
|
|
184 |
|
|
185 |
// Oma drm 2 run-time support
|
|
186 |
TBool iOmadrm2Supported;
|
|
187 |
|
|
188 |
};
|
|
189 |
|
|
190 |
#endif //DRMSETTINGSPLUGIN_H
|
|
191 |
|
|
192 |
// End of File
|
|
193 |
|