Download manager. Not part of build. a=asa

git-svn-id: svn://10.0.0.236/trunk@116275 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
blakeross%telocity.com
2002-03-09 19:01:59 +00:00
parent fb5d51bc1b
commit 653eb7331e
11 changed files with 166 additions and 3 deletions

View File

@@ -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

View File

@@ -21,6 +21,6 @@
DEPTH=..\..\..
DIRS=public src resources\content resources\locale\en-US
DIRS=public src resources
include <$(DEPTH)\config\rules.mak>

View File

@@ -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

View File

@@ -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

View File

@@ -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");
}

View File

@@ -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)

View File

@@ -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 <pavlov@netscape.com>
#
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

View File

@@ -584,7 +584,7 @@ nsDownloadManager::RemoveDownload(const char* aPersistentDescriptor)
nsCOMPtr<nsIRDFNode> node;
rv = downloads->RemoveElementAt(itemIndex, PR_TRUE, getter_AddRefs(node));
if (NS_FAILED(rv)) return rv;
nsCOMPtr<nsIRDFRemoteDataSource> 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);