--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/commondrm/drmrightsmanagerui/src/DRMRightsMgrDocument.cpp Thu Dec 17 08:52:27 2009 +0200
@@ -0,0 +1,121 @@
+/*
+* Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: Implementation of CDRMRightsMgrDocument class
+*
+*/
+
+
+// INCLUDE FILES
+#include <aiwgenericparam.h>
+#include <genericparamconsumer.h>
+
+#include "drmrightsmgrdocument.h"
+#include "drmrightsmgrappui.h"
+#include "drmcommonutilities.h"
+
+#include "drmuilogger.h"
+
+
+// ================= MEMBER FUNCTIONS =======================
+//
+// -----------------------------------------------------------------------------
+// CDRMRightsMgrDocument::CDRMRightsMgrDocument
+// -----------------------------------------------------------------------------
+//
+CDRMRightsMgrDocument::CDRMRightsMgrDocument( CEikApplication& aApp )
+: CAiwGenericParamConsumer( aApp )
+ {
+ }
+
+
+// ----------------------------------------------------
+// CDRMRightsMgrDocument::~CDRMRightsMgrDocument
+// ----------------------------------------------------
+//
+CDRMRightsMgrDocument::~CDRMRightsMgrDocument()
+ {
+ }
+
+
+// ----------------------------------------------------------
+// CDRMRightsMgrDocument::ConstructL
+// ---------------------------------------------------------
+//
+void CDRMRightsMgrDocument::ConstructL()
+ {
+ CLOG_CREATE
+ }
+
+
+// -----------------------------------------------------------------------------
+// CDRMRightsMgrDocument* CDRMRightsMgrDocument::NewL
+// -----------------------------------------------------------------------------
+//
+CDRMRightsMgrDocument* CDRMRightsMgrDocument::NewL( CEikApplication& aApp )
+ {
+ CDRMRightsMgrDocument* self = new( ELeave )CDRMRightsMgrDocument( aApp );
+ CleanupStack::PushL( self );
+ self->ConstructL();
+ CleanupStack::Pop( self );
+
+ return self;
+ }
+
+
+// ----------------------------------------------------
+// CDRMRightsMgrDocument::CreateAppUiL
+// ----------------------------------------------------
+//
+CEikAppUi* CDRMRightsMgrDocument::CreateAppUiL()
+ {
+ return new( ELeave )CDRMRightsMgrAppUi();
+ }
+
+
+// ----------------------------------------------------
+// CDRMRightsMgrDocument::OpenFileL
+// ----------------------------------------------------
+//
+CFileStore* CDRMRightsMgrDocument::OpenFileL( TBool aDoOpen,
+ const TDesC& /*aParams*/,
+ RFs& /*aFs*/ )
+ {
+ if ( aDoOpen )
+ {
+ TLex lex;
+
+ TPtrC filename;
+ const CAiwGenericParamList* paramList = GetInputParameters();
+ if ( paramList )
+ {
+ TInt index = 0;
+ const TAiwGenericParam* param = NULL;
+ param = paramList->FindFirst( index, EGenericParamFile,
+ EVariantTypeDesC );
+ if ( index >= 0 && param )
+ {
+ lex = param->Value().AsDes();
+ }
+ }
+
+ CDRMRightsMgrAppUi& appUi =
+ *static_cast<CDRMRightsMgrAppUi*>( iAppUi );
+ DRMCommonUtilities::ParseParametersAndStartL( lex, ETrue, appUi );
+ }
+
+ return NULL;
+ }
+
+
+// End of File