|
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: Implementation of CDRMRightsMgrDocument class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include <aiwgenericparam.h> |
|
21 #include <genericparamconsumer.h> |
|
22 |
|
23 #include "drmrightsmgrdocument.h" |
|
24 #include "drmrightsmgrappui.h" |
|
25 #include "drmcommonutilities.h" |
|
26 |
|
27 #include "drmuilogger.h" |
|
28 |
|
29 |
|
30 // ================= MEMBER FUNCTIONS ======================= |
|
31 // |
|
32 // ----------------------------------------------------------------------------- |
|
33 // CDRMRightsMgrDocument::CDRMRightsMgrDocument |
|
34 // ----------------------------------------------------------------------------- |
|
35 // |
|
36 CDRMRightsMgrDocument::CDRMRightsMgrDocument( CEikApplication& aApp ) |
|
37 : CAiwGenericParamConsumer( aApp ) |
|
38 { |
|
39 } |
|
40 |
|
41 |
|
42 // ---------------------------------------------------- |
|
43 // CDRMRightsMgrDocument::~CDRMRightsMgrDocument |
|
44 // ---------------------------------------------------- |
|
45 // |
|
46 CDRMRightsMgrDocument::~CDRMRightsMgrDocument() |
|
47 { |
|
48 } |
|
49 |
|
50 |
|
51 // ---------------------------------------------------------- |
|
52 // CDRMRightsMgrDocument::ConstructL |
|
53 // --------------------------------------------------------- |
|
54 // |
|
55 void CDRMRightsMgrDocument::ConstructL() |
|
56 { |
|
57 CLOG_CREATE |
|
58 } |
|
59 |
|
60 |
|
61 // ----------------------------------------------------------------------------- |
|
62 // CDRMRightsMgrDocument* CDRMRightsMgrDocument::NewL |
|
63 // ----------------------------------------------------------------------------- |
|
64 // |
|
65 CDRMRightsMgrDocument* CDRMRightsMgrDocument::NewL( CEikApplication& aApp ) |
|
66 { |
|
67 CDRMRightsMgrDocument* self = new( ELeave )CDRMRightsMgrDocument( aApp ); |
|
68 CleanupStack::PushL( self ); |
|
69 self->ConstructL(); |
|
70 CleanupStack::Pop( self ); |
|
71 |
|
72 return self; |
|
73 } |
|
74 |
|
75 |
|
76 // ---------------------------------------------------- |
|
77 // CDRMRightsMgrDocument::CreateAppUiL |
|
78 // ---------------------------------------------------- |
|
79 // |
|
80 CEikAppUi* CDRMRightsMgrDocument::CreateAppUiL() |
|
81 { |
|
82 return new( ELeave )CDRMRightsMgrAppUi(); |
|
83 } |
|
84 |
|
85 |
|
86 // ---------------------------------------------------- |
|
87 // CDRMRightsMgrDocument::OpenFileL |
|
88 // ---------------------------------------------------- |
|
89 // |
|
90 CFileStore* CDRMRightsMgrDocument::OpenFileL( TBool aDoOpen, |
|
91 const TDesC& /*aParams*/, |
|
92 RFs& /*aFs*/ ) |
|
93 { |
|
94 if ( aDoOpen ) |
|
95 { |
|
96 TLex lex; |
|
97 |
|
98 TPtrC filename; |
|
99 const CAiwGenericParamList* paramList = GetInputParameters(); |
|
100 if ( paramList ) |
|
101 { |
|
102 TInt index = 0; |
|
103 const TAiwGenericParam* param = NULL; |
|
104 param = paramList->FindFirst( index, EGenericParamFile, |
|
105 EVariantTypeDesC ); |
|
106 if ( index >= 0 && param ) |
|
107 { |
|
108 lex = param->Value().AsDes(); |
|
109 } |
|
110 } |
|
111 |
|
112 CDRMRightsMgrAppUi& appUi = |
|
113 *static_cast<CDRMRightsMgrAppUi*>( iAppUi ); |
|
114 DRMCommonUtilities::ParseParametersAndStartL( lex, ETrue, appUi ); |
|
115 } |
|
116 |
|
117 return NULL; |
|
118 } |
|
119 |
|
120 |
|
121 // End of File |