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: Implements the document for application. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "hsbrowserdocument.h" |
|
22 #include "hsbrowserappui.h" |
|
23 #include "hsbrowsermodel.h" |
|
24 #include "am_debug.h" |
|
25 |
|
26 // ================= MEMBER FUNCTIONS ======================= |
|
27 |
|
28 // ---------------------------------------------------- |
|
29 // CHsBrowserDocument::CHsBrowserDocument |
|
30 // ---------------------------------------------------- |
|
31 // |
|
32 CHsBrowserDocument::CHsBrowserDocument( CEikApplication& aApp ) |
|
33 : CAknDocument(aApp), iModel( NULL ) |
|
34 { |
|
35 } |
|
36 |
|
37 // ---------------------------------------------------- |
|
38 // CHsBrowserDocument::~CHsBrowserDocument |
|
39 // ---------------------------------------------------- |
|
40 // |
|
41 CHsBrowserDocument::~CHsBrowserDocument() |
|
42 { |
|
43 DEBUG( "CHsBrowserDocument::~CHsBrowserDocument()" ); |
|
44 if ( iModel ) |
|
45 { |
|
46 delete iModel; |
|
47 } |
|
48 } |
|
49 |
|
50 // ---------------------------------------------------- |
|
51 // CHsBrowserDocument::ConstructL |
|
52 // ---------------------------------------------------- |
|
53 // |
|
54 void CHsBrowserDocument::ConstructL() |
|
55 { |
|
56 DEBUG( "CHsBrowserDocument::ConstructL()" ); |
|
57 iModel = CHsBrowserModel::NewL(); |
|
58 } |
|
59 |
|
60 // ---------------------------------------------------- |
|
61 // CHsBrowserDocument::NewL |
|
62 // ---------------------------------------------------- |
|
63 // |
|
64 CHsBrowserDocument* CHsBrowserDocument::NewL( |
|
65 CEikApplication& aApp) |
|
66 { |
|
67 CHsBrowserDocument* self = new (ELeave) CHsBrowserDocument( aApp ); |
|
68 CleanupStack::PushL( self ); |
|
69 self->ConstructL(); |
|
70 CleanupStack::Pop( self ); |
|
71 |
|
72 return self; |
|
73 } |
|
74 |
|
75 // ---------------------------------------------------- |
|
76 // CHsBrowserDocument::CreateAppUiL() |
|
77 // constructs CBrCtlSampleAppUi |
|
78 // ---------------------------------------------------- |
|
79 // |
|
80 CEikAppUi* CHsBrowserDocument::CreateAppUiL() |
|
81 { |
|
82 return new (ELeave) CHsBrowserAppUi; |
|
83 } |
|
84 |
|
85 // End of File |
|