Struct xpcom::interfaces::nsITransfer
[−]
[src]
#[repr(C)]pub struct nsITransfer { /* fields omitted */ }
interface nsITransfer : nsIWebProgressListener2
Methods
impl nsITransfer
[src]
pub fn coerce<T: nsITransferCoerce>(&self) -> &T
[src]
Cast this nsITransfer
to one of its base interfaces.
impl nsITransfer
[src]
pub unsafe fn Init(
&self,
aSource: *const nsIURI,
aTarget: *const nsIURI,
aDisplayName: &nsAString,
aMIMEInfo: *const nsIMIMEInfo,
startTime: PRTime,
aTempFile: *const nsIFile,
aCancelable: *const nsICancelable,
aIsPrivate: bool
) -> nsresult
[src]
&self,
aSource: *const nsIURI,
aTarget: *const nsIURI,
aDisplayName: &nsAString,
aMIMEInfo: *const nsIMIMEInfo,
startTime: PRTime,
aTempFile: *const nsIFile,
aCancelable: *const nsICancelable,
aIsPrivate: bool
) -> nsresult
/**
* Initializes the transfer with certain properties. This function must
* be called prior to accessing any properties on this interface.
*
* @param aSource The source URI of the transfer. Must not be null.
*
* @param aTarget The target URI of the transfer. Must not be null.
*
* @param aDisplayName The user-readable description of the transfer.
* Can be empty.
*
* @param aMIMEInfo The MIME info associated with the target,
* including MIME type and helper app when appropriate.
* This parameter is optional.
*
* @param startTime Time when the download started (ie, when the first
* response from the server was received)
* XXX presumably wbp and exthandler do this differently
*
* @param aTempFile The location of a temporary file; i.e. a file in which
* the received data will be stored, but which is not
* equal to the target file. (will be moved to the real
* target by the caller, when the download is finished)
* May be null.
*
* @param aCancelable An object that can be used to abort the download.
* Must not be null.
* Implementations are expected to hold a strong
* reference to this object until the download is
* finished, at which point they should release the
* reference.
*
* @param aIsPrivate Used to determine the privacy status of the new transfer.
* If true, indicates that the transfer was initiated from
* a source that desires privacy.
*/
void init (in nsIURI aSource, in nsIURI aTarget, in AString aDisplayName, in nsIMIMEInfo aMIMEInfo, in PRTime startTime, in nsIFile aTempFile, in nsICancelable aCancelable, in boolean aIsPrivate);
pub unsafe fn SetSha256Hash(&self, aHash: &nsACString) -> nsresult
[src]
void setSha256Hash (in ACString aHash);
pub unsafe fn SetSignatureInfo(
&self,
aSignatureInfo: *const nsIArray
) -> nsresult
[src]
&self,
aSignatureInfo: *const nsIArray
) -> nsresult
void setSignatureInfo (in nsIArray aSignatureInfo);
pub unsafe fn SetRedirects(&self, aRedirects: *const nsIArray) -> nsresult
[src]
void setRedirects (in nsIArray aRedirects);
Methods from Deref<Target = nsIWebProgressListener2>
pub fn coerce<T: nsIWebProgressListener2Coerce>(&self) -> &T
[src]
Cast this nsIWebProgressListener2
to one of its base interfaces.
pub unsafe fn OnProgressChange64(
&self,
aWebProgress: *const nsIWebProgress,
aRequest: *const nsIRequest,
aCurSelfProgress: int64_t,
aMaxSelfProgress: int64_t,
aCurTotalProgress: int64_t,
aMaxTotalProgress: int64_t
) -> nsresult
[src]
&self,
aWebProgress: *const nsIWebProgress,
aRequest: *const nsIRequest,
aCurSelfProgress: int64_t,
aMaxSelfProgress: int64_t,
aCurTotalProgress: int64_t,
aMaxTotalProgress: int64_t
) -> nsresult
/**
* Notification that the progress has changed for one of the requests
* associated with aWebProgress. Progress totals are reset to zero when all
* requests in aWebProgress complete (corresponding to onStateChange being
* called with aStateFlags including the STATE_STOP and STATE_IS_WINDOW
* flags).
*
* This function is identical to nsIWebProgressListener::onProgressChange,
* except that this function supports 64-bit values.
*
* @param aWebProgress
* The nsIWebProgress instance that fired the notification.
* @param aRequest
* The nsIRequest that has new progress.
* @param aCurSelfProgress
* The current progress for aRequest.
* @param aMaxSelfProgress
* The maximum progress for aRequest.
* @param aCurTotalProgress
* The current progress for all requests associated with aWebProgress.
* @param aMaxTotalProgress
* The total progress for all requests associated with aWebProgress.
*
* NOTE: If any progress value is unknown, then its value is replaced with -1.
*
* @see nsIWebProgressListener2::onProgressChange64
*/
void onProgressChange64 (in nsIWebProgress aWebProgress, in nsIRequest aRequest, in long long aCurSelfProgress, in long long aMaxSelfProgress, in long long aCurTotalProgress, in long long aMaxTotalProgress);
pub unsafe fn OnRefreshAttempted(
&self,
aWebProgress: *const nsIWebProgress,
aRefreshURI: *const nsIURI,
aMillis: int32_t,
aSameURI: bool,
_retval: *mut bool
) -> nsresult
[src]
&self,
aWebProgress: *const nsIWebProgress,
aRefreshURI: *const nsIURI,
aMillis: int32_t,
aSameURI: bool,
_retval: *mut bool
) -> nsresult
/**
* Notification that a refresh or redirect has been requested in aWebProgress
* For example, via a <meta http-equiv="refresh"> or an HTTP Refresh: header
*
* @param aWebProgress
* The nsIWebProgress instance that fired the notification.
* @param aRefreshURI
* The new URI that aWebProgress has requested redirecting to.
* @param aMillis
* The delay (in milliseconds) before refresh.
* @param aSameURI
* True if aWebProgress is requesting a refresh of the
* current URI.
* False if aWebProgress is requesting a redirection to
* a different URI.
*
* @return True if the refresh may proceed.
* False if the refresh should be aborted.
*/
boolean onRefreshAttempted (in nsIWebProgress aWebProgress, in nsIURI aRefreshURI, in long aMillis, in boolean aSameURI);
Trait Implementations
impl XpCom for nsITransfer
[src]
const IID: nsIID
IID: nsIID = nsID(938243539, 38829, 19880, [175, 170, 234, 190, 91, 74, 253, 115])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsITransfer
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsITransfer
[src]
type Target = nsIWebProgressListener2
The resulting type after dereferencing.
fn deref(&self) -> &nsIWebProgressListener2
[src]
Dereferences the value.