00001 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). 00002 // All rights reserved. 00003 // This component and the accompanying materials are made available 00004 // under the terms of "Eclipse Public License v1.0" 00005 // which accompanies this distribution, and is available 00006 // at the URL "http://www.eclipse.org/legal/epl-v10.html". 00007 // 00008 // Initial Contributors: 00009 // Nokia Corporation - initial contribution. 00010 // 00011 // Contributors: 00012 // 00013 // Description: 00014 // 00015 00016 00017 #include "AppHolder.h" 00018 #include "Ordinal.h" 00019 #include <eikstart.h> 00020 00021 // 00022 // EXPORTed functions 00023 // 00024 00025 EXPORT_C CApaApplication* NewApplication() 00026 { 00027 return new CAppholderApplication; 00028 } 00029 00030 00031 extern TInt E32Main() 00032 { 00033 return EikStart::RunApplication(NewApplication); 00034 } 00035 00036 00037 00039 // 00040 // Application class, CAppholderApplication 00041 // 00043 00044 TUid CAppholderApplication::AppDllUid() const 00045 { 00046 return KUidAppholder; 00047 } 00048 00049 CApaDocument* CAppholderApplication::CreateDocumentL() 00050 { 00051 // Construct the document using its NewL() function, rather 00052 // than using new(ELeave), because it requires two-phase 00053 // construction. 00054 return new (ELeave) CAppholderDocument(*this); 00055 } 00056 00057 00059 // 00060 // Document class, CAppholderDocument 00061 // 00063 00064 // C++ constructor 00065 CAppholderDocument::CAppholderDocument(CEikApplication& aApp) 00066 : CEikDocument(aApp) 00067 { 00068 } 00069 00070 CEikAppUi* CAppholderDocument::CreateAppUiL() 00071 { 00072 return new(ELeave) CAppholderAppUi; 00073 } 00074 00075 CAppholderDocument::~CAppholderDocument() 00076 { 00077 } 00078 00080 // 00081 // App UI class, CAppholderAppUi 00082 // 00084 00085 void CAppholderAppUi::ConstructL() 00086 { 00087 BaseConstructL(); 00088 iClient=CExampleWsClient::NewL(ClientRect()); 00089 } 00090 00091 CAppholderAppUi::~CAppholderAppUi() 00092 { 00093 delete iClient; 00094 } 00095 00096 void CAppholderAppUi::HandleCommandL(TInt aCommand) 00097 { 00098 switch (aCommand) 00099 { 00100 case EEikCmdExit: 00101 Exit(); 00102 break; 00103 } 00104 }
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.