diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 17:32:43 +0000 |
commit | 6bf0a5cb5034a7e684dcc3500e841785237ce2dd (patch) | |
tree | a68f146d7fa01f0134297619fbe7e33db084e0aa /toolkit/components/downloads/mozIDownloadPlatform.idl | |
parent | Initial commit. (diff) | |
download | thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.tar.xz thunderbird-6bf0a5cb5034a7e684dcc3500e841785237ce2dd.zip |
Adding upstream version 1:115.7.0.upstream/1%115.7.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/components/downloads/mozIDownloadPlatform.idl')
-rw-r--r-- | toolkit/components/downloads/mozIDownloadPlatform.idl | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/toolkit/components/downloads/mozIDownloadPlatform.idl b/toolkit/components/downloads/mozIDownloadPlatform.idl new file mode 100644 index 0000000000..30f1cc1f24 --- /dev/null +++ b/toolkit/components/downloads/mozIDownloadPlatform.idl @@ -0,0 +1,62 @@ +/* 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 Promise that resolves once operations have completed. + */ + [implicit_jscontext] + Promise 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); +}; |