From 2a93fb20b6618d44c05589bb636fe77b7b04e075 Mon Sep 17 00:00:00 2001 From: Marco Pesenti Gritti Date: Fri, 24 Oct 2003 10:56:53 +0000 Subject: Add an helper to initialize downloads. 2003-10-24 Marco Pesenti Gritti * embed/mozilla/MozDownload.cpp: * embed/mozilla/MozDownload.h: Add an helper to initialize downloads. * embed/ephy-embed-persist.h: Add a flag to ask destination. * embed/mozilla/EphyHeaderSniffer.cpp: * embed/mozilla/EphyHeaderSniffer.h: Use the helper. Add code to determine a good filename. * embed/mozilla/mozilla-embed-persist.cpp: Use a MozDownload directly if there is a dest set, it doesnt make sense to use sniffer for favicons. --- embed/mozilla/MozDownload.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'embed/mozilla/MozDownload.h') diff --git a/embed/mozilla/MozDownload.h b/embed/mozilla/MozDownload.h index 56b8e16e1..49f0e6cc9 100644 --- a/embed/mozilla/MozDownload.h +++ b/embed/mozilla/MozDownload.h @@ -44,7 +44,9 @@ #include "nsIWebProgressListener.h" #include "nsIHelperAppLauncherDialog.h" #include "nsIExternalHelperAppService.h" +#include "nsIDOMDocument.h" +#include "nsString.h" #include "nsIURI.h" #include "nsILocalFile.h" #include "nsIWebBrowserPersist.h" @@ -74,6 +76,11 @@ #define MOZ_DOWNLOAD_CLASSNAME "Ephy's Download Progress Dialog" +nsresult InitiateMozillaDownload (nsIDOMDocument *domDocument, nsIURI *sourceUri, + nsILocalFile* inDestFile, const char *contentType, + nsIURI* inOriginalURI, MozillaEmbedPersist *embedPersist, + PRBool bypassCache, nsIInputStream *postData); + class MozDownload : public nsIDownload, public nsIWebProgressListener { -- cgit v1.2.3