00001 // 00002 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). 00003 // All rights reserved. 00004 // This component and the accompanying materials are made available 00005 // under the terms of the License "Eclipse Public License v1.0" 00006 // which accompanies this distribution, and is available 00007 // at the URL "http://www.eclipse.org/legal/epl-v10.html". 00008 // 00009 // Initial Contributors: 00010 // Nokia Corporation - initial contribution. 00011 // 00012 // Contributors: 00013 // 00014 // Description: 00015 // 00016 00017 #include "OandXApplication.h" 00018 #include "OandXAppUi.h" 00019 #include "OandXDocument.h" 00020 00021 COandXDocument* COandXDocument::NewL(CEikApplication& aApp) 00030 { 00031 COandXDocument* self = new(ELeave) COandXDocument(aApp); 00032 return self; 00033 } 00034 00035 COandXDocument::COandXDocument(CEikApplication& aApp) 00044 : CAknDocument(aApp) 00045 { 00046 // empty. 00047 } 00048 00049 COandXDocument::~COandXDocument() 00054 { 00055 // empty. 00056 } 00057 00058 CEikAppUi* COandXDocument::CreateAppUiL() 00066 { 00067 iAppUi = new (ELeave) COandXAppUi; 00068 return iAppUi; 00069 } 00070 00071 void COandXDocument::StoreL(CStreamStore& aStore,CStreamDictionary& aStreamDic) const 00080 { 00081 TStreamId id = iAppUi->StoreL(aStore); 00082 aStreamDic.AssignL(KUidOandXApp, id); 00083 } 00084 00085 void COandXDocument::RestoreL(const CStreamStore& aStore,const CStreamDictionary& aStreamDic) 00093 { 00094 TStreamId id = aStreamDic.At(KUidOandXApp); 00095 iAppUi->RestoreL(aStore, id); 00096 } 00097 00098 CFileStore* COandXDocument::OpenFileL(TBool aDoOpen,const TDesC& aFilename,RFs& aFs) 00109 { 00110 return CEikDocument::OpenFileL(aDoOpen,aFilename,aFs); 00111 }