1 /* |
|
2 * Copyright (c) 2009 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 * |
|
16 */ |
|
17 |
|
18 |
|
19 // INCLUDE FILES |
|
20 #include "FBDocument.h" |
|
21 #include "FBAppUi.h" |
|
22 #include "FBModel.h" |
|
23 |
|
24 // ================= MEMBER FUNCTIONS ======================= |
|
25 |
|
26 // constructor |
|
27 CFileBrowserDocument::CFileBrowserDocument(CEikApplication& aApp) |
|
28 : CAknDocument(aApp) |
|
29 { |
|
30 } |
|
31 |
|
32 // destructor |
|
33 CFileBrowserDocument::~CFileBrowserDocument() |
|
34 { |
|
35 delete iModel; |
|
36 } |
|
37 |
|
38 // EPOC default constructor can leave. |
|
39 void CFileBrowserDocument::ConstructL() |
|
40 { |
|
41 iModel = CFileBrowserModel::NewL(); |
|
42 } |
|
43 |
|
44 // Two-phased constructor. |
|
45 CFileBrowserDocument* CFileBrowserDocument::NewL( |
|
46 CEikApplication& aApp) // CFileBrowserApp reference |
|
47 { |
|
48 CFileBrowserDocument* self = new (ELeave) CFileBrowserDocument( aApp ); |
|
49 CleanupStack::PushL( self ); |
|
50 self->ConstructL(); |
|
51 CleanupStack::Pop(); |
|
52 |
|
53 return self; |
|
54 } |
|
55 |
|
56 // ---------------------------------------------------- |
|
57 // CFileBrowserDocument::CreateAppUiL() |
|
58 // constructs CFileBrowserAppUi |
|
59 // ---------------------------------------------------- |
|
60 // |
|
61 CEikAppUi* CFileBrowserDocument::CreateAppUiL() |
|
62 { |
|
63 return new (ELeave) CFileBrowserAppUi; |
|
64 } |
|
65 |
|
66 // ---------------------------------------------------- |
|
67 // CFileBrowserDocument::OpenFileL |
|
68 // Overrides CAknDocument::OpenFileL to support document file |
|
69 // ---------------------------------------------------- |
|
70 // |
|
71 CFileStore* CFileBrowserDocument::OpenFileL(TBool aDoOpen,const TDesC& aFilename,RFs& aFs) |
|
72 { |
|
73 return CEikDocument::OpenFileL(aDoOpen, aFilename, aFs); |
|
74 } |
|
75 |
|
76 |
|
77 // ---------------------------------------------------- |
|
78 |
|
79 CFileBrowserModel* CFileBrowserDocument::Model() |
|
80 { |
|
81 return iModel; |
|
82 } |
|
83 |
|
84 // ---------------------------------------------------- |
|
85 |
|
86 // End of File |
|