|
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: Application class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <bautils.h> |
|
20 #include <aisystemuids.hrh> |
|
21 #include "application.h" |
|
22 #include "document.h" |
|
23 #include <coemain.h> |
|
24 #include <data_caging_path_literals.hrh> |
|
25 #include "debug.h" |
|
26 |
|
27 namespace AiXmlUiController { |
|
28 |
|
29 |
|
30 _LIT( KAiXmlUiResourceDrive, "z:" ); |
|
31 _LIT( KAiXmlUiResourceFile, "Ai3XmlUi.rsc" ); |
|
32 |
|
33 |
|
34 // ========== MEMBER FUNCTIONS ================================================ |
|
35 |
|
36 CApplication::CApplication(TUid aAppUid, CXmlUiController& aUiCtl) |
|
37 : CXnApplication(aAppUid), |
|
38 iUiCtl(aUiCtl) |
|
39 { |
|
40 } |
|
41 |
|
42 CApplication* CApplication::New(CXmlUiController& aUiCtl) |
|
43 { |
|
44 CApplication* self = NULL; |
|
45 |
|
46 __TIME("XML UI: Create Application", |
|
47 self = new CApplication(KUidXmlUiApp, aUiCtl); |
|
48 ) |
|
49 __HEAP("XML UI: Create Application"); |
|
50 |
|
51 return self; |
|
52 } |
|
53 |
|
54 CApplication::~CApplication() |
|
55 { |
|
56 } |
|
57 |
|
58 CApaDocument* CApplication::CreateDocumentL() |
|
59 { |
|
60 return CDocument::NewL(*this, iUiCtl); |
|
61 } |
|
62 |
|
63 TUid CApplication::AppDllUid() const |
|
64 { |
|
65 return KUidXmlUiApp; |
|
66 } |
|
67 |
|
68 TFileName CApplication::ResourceFileName() const |
|
69 { |
|
70 |
|
71 TFileName resFile; |
|
72 resFile.Append( KAiXmlUiResourceDrive ); |
|
73 resFile.Append( KDC_APP_RESOURCE_DIR ); |
|
74 resFile.Append( KAiXmlUiResourceFile ); |
|
75 BaflUtils::NearestLanguageFile( CCoeEnv::Static()->FsSession(), resFile ); |
|
76 |
|
77 return resFile; |
|
78 } |
|
79 |
|
80 } // namespace AiXmlUiController |