browserui/browser/BrowserAppInc/BrowserAppDocument.h
changeset 0 84ad3b177aa3
child 24 868cceedabd3
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/browserui/browser/BrowserAppInc/BrowserAppDocument.h	Mon Mar 30 12:49:49 2009 +0300
@@ -0,0 +1,83 @@
+/*
+* Copyright (c) 2002 Nokia Corporation and/or its subsidiary(-ies).
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "Eclipse Public License v1.0"
+* which accompanies this distribution, and is available
+* at the URL "http://www.eclipse.org/legal/epl-v10.html".
+*
+* Initial Contributors:
+* Nokia Corporation - initial contribution.
+*
+* Contributors:
+*
+* Description: 
+*     Browser document class
+*     
+*
+*/
+
+
+#ifndef __BROWSERAPPDOCUMENT_H
+#define __BROWSERAPPDOCUMENT_H
+
+#include "BrowserOverriddenSettings.h"
+#include "BrowserUtil.h"
+#include <akndoc.h>
+
+//CONSTANTS
+_LIT( KAttachment,"c:\\system\\temp\\Attachment.html");
+_LIT( KMailerStoreUid,"1000484b");
+
+class MDownloadedContentHandler;
+
+// CAknDocument
+class CBrowserAppDocument : public CAknDocument
+{
+public:
+    CBrowserAppDocument(CEikApplication& aApp);
+	virtual ~CBrowserAppDocument();
+
+    inline void SetFolderToOpen(TInt aFolderId) { iFolderToOpen = aFolderId; }
+
+    /**
+    * Set the MDownloadedContentHandler implementation.
+    * @param aObserver The implementation.
+    * @return None.
+    */
+    inline void SetDownloadedContentHandler(MDownloadedContentHandler *aObserver);
+
+    inline void SetIsContentHandlerRegistered( TBool aIsContentHandlerRegistered ) 
+    	{ iIsContentHandlerRegistered = aIsContentHandlerRegistered; }
+    
+    inline TBool IsContentHandlerRegistered() const 
+    	{ return iIsContentHandlerRegistered; };
+
+    TInt GetFolderToOpen() const;
+
+    HBufC* GetUrlToOpen() const;
+
+    MDownloadedContentHandler *GetDownloadedContentHandler() const;
+    
+    CFileStore* OpenFileL(TBool aDoOpen, const TDesC& aFileName, RFs& aFs);
+
+    void OpenFileL(CFileStore*& aFileStore, RFile& aFile);
+	    
+    TBrowserOverriddenSettings* GetOverriddenSettings();
+
+    inline void SetOverriddenSettings(TBrowserOverriddenSettings* aSettings){ iOverriddenSettings = aSettings; };
+
+protected:
+	CEikAppUi* CreateAppUiL();
+
+private:
+    MDownloadedContentHandler *iDownloadedContentHandler;
+    TInt iFolderToOpen;
+    TBool iIsContentHandlerRegistered;
+    HBufC* iUrlToOpen;
+    TBrowserOverriddenSettings* iOverriddenSettings;
+};
+
+#include "BrowserAppDocument.inl"
+
+#endif
\ No newline at end of file