|
1 /* |
|
2 * Copyright (c) 2002 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: |
|
15 * Provides Phonebook Application class methods. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "CPbkApplication.h" |
|
22 #include <coemain.h> |
|
23 #include <eikstart.h> |
|
24 #include "CPbkDocument.h" |
|
25 #include "PbkUID.h" |
|
26 |
|
27 #include <pbkdebug.h> |
|
28 #include "PbkProfiling.h" |
|
29 |
|
30 |
|
31 // ================= MEMBER FUNCTIONS ======================= |
|
32 |
|
33 RFs& CPbkApplication::FsSession() |
|
34 { |
|
35 return iCoeEnv->FsSession(); |
|
36 } |
|
37 |
|
38 CCoeEnv& CPbkApplication::CoeEnv() |
|
39 { |
|
40 return *iCoeEnv; |
|
41 } |
|
42 |
|
43 /** |
|
44 * Destructor. |
|
45 */ |
|
46 CPbkApplication::~CPbkApplication() |
|
47 { |
|
48 } |
|
49 |
|
50 /** |
|
51 * Creates the Phonebook document object (CPbkDocument). |
|
52 * Called by the application framework. |
|
53 * |
|
54 * @return New Phonebook document object (CPbkDocument). |
|
55 */ |
|
56 CApaDocument* CPbkApplication::CreateDocumentL() |
|
57 { |
|
58 return CPbkDocument::NewL(*this); |
|
59 } |
|
60 |
|
61 /** |
|
62 * Returns the UID of this application. |
|
63 */ |
|
64 TUid CPbkApplication::AppDllUid() const |
|
65 { |
|
66 return TUid::Uid(KPbkUID3); |
|
67 } |
|
68 |
|
69 |
|
70 // OTHER EXPORTED FUNCTIONS |
|
71 //============================================================================= |
|
72 |
|
73 /** |
|
74 * Creates a new Phonebook application object (CPbkApplication). |
|
75 * Called by the application framework. |
|
76 * @return The new application object (CPbkApplication). |
|
77 * NULL if out of memory. |
|
78 */ |
|
79 EXPORT_C CApaApplication* NewApplication() |
|
80 { |
|
81 // Reset all performance profiles |
|
82 #ifdef PBK_ENABLE_PROFILE |
|
83 for (TInt bin = 0; bin < PbkProfiling::KEndProfileBins; ++bin) |
|
84 { |
|
85 __PBK_PROFILE_RESET(bin); |
|
86 } |
|
87 #endif // PBK_ENABLE_PROFILE |
|
88 |
|
89 // Ending this profile is in CPbkNamesListAppView::HandleContactViewListControlEventL |
|
90 __PBK_PROFILE_START(PbkProfiling::EFullStartup); |
|
91 // Ending this profile is in CPbkAppUi::ConstructL |
|
92 __PBK_PROFILE_START(PbkProfiling::EBeforeAppUiConstruction); |
|
93 |
|
94 return new CPbkApplication; |
|
95 } |
|
96 |
|
97 /** |
|
98 * Exe entry point (Phonebook.exe). |
|
99 */ |
|
100 GLDEF_C TInt E32Main() |
|
101 { |
|
102 return EikStart::RunApplication(NewApplication); |
|
103 } |
|
104 |
|
105 // End of File |