|
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 the License "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 * Browser document class |
|
16 * |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef __BROWSERAPPDOCUMENT_H |
|
22 #define __BROWSERAPPDOCUMENT_H |
|
23 |
|
24 #include "BrowserOverriddenSettings.h" |
|
25 #include "BrowserUtil.h" |
|
26 #include <akndoc.h> |
|
27 |
|
28 //CONSTANTS |
|
29 _LIT( KAttachment,"c:\\system\\temp\\Attachment.html"); |
|
30 _LIT( KMailerStoreUid,"1000484b"); |
|
31 |
|
32 class MDownloadedContentHandler; |
|
33 |
|
34 // CAknDocument |
|
35 class CBrowserAppDocument : public CAknDocument |
|
36 { |
|
37 public: |
|
38 CBrowserAppDocument(CEikApplication& aApp); |
|
39 virtual ~CBrowserAppDocument(); |
|
40 |
|
41 inline void SetFolderToOpen(TInt aFolderId) { iFolderToOpen = aFolderId; } |
|
42 |
|
43 /** |
|
44 * Set the MDownloadedContentHandler implementation. |
|
45 * @param aObserver The implementation. |
|
46 * @return None. |
|
47 */ |
|
48 inline void SetDownloadedContentHandler(MDownloadedContentHandler *aObserver); |
|
49 |
|
50 inline void SetIsContentHandlerRegistered( TBool aIsContentHandlerRegistered ) |
|
51 { iIsContentHandlerRegistered = aIsContentHandlerRegistered; } |
|
52 |
|
53 inline TBool IsContentHandlerRegistered() const |
|
54 { return iIsContentHandlerRegistered; }; |
|
55 |
|
56 TInt GetFolderToOpen() const; |
|
57 |
|
58 HBufC* GetUrlToOpen() const; |
|
59 |
|
60 MDownloadedContentHandler *GetDownloadedContentHandler() const; |
|
61 |
|
62 CFileStore* OpenFileL(TBool aDoOpen, const TDesC& aFileName, RFs& aFs); |
|
63 |
|
64 void OpenFileL(CFileStore*& aFileStore, RFile& aFile); |
|
65 |
|
66 TBrowserOverriddenSettings* GetOverriddenSettings(); |
|
67 |
|
68 inline void SetOverriddenSettings(TBrowserOverriddenSettings* aSettings){ iOverriddenSettings = aSettings; }; |
|
69 |
|
70 protected: |
|
71 CEikAppUi* CreateAppUiL(); |
|
72 |
|
73 private: |
|
74 MDownloadedContentHandler *iDownloadedContentHandler; |
|
75 TInt iFolderToOpen; |
|
76 TBool iIsContentHandlerRegistered; |
|
77 HBufC* iUrlToOpen; |
|
78 TBrowserOverriddenSettings* iOverriddenSettings; |
|
79 }; |
|
80 |
|
81 #include "BrowserAppDocument.inl" |
|
82 |
|
83 #endif |