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