From 653eb7331ed85560a63b6efbd586b7f0f3a8e45f Mon Sep 17 00:00:00 2001 From: "blakeross%telocity.com" Date: Sat, 9 Mar 2002 19:01:59 +0000 Subject: [PATCH] Download manager. Not part of build. a=asa git-svn-id: svn://10.0.0.236/trunk@116275 18797224-902f-48f8-a5cc-f745e15eee43 --- .../components/download-manager/Makefile.in | 32 +++++++++++ .../components/download-manager/makefile.win | 2 +- .../download-manager/public/Makefile.in | 36 +++++++++++++ .../download-manager/resources/Makefile.in | 30 +++++++++++ .../resources/downloadmanager.css | 7 +++ .../{content => }/downloadmanager.js | 0 .../{content => }/downloadmanager.xml | 0 .../{content => }/downloadmanager.xul | 0 .../resources/{content => }/jar.mn | 5 ++ .../download-manager/src/Makefile.in | 53 +++++++++++++++++++ .../src/nsDownloadManager.cpp | 4 +- 11 files changed, 166 insertions(+), 3 deletions(-) create mode 100644 mozilla/xpfe/components/download-manager/Makefile.in create mode 100644 mozilla/xpfe/components/download-manager/public/Makefile.in create mode 100644 mozilla/xpfe/components/download-manager/resources/Makefile.in create mode 100644 mozilla/xpfe/components/download-manager/resources/downloadmanager.css rename mozilla/xpfe/components/download-manager/resources/{content => }/downloadmanager.js (100%) rename mozilla/xpfe/components/download-manager/resources/{content => }/downloadmanager.xml (100%) rename mozilla/xpfe/components/download-manager/resources/{content => }/downloadmanager.xul (100%) rename mozilla/xpfe/components/download-manager/resources/{content => }/jar.mn (51%) create mode 100644 mozilla/xpfe/components/download-manager/src/Makefile.in diff --git a/mozilla/xpfe/components/download-manager/Makefile.in b/mozilla/xpfe/components/download-manager/Makefile.in new file mode 100644 index 00000000000..e3b24bc152e --- /dev/null +++ b/mozilla/xpfe/components/download-manager/Makefile.in @@ -0,0 +1,32 @@ +# +# The contents of this file are subject to the Netscape Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/NPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# + +DEPTH = ../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +DIRS = public src resources + +include $(topsrcdir)/config/rules.mk + diff --git a/mozilla/xpfe/components/download-manager/makefile.win b/mozilla/xpfe/components/download-manager/makefile.win index 116f28d8a03..6a348feb232 100644 --- a/mozilla/xpfe/components/download-manager/makefile.win +++ b/mozilla/xpfe/components/download-manager/makefile.win @@ -21,6 +21,6 @@ DEPTH=..\..\.. -DIRS=public src resources\content resources\locale\en-US +DIRS=public src resources include <$(DEPTH)\config\rules.mak> diff --git a/mozilla/xpfe/components/download-manager/public/Makefile.in b/mozilla/xpfe/components/download-manager/public/Makefile.in new file mode 100644 index 00000000000..177d0df0667 --- /dev/null +++ b/mozilla/xpfe/components/download-manager/public/Makefile.in @@ -0,0 +1,36 @@ +# +# The contents of this file are subject to the Netscape Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/NPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# + +DEPTH = ../../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +MODULE = downloadmanager + +XPIDLSRCS = nsIDownloadManager.idl \ + nsIDownload.idl \ + nsIDownloadProgressListener.js \ + +include $(topsrcdir)/config/rules.mk + diff --git a/mozilla/xpfe/components/download-manager/resources/Makefile.in b/mozilla/xpfe/components/download-manager/resources/Makefile.in new file mode 100644 index 00000000000..a3168e544c9 --- /dev/null +++ b/mozilla/xpfe/components/download-manager/resources/Makefile.in @@ -0,0 +1,30 @@ +# +# The contents of this file are subject to the Netscape Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/NPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code is mozilla.org code. +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 1998 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# + +DEPTH = ../../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +include $(topsrcdir)/config/rules.mk + diff --git a/mozilla/xpfe/components/download-manager/resources/downloadmanager.css b/mozilla/xpfe/components/download-manager/resources/downloadmanager.css new file mode 100644 index 00000000000..e56564a01d1 --- /dev/null +++ b/mozilla/xpfe/components/download-manager/resources/downloadmanager.css @@ -0,0 +1,7 @@ +downloadstatus[state="0"] { + -moz-binding: url("chrome://communicator/content/downloadmanager/downloadmanager.xml#status-progress"); +} + +downloadstatus { + -moz-binding: url("chrome://communicator/content/downloadmanager/downloadmanager.xml#status-text"); +} \ No newline at end of file diff --git a/mozilla/xpfe/components/download-manager/resources/content/downloadmanager.js b/mozilla/xpfe/components/download-manager/resources/downloadmanager.js similarity index 100% rename from mozilla/xpfe/components/download-manager/resources/content/downloadmanager.js rename to mozilla/xpfe/components/download-manager/resources/downloadmanager.js diff --git a/mozilla/xpfe/components/download-manager/resources/content/downloadmanager.xml b/mozilla/xpfe/components/download-manager/resources/downloadmanager.xml similarity index 100% rename from mozilla/xpfe/components/download-manager/resources/content/downloadmanager.xml rename to mozilla/xpfe/components/download-manager/resources/downloadmanager.xml diff --git a/mozilla/xpfe/components/download-manager/resources/content/downloadmanager.xul b/mozilla/xpfe/components/download-manager/resources/downloadmanager.xul similarity index 100% rename from mozilla/xpfe/components/download-manager/resources/content/downloadmanager.xul rename to mozilla/xpfe/components/download-manager/resources/downloadmanager.xul diff --git a/mozilla/xpfe/components/download-manager/resources/content/jar.mn b/mozilla/xpfe/components/download-manager/resources/jar.mn similarity index 51% rename from mozilla/xpfe/components/download-manager/resources/content/jar.mn rename to mozilla/xpfe/components/download-manager/resources/jar.mn index cb7ff58c7a4..8100e8ae810 100644 --- a/mozilla/xpfe/components/download-manager/resources/content/jar.mn +++ b/mozilla/xpfe/components/download-manager/resources/jar.mn @@ -3,3 +3,8 @@ comm.jar: content/communicator/downloadmanager/downloadmanager.js content/communicator/downloadmanager/downloadmanager.css content/communicator/downloadmanager/downloadmanager.xml + +en-US.jar: + locale/en-US/communicator/downloadmanager/downloadmanager.ent (locale/en-US/downloadmanager.ent) + locale/en-US/communicator/downloadmanager/downloadmanager.properties (locale/en-US/downloadmanager.properties) + diff --git a/mozilla/xpfe/components/download-manager/src/Makefile.in b/mozilla/xpfe/components/download-manager/src/Makefile.in new file mode 100644 index 00000000000..722451f5863 --- /dev/null +++ b/mozilla/xpfe/components/download-manager/src/Makefile.in @@ -0,0 +1,53 @@ +#! gmake +# +# The contents of this file are subject to the Mozilla Public +# License Version 1.1 (the "License"); you may not use this file +# except in compliance with the License. You may obtain a copy of +# the License at http://www.mozilla.org/MPL/ +# +# Software distributed under the License is distributed on an "AS +# IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or +# implied. See the License for the specific language governing +# rights and limitations under the License. +# +# The Original Code is mozilla.org code +# +# The Initial Developer of the Original Code is Netscape +# Communications Corporation. Portions created by Netscape are +# Copyright (C) 2000 Netscape Communications Corporation. All +# Rights Reserved. +# +# Contributor(s): +# Stuart Parmenter +# + +DEPTH = ../../../.. +topsrcdir = @top_srcdir@ +srcdir = @srcdir@ +VPATH = @srcdir@ + +include $(DEPTH)/config/autoconf.mk + +MODULE = downloadmanager +LIBRARY_NAME = downloadmanager_s +REQUIRES = xpcom \ + string \ + rdf \ + uriloader \ + necko \ + progressDlg \ + intl \ + windowwatcher \ + webbrowserpersist \ + dom \ + $(NULL) +CPPSRCS = \ + nsDownloadManager.cpp \ + $(NULL) + +include $(topsrcdir)/config/rules.mk + +EXTRA_DSO_LDOPTS += $(MOZ_COMPONENT_LIBS) + +libs:: + $(INSTALL) $(srcdir)/nsDownloadProgressListener.js $(DIST)/bin/components diff --git a/mozilla/xpfe/components/download-manager/src/nsDownloadManager.cpp b/mozilla/xpfe/components/download-manager/src/nsDownloadManager.cpp index 34063bfbb4e..e740967ac15 100644 --- a/mozilla/xpfe/components/download-manager/src/nsDownloadManager.cpp +++ b/mozilla/xpfe/components/download-manager/src/nsDownloadManager.cpp @@ -584,7 +584,7 @@ nsDownloadManager::RemoveDownload(const char* aPersistentDescriptor) nsCOMPtr node; rv = downloads->RemoveElementAt(itemIndex, PR_TRUE, getter_AddRefs(node)); if (NS_FAILED(rv)) return rv; - + nsCOMPtr remote = do_QueryInterface(mDataSource); return remote->Flush(); } @@ -764,7 +764,7 @@ nsDownload::nsDownload():mStartTime(0), } nsDownload::~nsDownload() -{ +{ char* persistentDescriptor; mTarget->GetPersistentDescriptor(&persistentDescriptor); mDownloadManager->AssertProgressInfoFor(persistentDescriptor);