michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: interface nsIURI; michael@0: interface nsIFile; michael@0: michael@0: [scriptable, uuid(9f556e4a-d9b3-46c3-9f8f-d0db1ac6c8c1)] michael@0: interface mozIDownloadPlatform : nsISupports michael@0: { michael@0: /** michael@0: * Perform platform specific operations when a download is done. michael@0: * michael@0: * Windows: michael@0: * Add the download to the recent documents list michael@0: * Set the file to be indexed for searching michael@0: * Mac: michael@0: * Bounce the downloads dock icon michael@0: * GTK: michael@0: * Add the download to the recent documents list michael@0: * Save the source uri in the downloaded file's metadata michael@0: * Android: michael@0: * Scan media michael@0: * michael@0: * @param aSource michael@0: * Source URI of the download michael@0: * @param aTarget michael@0: * Downloaded file michael@0: * @param aContentType michael@0: * The source's content type michael@0: * @param aIsPrivate michael@0: * True for private downloads michael@0: * @return none michael@0: */ michael@0: void downloadDone(in nsIURI aSource, in nsIFile aTarget, michael@0: in ACString aContentType, in boolean aIsPrivate); michael@0: michael@0: /** michael@0: * Security Zone constants. Used by mapUrlToZone(). michael@0: */ michael@0: const unsigned long ZONE_MY_COMPUTER = 0; michael@0: const unsigned long ZONE_INTRANET = 1; michael@0: const unsigned long ZONE_TRUSTED = 2; michael@0: const unsigned long ZONE_INTERNET = 3; michael@0: const unsigned long ZONE_RESTRICTED = 4; michael@0: michael@0: /** michael@0: * Proxy for IInternetSecurityManager::MapUrlToZone(). michael@0: * michael@0: * Windows only. michael@0: * michael@0: * @param aURL michael@0: * URI of the download michael@0: * @return Security Zone corresponding to aURL. michael@0: */ michael@0: unsigned long mapUrlToZone(in AString aURL); michael@0: };