|
1 /* |
|
2 * Copyright (c) 2005-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: Phonebook 2 application class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "CPbk2Application.h" |
|
21 |
|
22 // Phonebook 2 |
|
23 #include "CPbk2Document.h" |
|
24 #include <Pbk2UID.h> |
|
25 |
|
26 // System includes |
|
27 #include <coemain.h> |
|
28 #include <eikstart.h> |
|
29 |
|
30 // Debugging headers |
|
31 #include <Pbk2Debug.h> |
|
32 #include <Pbk2Profile.h> |
|
33 |
|
34 |
|
35 /** |
|
36 * Creates and returns a new Phonebook 2 application object. |
|
37 * Called by the application framework. |
|
38 * Returns NULL if out of memory. |
|
39 * |
|
40 * @return Phonebook application object. |
|
41 */ |
|
42 EXPORT_C CApaApplication* NewApplication() |
|
43 { |
|
44 PBK2_PROFILE_START(Pbk2Profile::EFullStartup); |
|
45 return new CPbk2Application; |
|
46 } |
|
47 |
|
48 /** |
|
49 * Exe entry point (Phonebook2.exe). |
|
50 */ |
|
51 GLDEF_C TInt E32Main() |
|
52 { |
|
53 return EikStart::RunApplication(NewApplication); |
|
54 } |
|
55 |
|
56 |
|
57 // -------------------------------------------------------------------------- |
|
58 // CPbk2Application::CPbk2Application |
|
59 // -------------------------------------------------------------------------- |
|
60 // |
|
61 CPbk2Application::CPbk2Application() |
|
62 { |
|
63 } |
|
64 |
|
65 // -------------------------------------------------------------------------- |
|
66 // CPbk2Application::~CPbk2Application |
|
67 // -------------------------------------------------------------------------- |
|
68 // |
|
69 CPbk2Application::~CPbk2Application() |
|
70 { |
|
71 PBK2_PROFILE_DELETE(); |
|
72 } |
|
73 |
|
74 // -------------------------------------------------------------------------- |
|
75 // CPbk2Application::FsSession |
|
76 // -------------------------------------------------------------------------- |
|
77 // |
|
78 RFs& CPbk2Application::FsSession() |
|
79 { |
|
80 return iCoeEnv->FsSession(); |
|
81 } |
|
82 |
|
83 // -------------------------------------------------------------------------- |
|
84 // CPbk2Application::CoeEnv |
|
85 // -------------------------------------------------------------------------- |
|
86 // |
|
87 CCoeEnv& CPbk2Application::CoeEnv() |
|
88 { |
|
89 return *iCoeEnv; |
|
90 } |
|
91 |
|
92 // -------------------------------------------------------------------------- |
|
93 // CPbk2Application::CreateDocumentL |
|
94 // Creates and returns the Phonebook2 document object (CPbk2Document). |
|
95 // Called by the application framework. |
|
96 // -------------------------------------------------------------------------- |
|
97 // |
|
98 CApaDocument* CPbk2Application::CreateDocumentL() |
|
99 { |
|
100 return CPbk2Document::NewL( *this ); |
|
101 } |
|
102 |
|
103 // -------------------------------------------------------------------------- |
|
104 // CPbk2Application::AppDllUid |
|
105 // Returns the UID of this application. |
|
106 // -------------------------------------------------------------------------- |
|
107 // |
|
108 TUid CPbk2Application::AppDllUid() const |
|
109 { |
|
110 return TUid::Uid(KPbk2UID3); |
|
111 } |
|
112 |
|
113 // End of File |