S60 3rd Edition SDK for Symbian OS
Example Applications Guide

SIPExApp.cpp

00001 /*
00002 * ==============================================================================
00003 *  Name        : SIPExApp.cpp
00004 *  Part of     : SIPEx
00005 *  Interface   : 
00006 *  Description : 
00007 *  Version     : 
00008 *
00009 *  Copyright (c) 2004-2006 Nokia Corporation.
00010 *  This material, including documentation and any related 
00011 *  computer programs, is protected by copyright controlled by 
00012 *  Nokia Corporation.
00013 * ==============================================================================
00014 */
00015 
00016 // INCLUDE FILES
00017 
00018 #include    "SIPExApp.h"
00019 #include    "SIPExDoc.h"
00020 
00021 #ifdef EKA2
00022 #include <eikstart.h>
00023 #endif
00024 
00025     
00026 // ============================ MEMBER FUNCTIONS ===============================
00027 
00028 // -----------------------------------------------------------------------------
00029 // CSIPExApp::CreateDocumentL
00030 // Creates a document and returns a pointer to it
00031 // -----------------------------------------------------------------------------
00032 //
00033 CApaDocument* CSIPExApp::CreateDocumentL()
00034     {      
00035     CApaDocument* document = CSIPExDoc::NewL( *this );
00036     return document;
00037     }
00038 
00039 // -----------------------------------------------------------------------------
00040 // CSIPExApp::AppDllUid
00041 // Returns the UID for the SIPEx application
00042 // -----------------------------------------------------------------------------
00043 //
00044 TUid CSIPExApp::AppDllUid() const
00045     {
00046     // Return the UID for the SIP Example game application
00047     return KUidSIPExApp;
00048     }
00049 
00050 // ========================== OTHER EXPORTED FUNCTIONS =========================
00051 
00052 // -----------------------------------------------------------------------------
00053 // NewApplication() implements the creation of the application class
00054 // Creates an application, and return a pointer to it
00055 // Returns: CApaApplication*: Pointer to the application class instance
00056 // -----------------------------------------------------------------------------
00057 //
00058 EXPORT_C CApaApplication* NewApplication() 
00059     {
00060     CApaApplication* app = new CSIPExApp;
00061     return app;
00062     }
00063 
00064 #ifdef EKA2
00065 
00066 // -----------------------------------------------------------------------------
00067 // E32Main() is the entry point to the application DLL in application 
00068 // framework V2
00069 // Returns: TInt:   Error if starting the app trough framework wasn't succesful
00070 // -----------------------------------------------------------------------------
00071 //
00072 GLDEF_C TInt E32Main()
00073     {
00074     return EikStart::RunApplication( NewApplication );
00075     }
00076     
00077 #else
00078 
00079 // -----------------------------------------------------------------------------
00080 // E32Dll() is the entry point to the application DLL
00081 // DLL entry point in EKA1
00082 // Returns: TInt:   Always KErrNone
00083 // -----------------------------------------------------------------------------
00084 //
00085 GLDEF_C TInt E32Dll( TDllReason /*aReason*/ )
00086     {
00087     return KErrNone;
00088     }
00089     
00090 #endif // EKA2
00091 
00092 
00093 // End of file
00094 

© Nokia 2006

Back to top