summaryrefslogtreecommitdiffstats
path: root/toolkit/components/jsdownloads/public
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 /toolkit/components/jsdownloads/public
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 'toolkit/components/jsdownloads/public')
-rw-r--r--toolkit/components/jsdownloads/public/moz.build9
-rw-r--r--toolkit/components/jsdownloads/public/mozIDownloadPlatform.idl61
2 files changed, 70 insertions, 0 deletions
diff --git a/toolkit/components/jsdownloads/public/moz.build b/toolkit/components/jsdownloads/public/moz.build
new file mode 100644
index 000000000..6ea66bf5f
--- /dev/null
+++ b/toolkit/components/jsdownloads/public/moz.build
@@ -0,0 +1,9 @@
+# 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/.
+
+XPIDL_MODULE = 'jsdownloads'
+
+XPIDL_SOURCES += [
+ 'mozIDownloadPlatform.idl',
+]
diff --git a/toolkit/components/jsdownloads/public/mozIDownloadPlatform.idl b/toolkit/components/jsdownloads/public/mozIDownloadPlatform.idl
new file mode 100644
index 000000000..d4f49bb4b
--- /dev/null
+++ b/toolkit/components/jsdownloads/public/mozIDownloadPlatform.idl
@@ -0,0 +1,61 @@
+/* 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;
+interface nsIFile;
+
+[scriptable, uuid(9f556e4a-d9b3-46c3-9f8f-d0db1ac6c8c1)]
+interface mozIDownloadPlatform : nsISupports
+{
+ /**
+ * Perform platform specific operations when a download is done.
+ *
+ * Windows:
+ * Add the download to the recent documents list
+ * Set the file to be indexed for searching
+ * Mac:
+ * Bounce the downloads dock icon
+ * GTK:
+ * Add the download to the recent documents list
+ * Save the source uri in the downloaded file's metadata
+ * Android:
+ * Scan media
+ *
+ * @param aSource
+ * Source URI of the download
+ * @param aReferrer
+ * Referrer URI of the download
+ * @param aTarget
+ * Downloaded file
+ * @param aContentType
+ * The source's content type
+ * @param aIsPrivate
+ * True for private downloads
+ * @return none
+ */
+ void downloadDone(in nsIURI aSource, in nsIURI aReferrer, in nsIFile aTarget,
+ in ACString aContentType, in boolean aIsPrivate);
+
+ /**
+ * Security Zone constants. Used by mapUrlToZone().
+ */
+ const unsigned long ZONE_MY_COMPUTER = 0;
+ const unsigned long ZONE_INTRANET = 1;
+ const unsigned long ZONE_TRUSTED = 2;
+ const unsigned long ZONE_INTERNET = 3;
+ const unsigned long ZONE_RESTRICTED = 4;
+
+ /**
+ * Proxy for IInternetSecurityManager::MapUrlToZone().
+ *
+ * Windows only.
+ *
+ * @param aURL
+ * URI of the download
+ * @return Security Zone corresponding to aURL.
+ */
+ unsigned long mapUrlToZone(in AString aURL);
+};