00001 00002 // INCLUDE FILES 00003 #include <msvapi.h> // CMsvOperation, CMsvEntry 00004 #include <msvuids.h> // Msgs Uids 00005 #include "txtviewerdoc.h" // CTxtViewerDocument 00006 #include "txtviewerappui.h" // CTxtViewerAppUi 00007 #include "txtviewerappview.h" 00008 // ================= MEMBER FUNCTIONS ======================= 00009 00010 // C++ constructor can NOT contain any code, that 00011 // might leave. 00012 // 00013 CTxtViewerDocument::CTxtViewerDocument( 00014 CEikApplication& aApp): CEikDocument(aApp) 00015 00016 { 00017 } 00018 00019 00020 void CTxtViewerDocument::ConstructL() 00021 { 00022 // No implementation required 00023 } 00024 00025 // Two-phased constructor. 00026 CTxtViewerDocument* CTxtViewerDocument::NewL( 00027 CEikApplication& aApp) 00028 { 00029 CTxtViewerDocument* sed = new (ELeave) CTxtViewerDocument(aApp); 00030 CleanupStack::PushL(sed); 00031 sed->ConstructL(); 00032 CleanupStack::Pop(); 00033 return sed; 00034 } 00035 00036 // Destructor 00037 CTxtViewerDocument::~CTxtViewerDocument() 00038 { 00039 } 00040 00041 // --------------------------------------------------------- 00042 // CTxtViewerDocument::CreateAppUiL 00043 // (other items were commented in a header). 00044 // --------------------------------------------------------- 00045 CEikAppUi* CTxtViewerDocument::CreateAppUiL() 00046 { 00047 return new ( ELeave ) CTxtViewerAppUi; 00048 } 00049 00050 void CTxtViewerDocument::SetId(TMsvId aId) 00051 { 00052 iId = aId; 00053 00054 } 00055 00056 TMsvId CTxtViewerDocument::Id() 00057 { 00058 return iId; 00059 } 00060 00061 00062 00063 void CTxtViewerDocument::SetOpenedForEditing(TBool aOpenedForEditing) 00064 { 00065 iOpenedForEditing=aOpenedForEditing; 00066 } 00067 TBool CTxtViewerDocument::OpenedForEditing() 00068 { 00069 return iOpenedForEditing; 00070 } 00071 00072 void CTxtViewerDocument::SetMessage(const RMessage2 aMessage) 00073 { 00074 iMessage=aMessage; 00075 } 00076 RMessage2 CTxtViewerDocument::Message() 00077 { 00078 return iMessage; 00079 } 00080 00081 void CTxtViewerDocument::InitializeL() 00082 { 00083 00084 00085 iAppView->Notify(); 00086 } 00087 void CTxtViewerDocument::SetView(CTxtViewerAppView* aView) 00088 { 00089 iAppView = aView; 00090 } 00091
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.