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