1 /* |
|
2 * Copyright (c) 2003-2009 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: DRM Encryption tool. |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef DRMENCRYPTOR_H |
|
19 #define DRMENCRYPTOR_H |
|
20 |
|
21 #include <QtGui/QDialog> |
|
22 #include <QDateTimeEdit> |
|
23 #include <QPushButton> |
|
24 #include <QDateTimeEdit> |
|
25 #include <QMainWindow> |
|
26 #include <QMenuBar> |
|
27 #include <QAction> |
|
28 #include <QHBoxLayout> |
|
29 #include <wmdrmagent.h> |
|
30 #include <caf/manager.h> |
|
31 |
|
32 /*namespace Ui |
|
33 { |
|
34 class mainWindow; |
|
35 class QPushButton; |
|
36 }*/ |
|
37 |
|
38 //forward declarations |
|
39 class DateTimeDialog; |
|
40 |
|
41 class DRMEncryptor : public QMainWindow |
|
42 { |
|
43 Q_OBJECT |
|
44 |
|
45 public: |
|
46 DRMEncryptor(); |
|
47 ~DRMEncryptor(); |
|
48 |
|
49 private: |
|
50 void ProcessMessageL(const TDesC& aFile, const TDesC& aOutput); |
|
51 //ContentAccess::CManager* GetCafDataL( ContentAccess::TAgent& aAgent ); |
|
52 void DeleteWmDrmRdbL(); |
|
53 |
|
54 |
|
55 signals: |
|
56 |
|
57 private slots: |
|
58 void onTextChanged(const QString &); |
|
59 void setDRMClock(); |
|
60 void getDRMClock(); |
|
61 void startEncrypt(); |
|
62 void deleteWmDrmDB(); |
|
63 void deleteOmaDrmDB(); |
|
64 void launchBrowser(); |
|
65 TUint EncryptL(TUint& aEncryptedCount, TUint& aRightsCount, TUint& aMessagesProcessed); |
|
66 |
|
67 //void onDateTimeChanged(const QDateTime & datetime ); |
|
68 |
|
69 private: |
|
70 QMenu *iOptionsMenu; |
|
71 QPushButton *iSetDRMClockButton; |
|
72 |
|
73 // Menu options |
|
74 QAction *iSetDRMClockAct; |
|
75 QAction *iGetDRMClockAct; |
|
76 QAction *iEncryptAct; |
|
77 QAction *iDeleteWMDRMDBAct; |
|
78 QAction *iDeleteOMADRMDBAct; |
|
79 QAction *iLaunchBrowserAct; |
|
80 |
|
81 DateTimeDialog *iDateTimeDialog; |
|
82 QDateTime iDatetime; |
|
83 }; |
|
84 |
|
85 class DateTimeDialog : public QDialog |
|
86 { |
|
87 Q_OBJECT |
|
88 |
|
89 public: |
|
90 DateTimeDialog(); |
|
91 ~DateTimeDialog(); |
|
92 |
|
93 private slots: |
|
94 void setDRMClock(); |
|
95 |
|
96 private: |
|
97 QHBoxLayout *iLayout; |
|
98 QDateTimeEdit *iDateEdit; |
|
99 /*QDateTimeEdit *iDateEdit; |
|
100 QPushButton *iOkButton; |
|
101 QPushButton *iCancelButton;*/ |
|
102 |
|
103 }; |
|
104 |
|
105 |
|
106 #endif // DRMENCRYPTOR_H |
|