toolkit/components/jsdownloads/public/mozIDownloadPlatform.idl

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

mercurial