photosgallery/gallery/src/glxapplication.cpp
changeset 0 4e91876724a2
equal deleted inserted replaced
-1:000000000000 0:4e91876724a2
       
     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 "glxapplication.h"
       
    22 
       
    23 #include <glxgallery.hrh>
       
    24 #include <glxlog.h>
       
    25 
       
    26 #include "glxdocument.h"
       
    27  
       
    28 // UID for the application, this should correspond to the uid defined in the mmp file
       
    29 static const TUid KUidGlxApp = {KGlxGalleryApplicationUid};
       
    30 
       
    31 // -----------------------------------------------------------------------------
       
    32 // CreateDocumentL
       
    33 // -----------------------------------------------------------------------------
       
    34 //
       
    35 CApaDocument* CGlxApplication::CreateDocumentL()
       
    36     {  
       
    37     GLX_LOG_INFO("CGlxApplication::CreateDocumentL");
       
    38     // Create a Viewer document, and return a pointer to it
       
    39     CApaDocument* document = CGlxDocument::NewL(*this);
       
    40     return document;
       
    41     }
       
    42 
       
    43 // -----------------------------------------------------------------------------
       
    44 // AppDllUid
       
    45 // -----------------------------------------------------------------------------
       
    46 //
       
    47 TUid CGlxApplication::AppDllUid() const
       
    48     {
       
    49     // Return the UID for the Viewer application
       
    50     return KUidGlxApp;
       
    51     }
       
    52 
       
    53 #include <eikstart.h>
       
    54  
       
    55 #ifdef __UI_FRAMEWORKS_V2__
       
    56 
       
    57 // -----------------------------------------------------------------------------
       
    58 // NewApplication
       
    59 // -----------------------------------------------------------------------------
       
    60 //
       
    61 CApaApplication* NewApplication()
       
    62 	{
       
    63 	return new CGlxApplication;
       
    64 	}
       
    65 
       
    66 // -----------------------------------------------------------------------------
       
    67 // E32Main
       
    68 // -----------------------------------------------------------------------------
       
    69 //
       
    70 TInt E32Main()
       
    71 	{
       
    72 	return EikStart::RunApplication(NewApplication);
       
    73 	}
       
    74 
       
    75 ///////////////////////////////////////////////////////////////////////////////
       
    76 //
       
    77 // The following is required for wins on EKA1 (using the exedll target)
       
    78 //
       
    79 #if defined(__WINS__) && !defined(EKA2)
       
    80 EXPORT_C TInt WinsMain(TDesC* aCmdLine)
       
    81 	{
       
    82 	return EikStart::RunApplication(NewApplication, aCmdLine);
       
    83 	}
       
    84 
       
    85 TInt E32Dll(TDllReason)
       
    86 	{
       
    87 	return KErrNone;
       
    88 	}
       
    89 #endif
       
    90 
       
    91 #else // __UI_FRAMEWORKS_V2__
       
    92 
       
    93 // Create an application, and return a pointer to it
       
    94 EXPORT_C CApaApplication* NewApplication()
       
    95   {
       
    96   return new CGlxApplication;
       
    97   }
       
    98 
       
    99 // DLL entry point, return that everything is ok
       
   100 GLDEF_C TInt E32Dll(TDllReason)
       
   101   {
       
   102   return KErrNone;
       
   103   }
       
   104 
       
   105 #endif // __UI_FRAMEWORKS_V2__
       
   106