Fri, 16 Jan 2015 18:13:44 +0100
Integrate suggestion from review to improve consistency with existing code.
michael@0 | 1 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 2 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 3 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 4 | |
michael@0 | 5 | #include "nsISupports.idl" |
michael@0 | 6 | |
michael@0 | 7 | interface nsIURI; |
michael@0 | 8 | interface nsIFile; |
michael@0 | 9 | |
michael@0 | 10 | [scriptable, uuid(9f556e4a-d9b3-46c3-9f8f-d0db1ac6c8c1)] |
michael@0 | 11 | interface mozIDownloadPlatform : nsISupports |
michael@0 | 12 | { |
michael@0 | 13 | /** |
michael@0 | 14 | * Perform platform specific operations when a download is done. |
michael@0 | 15 | * |
michael@0 | 16 | * Windows: |
michael@0 | 17 | * Add the download to the recent documents list |
michael@0 | 18 | * Set the file to be indexed for searching |
michael@0 | 19 | * Mac: |
michael@0 | 20 | * Bounce the downloads dock icon |
michael@0 | 21 | * GTK: |
michael@0 | 22 | * Add the download to the recent documents list |
michael@0 | 23 | * Save the source uri in the downloaded file's metadata |
michael@0 | 24 | * Android: |
michael@0 | 25 | * Scan media |
michael@0 | 26 | * |
michael@0 | 27 | * @param aSource |
michael@0 | 28 | * Source URI of the download |
michael@0 | 29 | * @param aTarget |
michael@0 | 30 | * Downloaded file |
michael@0 | 31 | * @param aContentType |
michael@0 | 32 | * The source's content type |
michael@0 | 33 | * @param aIsPrivate |
michael@0 | 34 | * True for private downloads |
michael@0 | 35 | * @return none |
michael@0 | 36 | */ |
michael@0 | 37 | void downloadDone(in nsIURI aSource, in nsIFile aTarget, |
michael@0 | 38 | in ACString aContentType, in boolean aIsPrivate); |
michael@0 | 39 | |
michael@0 | 40 | /** |
michael@0 | 41 | * Security Zone constants. Used by mapUrlToZone(). |
michael@0 | 42 | */ |
michael@0 | 43 | const unsigned long ZONE_MY_COMPUTER = 0; |
michael@0 | 44 | const unsigned long ZONE_INTRANET = 1; |
michael@0 | 45 | const unsigned long ZONE_TRUSTED = 2; |
michael@0 | 46 | const unsigned long ZONE_INTERNET = 3; |
michael@0 | 47 | const unsigned long ZONE_RESTRICTED = 4; |
michael@0 | 48 | |
michael@0 | 49 | /** |
michael@0 | 50 | * Proxy for IInternetSecurityManager::MapUrlToZone(). |
michael@0 | 51 | * |
michael@0 | 52 | * Windows only. |
michael@0 | 53 | * |
michael@0 | 54 | * @param aURL |
michael@0 | 55 | * URI of the download |
michael@0 | 56 | * @return Security Zone corresponding to aURL. |
michael@0 | 57 | */ |
michael@0 | 58 | unsigned long mapUrlToZone(in AString aURL); |
michael@0 | 59 | }; |