Nokia N97 SDK
Example Applications Guide

MyViewApp.cpp

00001 
00002 /*
00003 * ==============================================================================
00004 *  Name        : MyViewApp.cpp
00005 *  Part of     : MyView
00006 *  Interface   :
00007 *  Description : Application class launches the application, DLL entry point
00008 *                is included here
00009 *  Version     :
00010 *
00011 *  Copyright (c) 2002 - 2007 Nokia Corporation.
00012 *  This material, including documentation and any related
00013 *  computer programs, is protected by copyright controlled by
00014 *  Nokia Corporation.
00015 * ==============================================================================
00016 */
00017 
00018 
00019 // INCLUDE FILES
00020 #include    "MyViewApp.h"
00021 #include    "MyViewDocument.h"
00022 
00023 #ifdef __SERIES60_3X__
00024     #include <eikstart.h>
00025 #endif
00026 
00027 // ================= MEMBER FUNCTIONS =======================
00028 
00029 // ---------------------------------------------------------
00030 // CMyViewApp::AppDllUid()
00031 // Returns application UID
00032 // ---------------------------------------------------------
00033 //
00034 TUid CMyViewApp::AppDllUid() const
00035     {
00036     return KUidMyView;
00037     }
00038 
00039    
00040 // ---------------------------------------------------------
00041 // CMyViewApp::CreateDocumentL()
00042 // Creates CMyViewDocument object
00043 // ---------------------------------------------------------
00044 //
00045 CApaDocument* CMyViewApp::CreateDocumentL()
00046     {
00047     return CMyViewDocument::NewL( *this );
00048     }
00049 
00050 // ================= OTHER EXPORTED FUNCTIONS ==============
00051 //
00052 // ---------------------------------------------------------
00053 // NewApplication() 
00054 // Constructs CMyViewApp
00055 // Returns: created application object
00056 // ---------------------------------------------------------
00057 //
00058 EXPORT_C CApaApplication* NewApplication()
00059     {
00060     return new CMyViewApp;
00061     }
00062 
00063 
00064 #ifdef __SERIES60_3X__  //////////// 3rd Ed
00065 
00066 // -----------------------------------------------------------------------------
00067 //      Entry point function for Symbian Apps (3rd Edition)
00068 //  Returns: System Wide error codes or KErrNone if all goes well
00069 // -----------------------------------------------------------------------------
00070 GLDEF_C TInt E32Main()
00071         {
00072         return EikStart::RunApplication( NewApplication );
00073         }
00074 
00075 #else /////////// 2nd Ed
00076 
00077 
00078 // ---------------------------------------------------------
00079 // E32Dll(TDllReason) 
00080 // Entry point function for EPOC Apps
00081 // Returns: KErrNone: No error
00082 // ---------------------------------------------------------
00083 //
00084 GLDEF_C TInt E32Dll( TDllReason )
00085     {
00086     return KErrNone;
00087     }
00088     
00089 #endif
00090     
00091 
00092 // End of File  
00093 

© Nokia 2009

Back to top