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, DUP2__E32MAIN, "e_CAM_PRI_OFF_TO_ON 1" ); // Should be defined in DeviceModeHanlder/SysAp |
|
82 OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, _E32MAIN, "e_E32Main 1" ); |
|
83 TInt ret = EikStart::RunApplication(NewApplication); |
|
84 OstTrace0( CAMERAAPP_PERFORMANCE_DETAIL, DUP1__E32MAIN, "e_E32Main 0" ); |
|
85 return ret; |
|
86 } |
|
87 |
|
88 |
|
89 // ----------------------------------------------------------------------------- |
|
90 // CCamApp::NewAppServerL |
|
91 // Creates new file service application server. |
|
92 // ----------------------------------------------------------------------------- |
|
93 // |
|
94 void CCamApp::NewAppServerL( CApaAppServer*& aAppServer ) |
|
95 { |
|
96 #ifdef RD_PF_SEC_APPARC |
|
97 PRINT( _L( "Camcorder: NewAppServerL()" ) ); |
|
98 aAppServer = new (ELeave) CCamAppServer; |
|
99 #else |
|
100 aAppServer = 0; |
|
101 #endif |
|
102 } |
|
103 |
|
104 |
|
105 #else // !RD_APPS_TO_EXES |
|
106 |
|
107 |
|
108 // ----------------------------------------------------------------------------- |
|
109 // NewApplication() implements... |
|
110 // Create an application, and return a pointer to it |
|
111 // ----------------------------------------------------------------------------- |
|
112 // |
|
113 EXPORT_C CApaApplication* NewApplication() |
|
114 { |
|
115 return new CCamApp; |
|
116 } |
|
117 |
|
118 #endif // RD_APPS_TO_EXES |
|
119 |
|
120 // End of File |
|