uriloader/base/nsITransfer.idl

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
michael@0 2 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 5
michael@0 6 #include "nsIWebProgressListener2.idl"
michael@0 7
michael@0 8 interface nsIArray;
michael@0 9 interface nsIURI;
michael@0 10 interface nsICancelable;
michael@0 11 interface nsIMIMEInfo;
michael@0 12 interface nsIFile;
michael@0 13
michael@0 14 [scriptable, uuid(0c81b265-34b8-472d-be98-099b2512e3ec)]
michael@0 15 interface nsITransfer : nsIWebProgressListener2 {
michael@0 16
michael@0 17 /**
michael@0 18 * Initializes the transfer with certain properties. This function must
michael@0 19 * be called prior to accessing any properties on this interface.
michael@0 20 *
michael@0 21 * @param aSource The source URI of the transfer. Must not be null.
michael@0 22 *
michael@0 23 * @param aTarget The target URI of the transfer. Must not be null.
michael@0 24 *
michael@0 25 * @param aDisplayName The user-readable description of the transfer.
michael@0 26 * Can be empty.
michael@0 27 *
michael@0 28 * @param aMIMEInfo The MIME info associated with the target,
michael@0 29 * including MIME type and helper app when appropriate.
michael@0 30 * This parameter is optional.
michael@0 31 *
michael@0 32 * @param startTime Time when the download started (ie, when the first
michael@0 33 * response from the server was received)
michael@0 34 * XXX presumably wbp and exthandler do this differently
michael@0 35 *
michael@0 36 * @param aTempFile The location of a temporary file; i.e. a file in which
michael@0 37 * the received data will be stored, but which is not
michael@0 38 * equal to the target file. (will be moved to the real
michael@0 39 * target by the caller, when the download is finished)
michael@0 40 * May be null.
michael@0 41 *
michael@0 42 * @param aCancelable An object that can be used to abort the download.
michael@0 43 * Must not be null.
michael@0 44 * Implementations are expected to hold a strong
michael@0 45 * reference to this object until the download is
michael@0 46 * finished, at which point they should release the
michael@0 47 * reference.
michael@0 48 *
michael@0 49 * @param aIsPrivate Used to determine the privacy status of the new transfer.
michael@0 50 * If true, indicates that the transfer was initiated from
michael@0 51 * a source that desires privacy.
michael@0 52 */
michael@0 53 void init(in nsIURI aSource,
michael@0 54 in nsIURI aTarget,
michael@0 55 in AString aDisplayName,
michael@0 56 in nsIMIMEInfo aMIMEInfo,
michael@0 57 in PRTime startTime,
michael@0 58 in nsIFile aTempFile,
michael@0 59 in nsICancelable aCancelable,
michael@0 60 in boolean aIsPrivate);
michael@0 61
michael@0 62 /*
michael@0 63 * Used to notify the transfer object of the hash of the downloaded file.
michael@0 64 * Must be called on the main thread, only after the download has finished
michael@0 65 * successfully.
michael@0 66 * @param aHash The SHA-256 hash in raw bytes of the downloaded file.
michael@0 67 */
michael@0 68 void setSha256Hash(in ACString aHash);
michael@0 69
michael@0 70 /*
michael@0 71 * Used to notify the transfer object of the signature of the downloaded
michael@0 72 * file. Must be called on the main thread, only after the download has
michael@0 73 * finished successfully.
michael@0 74 * @param aSignatureInfo The nsIArray of nsIX509CertList of nsIX509Cert
michael@0 75 * certificates of the downloaded file.
michael@0 76 */
michael@0 77 void setSignatureInfo(in nsIArray aSignatureInfo);
michael@0 78
michael@0 79 };
michael@0 80
michael@0 81 %{C++
michael@0 82 /**
michael@0 83 * A component with this contract ID will be created each time a download is
michael@0 84 * started, and nsITransfer::Init will be called on it and an observer will be set.
michael@0 85 *
michael@0 86 * Notifications of the download progress will happen via
michael@0 87 * nsIWebProgressListener/nsIWebProgressListener2.
michael@0 88 *
michael@0 89 * INTERFACES THAT MUST BE IMPLEMENTED:
michael@0 90 * nsITransfer
michael@0 91 * nsIWebProgressListener
michael@0 92 * nsIWebProgressListener2
michael@0 93 *
michael@0 94 * XXX move this to nsEmbedCID.h once the interfaces (and the contract ID) are
michael@0 95 * frozen.
michael@0 96 */
michael@0 97 #define NS_TRANSFER_CONTRACTID "@mozilla.org/transfer;1"
michael@0 98 %}

mercurial