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: The document class for Profiles application. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "CProfileDocument.h" |
|
21 |
|
22 #include <featmgr.h> |
|
23 #include <CProfileEngineHandler.h> |
|
24 #include <CProfileIndexHandler.h> |
|
25 |
|
26 #include "CProfileAppUi.h" |
|
27 |
|
28 // ============================ MEMBER FUNCTIONS =============================== |
|
29 |
|
30 // ----------------------------------------------------------------------------- |
|
31 // CProfileDocument::CProfileDocument |
|
32 // C++ constructor can NOT contain any code, that might leave. |
|
33 // ----------------------------------------------------------------------------- |
|
34 // |
|
35 CProfileDocument::CProfileDocument( CEikApplication& aApp ) |
|
36 : CAknDocument( aApp ) |
|
37 { |
|
38 } |
|
39 |
|
40 // ----------------------------------------------------------------------------- |
|
41 // CProfileDocument::ConstructL |
|
42 // Symbian 2nd phase constructor can leave. |
|
43 // ----------------------------------------------------------------------------- |
|
44 // |
|
45 void CProfileDocument::ConstructL() |
|
46 { |
|
47 FeatureManager::InitializeLibL(); |
|
48 iEngineHandler = CProfileEngineHandler::NewL(); |
|
49 iIndexHandler = CProfileIndexHandler::NewL( *iEngineHandler ); |
|
50 } |
|
51 |
|
52 // ----------------------------------------------------------------------------- |
|
53 // CProfileDocument::NewL |
|
54 // Two-phased constructor. |
|
55 // ----------------------------------------------------------------------------- |
|
56 // |
|
57 CProfileDocument* CProfileDocument::NewL( CEikApplication& aApp ) |
|
58 { |
|
59 CProfileDocument* self = new( ELeave ) CProfileDocument( aApp ); |
|
60 CleanupStack::PushL( self ); |
|
61 self->ConstructL(); |
|
62 CleanupStack::Pop( self ); |
|
63 return self; |
|
64 } |
|
65 |
|
66 // Destructor |
|
67 CProfileDocument::~CProfileDocument() |
|
68 { |
|
69 delete iIndexHandler; |
|
70 delete iEngineHandler; |
|
71 FeatureManager::UnInitializeLib(); |
|
72 } |
|
73 |
|
74 // ----------------------------------------------------------------------------- |
|
75 // CProfileDocument::CreateAppUiL |
|
76 // ----------------------------------------------------------------------------- |
|
77 // |
|
78 CEikAppUi* CProfileDocument::CreateAppUiL() |
|
79 { |
|
80 return new( ELeave ) CProfileAppUi( *iEngineHandler, *iIndexHandler ); |
|
81 } |
|
82 |
|
83 // End of File |
|