|
1 /* |
|
2 * Copyright (c) 2007 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: Application class for CameraApp |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "CamDocument.h" |
|
22 #include "CamAppUid.h" |
|
23 #include "CamApp.h" |
|
24 #include "CamLogger.h" |
|
25 #include "CamServer.h" |
|
26 |
|
27 #include "CamUtility.h" |
|
28 #include "OstTraceDefinitions.h" |
|
29 #ifdef OST_TRACE_COMPILER_IN_USE |
|
30 #include "CamAppTraces.h" |
|
31 #endif |
|
32 |
|
33 // ============================ MEMBER FUNCTIONS =============================== |
|
34 |
|
35 // ----------------------------------------------------------------------------- |
|
36 // CCamApp::AppDllUid |
|
37 // Return the UID for the application |
|
38 // ----------------------------------------------------------------------------- |
|
39 // |
|
40 TUid CCamApp::AppDllUid() const |
|
41 { |
|
42 return TUid::Uid( KCameraappUID ); |
|
43 } |
|
44 |
|
45 // ----------------------------------------------------------------------------- |
|
46 // CCamApp::CreateDocumentL |
|
47 // Create a CCamApp document, and return a pointer to it |
|
48 // ----------------------------------------------------------------------------- |
|
49 // |
|
50 CApaDocument* CCamApp::CreateDocumentL() |
|
51 { |
|
52 OstTrace0( CAMERAAPP_PERFORMANCE, CCAMAPP_CREATEDOCUMENTL, "e_CAM_APP_INIT 1" ); //CCORAPP_APP_INIT_START |
|
53 return CCamDocument::NewL( *this ); |
|
54 } |
|
55 |
|
56 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
57 |
|
58 |
|
59 #ifdef RD_APPS_TO_EXES |
|
60 |
|
61 #include <eikstart.h> |
|
62 |
|
63 |
|
64 // ----------------------------------------------------------------------------- |
|
65 // NewApplication() implements... |
|
66 // Create an application, and return a pointer to it |
|
67 // ----------------------------------------------------------------------------- |
|
68 // |
|
69 LOCAL_C CApaApplication* NewApplication() |
|
70 { |
|
71 return new CCamApp; |
|
72 } |
|
73 |
|
74 // ----------------------------------------------------------------------------- |
|
75 // E32Main() |
|
76 // Start the application |
|
77 // ----------------------------------------------------------------------------- |
|
78 // |
|
79 GLDEF_C TInt E32Main() |
|
80 { |
|
81 OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, _E32MAIN, "e_E32Main 1" ); |
|
82 TInt ret = EikStart::RunApplication(NewApplication); |
|
83 OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, DUP1__E32MAIN, "e_E32Main 0" ); |
|
84 return ret; |
|
85 } |
|
86 |
|
87 |
|
88 // ----------------------------------------------------------------------------- |
|
89 // CCamApp::NewAppServerL |
|
90 // Creates new file service application server. |
|
91 // ----------------------------------------------------------------------------- |
|
92 // |
|
93 void CCamApp::NewAppServerL( CApaAppServer*& aAppServer ) |
|
94 { |
|
95 #ifdef RD_PF_SEC_APPARC |
|
96 PRINT( _L( "Camcorder: NewAppServerL()" ) ); |
|
97 aAppServer = new (ELeave) CCamAppServer; |
|
98 #else |
|
99 aAppServer = 0; |
|
100 #endif |
|
101 } |
|
102 |
|
103 |
|
104 #else // !RD_APPS_TO_EXES |
|
105 |
|
106 |
|
107 // ----------------------------------------------------------------------------- |
|
108 // NewApplication() implements... |
|
109 // Create an application, and return a pointer to it |
|
110 // ----------------------------------------------------------------------------- |
|
111 // |
|
112 EXPORT_C CApaApplication* NewApplication() |
|
113 { |
|
114 return new CCamApp; |
|
115 } |
|
116 |
|
117 #endif // RD_APPS_TO_EXES |
|
118 |
|
119 // End of File |