aboutsummaryrefslogtreecommitdiffstats
path: root/embed/mozilla/MozDownload.h
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-01-06 04:48:47 +0800
committerChristian Persch <chpe@src.gnome.org>2005-01-06 04:48:47 +0800
commit1bb2458bbd832096bb10d850524c560129224b46 (patch)
tree88fc19b5bacfe02b7de2be652d7d265dc9f7c2c8 /embed/mozilla/MozDownload.h
parenta5d0e720fade615d0009a42d38b195a2db57b959 (diff)
downloadgsoc2013-epiphany-1bb2458bbd832096bb10d850524c560129224b46.tar
gsoc2013-epiphany-1bb2458bbd832096bb10d850524c560129224b46.tar.gz
gsoc2013-epiphany-1bb2458bbd832096bb10d850524c560129224b46.tar.bz2
gsoc2013-epiphany-1bb2458bbd832096bb10d850524c560129224b46.tar.lz
gsoc2013-epiphany-1bb2458bbd832096bb10d850524c560129224b46.tar.xz
gsoc2013-epiphany-1bb2458bbd832096bb10d850524c560129224b46.tar.zst
gsoc2013-epiphany-1bb2458bbd832096bb10d850524c560129224b46.zip
Only implement nsITransfer if possible.
2005-01-05 Christian Persch <chpe@cvs.gnome.org> * configure.ac: * embed/mozilla/MozDownload.cpp: * embed/mozilla/MozDownload.h: Only implement nsITransfer if possible.
Diffstat (limited to 'embed/mozilla/MozDownload.h')
-rw-r--r--embed/mozilla/MozDownload.h25
1 files changed, 22 insertions, 3 deletions
diff --git a/embed/mozilla/MozDownload.h b/embed/mozilla/MozDownload.h
index 9addcadb1..c4592ec5d 100644
--- a/embed/mozilla/MozDownload.h
+++ b/embed/mozilla/MozDownload.h
@@ -49,7 +49,6 @@
#include "ephy-download.h"
#include "ephy-embed-shell.h"
-#include <nsIDownload.h>
#include <nsIWebProgressListener.h>
#include <nsIDOMDocument.h>
#include <nsIURI.h>
@@ -59,6 +58,12 @@
#include <nsIRequest.h>
#include <nsIMIMEInfo.h>
+#ifdef HAVE_NSITRANSFER_H
+#include <nsITransfer.h>
+#else
+#include <nsIDownload.h>
+#endif
+
#include <libgnomevfs/gnome-vfs-mime-handlers.h>
/* MozDownload
@@ -89,17 +94,31 @@ nsresult InitiateMozillaDownload (nsIDOMDocument *domDocument, nsIURI *sourceUri
PRInt32 aMaxSize);
nsresult BuildDownloadPath (const char *defaultFileName, nsILocalFile **_retval);
-class MozDownload : public nsIDownload,
+class MozDownload :
+#ifdef HAVE_NSITRANSFER_H
+ public nsITransfer
+#else
+ public nsIDownload,
public nsIWebProgressListener
+#endif
{
public:
MozDownload();
virtual ~MozDownload();
NS_DECL_ISUPPORTS
+ NS_DECL_NSIWEBPROGRESSLISTENER
NS_DECL_NSITRANSFER
+#ifndef HAVE_NSITRANSFER_H
NS_DECL_NSIDOWNLOAD
- NS_DECL_NSIWEBPROGRESSLISTENER
+#endif
+
+#ifdef HAVE_NSITRANSFER_H
+ nsresult GetMIMEInfo (nsIMIMEInfo **aMIMEInfo);
+ nsresult GetTargetFile (nsILocalFile **aFile);
+ nsresult GetSource(nsIURI * *aSource);
+ nsresult GetPercentComplete(PRInt32 *aPercentComplete);
+#endif
virtual void Cancel();
virtual void Pause();