photosgallery/imgvwr/src/glxivwrapplication.cpp
changeset 1 9ba538e329bd
child 56 b023a8d2866a
equal deleted inserted replaced
0:4e91876724a2 1:9ba538e329bd
       
     1 /*
       
     2  * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of "Eclipse Public License v1.0"
       
     6  * which accompanies this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Nokia Corporation - initial contribution.
       
    11  *
       
    12  * Contributors:
       
    13  *
       
    14  * Description:    Symbian application class
       
    15  *
       
    16  */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #include "glxivwrapplication.h"
       
    22 
       
    23 #include <glxgallery.hrh>
       
    24 #include <glxlog.h>
       
    25 #include <glxtracer.h>
       
    26 
       
    27 #include "glxivwrdocument.h"
       
    28 
       
    29 // UID for the application, this should correspond to the uid defined in the mmp file
       
    30 static const TUid KUidGlxIvwrApp = {0x200104E7};
       
    31 
       
    32 // -----------------------------------------------------------------------------
       
    33 // CreateDocumentL
       
    34 // -----------------------------------------------------------------------------
       
    35 //
       
    36 CApaDocument* CGlxIVwrApplication::CreateDocumentL()
       
    37     {
       
    38     TRACER("CApaIVwrDocument* CGlxApplication::CreateDocumentL()");
       
    39     GLX_LOG_INFO("CGlxApplication::CreateDocumentL");
       
    40     // Create a Viewer document, and return a pointer to it
       
    41     CApaDocument* document = CGlxIVwrDocument::NewL(*this);
       
    42     return document;
       
    43     }
       
    44 
       
    45 // -----------------------------------------------------------------------------
       
    46 // AppDllUid
       
    47 // -----------------------------------------------------------------------------
       
    48 //
       
    49 TUid CGlxIVwrApplication::AppDllUid() const
       
    50 {
       
    51 // Return the UID for the Viewer application
       
    52 return KUidGlxIvwrApp;
       
    53 }
       
    54 
       
    55 #include <eikstart.h>
       
    56 
       
    57 #ifdef __UI_FRAMEWORKS_V2__
       
    58 
       
    59 // -----------------------------------------------------------------------------
       
    60 // NewApplication
       
    61 // -----------------------------------------------------------------------------
       
    62 //
       
    63 CApaApplication* NewApplication()
       
    64     {
       
    65     return new CGlxIVwrApplication;
       
    66     }
       
    67 
       
    68 // -----------------------------------------------------------------------------
       
    69 // E32Main
       
    70 // -----------------------------------------------------------------------------
       
    71 //
       
    72 TInt E32Main()
       
    73     {
       
    74     return EikStart::RunApplication(NewApplication);
       
    75     }
       
    76 
       
    77 ///////////////////////////////////////////////////////////////////////////////
       
    78 //
       
    79 // The following is required for wins on EKA1 (using the exedll target)
       
    80 //
       
    81 #if defined(__WINS__) && !defined(EKA2)
       
    82 EXPORT_C TInt WinsMain(TDesC* aCmdLine)
       
    83     {
       
    84     return EikStart::RunApplication(NewApplication, aCmdLine);
       
    85     }
       
    86 
       
    87 TInt E32Dll(TDllReason)
       
    88     {
       
    89     return KErrNone;
       
    90     }
       
    91 #endif
       
    92 
       
    93 #else // __UI_FRAMEWORKS_V2__
       
    94 
       
    95 // Create an application, and return a pointer to it
       
    96 EXPORT_C CApaApplication* NewApplication()
       
    97       {
       
    98       return new CGlxIVwrApplication;
       
    99       }
       
   100 
       
   101 // DLL entry point, return that everything is ok
       
   102 GLDEF_C TInt E32Dll(TDllReason)
       
   103     {
       
   104     return KErrNone;
       
   105     }
       
   106 
       
   107 #endif // __UI_FRAMEWORKS_V2__
       
   108