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 // @ file 00015 // 00016 00017 00018 #include "AppHolder.h" 00019 #include "BitmapSprite.h" 00020 #include <eikstart.h> 00021 #include <gdi.h> 00022 00023 // 00024 // EXPORTed functions 00025 // 00026 00027 EXPORT_C CApaApplication* NewApplication() 00028 { 00029 return new CAppholderApplication; 00030 } 00031 00032 00038 extern TInt E32Main() 00039 { 00040 return EikStart::RunApplication(NewApplication); 00041 } 00042 00043 00045 // 00046 // Application class, CAppholderApplication 00047 // 00049 00050 TUid CAppholderApplication::AppDllUid() const 00051 { 00052 return KUidAppholder; 00053 } 00054 00055 CApaDocument* CAppholderApplication::CreateDocumentL() 00056 { 00057 // Construct the document using its NewL() function, rather 00058 // than using new(ELeave), because it requires two-phase 00059 // construction. 00060 return new (ELeave) CAppholderDocument(*this); 00061 } 00062 00063 00065 // 00066 // Document class, CAppholderDocument 00067 // 00069 00070 // C++ constructor 00071 CAppholderDocument::CAppholderDocument(CEikApplication& aApp) 00072 : CEikDocument(aApp) 00073 { 00074 } 00075 00076 CEikAppUi* CAppholderDocument::CreateAppUiL() 00077 { 00078 return new(ELeave) CAppholderAppUi; 00079 } 00080 00081 CAppholderDocument::~CAppholderDocument() 00082 { 00083 } 00084 00086 // 00087 // App UI class, CAppholderAppUi 00088 // 00090 00091 void CAppholderAppUi::ConstructL() 00092 { 00093 BaseConstructL(); 00094 iClient=CExampleWsClient::NewL(ClientRect()); 00095 } 00096 00097 CAppholderAppUi::~CAppholderAppUi() 00098 { 00099 delete iClient; 00100 } 00101 00102 void CAppholderAppUi::HandleCommandL(TInt aCommand) 00103 { 00104 switch (aCommand) 00105 { 00106 case EEikCmdExit: 00107 Exit(); 00108 break; 00109 } 00110 }
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.