summaryrefslogtreecommitdiffstats
path: root/docshell/base/nsIDownloadHistory.idl
diff options
context:
space:
mode:
authorMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
committerMatt A. Tobin <mattatobin@localhost.localdomain>2018-02-02 04:16:08 -0500
commit5f8de423f190bbb79a62f804151bc24824fa32d8 (patch)
tree10027f336435511475e392454359edea8e25895d /docshell/base/nsIDownloadHistory.idl
parent49ee0794b5d912db1f95dce6eb52d781dc210db5 (diff)
downloadUXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.gz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.lz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.tar.xz
UXP-5f8de423f190bbb79a62f804151bc24824fa32d8.zip
Add m-esr52 at 52.6.0
Diffstat (limited to 'docshell/base/nsIDownloadHistory.idl')
-rw-r--r--docshell/base/nsIDownloadHistory.idl58
1 files changed, 58 insertions, 0 deletions
diff --git a/docshell/base/nsIDownloadHistory.idl b/docshell/base/nsIDownloadHistory.idl
new file mode 100644
index 000000000..ed2a19deb
--- /dev/null
+++ b/docshell/base/nsIDownloadHistory.idl
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * vim: sw=2 ts=2 sts=2
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
+
+#include "nsISupports.idl"
+
+interface nsIURI;
+
+/**
+ * This interface can be used to add a download to history. There is a separate
+ * interface specifically for downloads in case embedders choose to track
+ * downloads differently from other types of history.
+ */
+[scriptable, uuid(4dcd6a12-a091-4f38-8360-022929635746)]
+interface nsIDownloadHistory : nsISupports {
+ /**
+ * Adds a download to history. This will also notify observers that the
+ * URI aSource is visited with the topic NS_LINK_VISITED_EVENT_TOPIC if
+ * aSource has not yet been visited.
+ *
+ * @param aSource
+ * The source of the download we are adding to history. This cannot be
+ * null.
+ * @param aReferrer
+ * [optional] The referrer of source URI.
+ * @param aStartTime
+ * [optional] The time the download was started. If the start time
+ * is not given, the current time is used.
+ * @param aDestination
+ * [optional] The target where the download is to be saved on the local
+ * filesystem.
+ * @throws NS_ERROR_NOT_AVAILABLE
+ * In a situation where a history implementation is not available,
+ * where 'history implementation' refers to something like
+ * nsIGlobalHistory and friends.
+ * @note This addition is not guaranteed to be synchronous, since it delegates
+ * the actual addition to the underlying history implementation. If you
+ * need to observe the completion of the addition, use the underlying
+ * history implementation's notifications system (e.g. nsINavHistoryObserver
+ * for toolkit's implementation of this interface).
+ */
+ void addDownload(in nsIURI aSource, [optional] in nsIURI aReferrer,
+ [optional] in PRTime aStartTime,
+ [optional] in nsIURI aDestination);
+
+ /**
+ * Remove all downloads from history.
+ *
+ * @note This removal is not guaranteed to be synchronous, since it delegates
+ * the actual removal to the underlying history implementation. If you
+ * need to observe the completion of the removal, use the underlying
+ * history implementation's notifications system (e.g. nsINavHistoryObserver
+ * for toolkit's implementation of this interface).
+ */
+ void removeAllDownloads();
+};