Struct xpcom::interfaces::nsIHandlerInfo [] [src]

#[repr(C)]
pub struct nsIHandlerInfo { /* fields omitted */ }

interface nsIHandlerInfo : nsISupports

/**
 * nsIHandlerInfo gives access to the information about how a given protocol
 * scheme or MIME-type is handled.
 */

Methods

impl nsIHandlerInfo
[src]

[src]

Cast this nsIHandlerInfo to one of its base interfaces.

impl nsIHandlerInfo
[src]

saveToDisk: i64 = 0

alwaysAsk: i64 = 1
/**
     * Used to indicate that we know nothing about what to do with this.  You
     * could consider this to be not initialized.
     */

useHelperApp: i64 = 2

handleInternally: i64 = 3

useSystemDefault: i64 = 4

[src]

/**
     * The type of this handler info.  For MIME handlers, this is the MIME type.
     * For protocol handlers, it's the scheme.
     *
     * @return String representing the type.
     */

readonly attribute ACString type;

[src]

/**
     * A human readable description of the handler type
     */

attribute AString description;

[src]

/**
     * A human readable description of the handler type
     */

attribute AString description;

[src]

/**
     * The application the user has said they want associated with this content
     * type. This is not always guaranteed to be set!!
     */

attribute nsIHandlerApp preferredApplicationHandler;

[src]

/**
     * The application the user has said they want associated with this content
     * type. This is not always guaranteed to be set!!
     */

attribute nsIHandlerApp preferredApplicationHandler;

[src]

/**
     * Applications that can handle this content type.
     *
     * The list will include the preferred handler, if any.  Elements of this
     * array are nsIHandlerApp objects, and this attribute will always reference
     * an array, whether or not there are any possible handlers.  If there are
     * no possible handlers, the array will contain no elements, so just check
     * its length (nsIArray::length) to see if there are any possible handlers.
     */

readonly attribute nsIMutableArray possibleApplicationHandlers;

[src]

/**
     * Indicates whether a default application handler exists,
     * i.e. whether launchWithFile with action = useSystemDefault is possible
     * and defaultDescription will contain usable information.
     */

readonly attribute boolean hasDefaultHandler;

[src]

/**
     * A pretty name description of the associated default application. Only
     * usable if hasDefaultHandler is true.
     */

readonly attribute AString defaultDescription;

[src]

/**
     * Launches the application with the specified URI, in a way that
     * depends on the value of preferredAction. preferredAction must be
     * useHelperApp or useSystemDefault.
     *
     * @note Only the URI scheme is used to determine how to launch.  This is
     * essentially a pass-by-value operation.  This means that in the case of
     * a file: URI, the handler that is registered for file: will be launched
     * and our code will not make any decision based on the content-type or
     * extension, though the invoked file: handler is free to do so.
     *
     * @param aURI
     *        The URI to launch this application with
     *
     * @param aWindowContext
     *        The window to parent the dialog against, and, if a web handler
     *        is chosen, it is loaded in this window as well.  See
     *        nsIHandlerApp.launchWithURI for more details.
     *
     * @throw NS_ERROR_INVALID_ARG if preferredAction is not valid for this
     * call. Other exceptions may be thrown.
     */

void launchWithURI (in nsIURI aURI, [optional] in nsIInterfaceRequestor aWindowContext);

[src]

/**
     * preferredAction is how the user specified they would like to handle
     * this content type: save to disk, use specified helper app, use OS
     * default handler or handle using navigator; possible value constants
     * listed below
     */

attribute nsHandlerInfoAction preferredAction;

[src]

/**
     * preferredAction is how the user specified they would like to handle
     * this content type: save to disk, use specified helper app, use OS
     * default handler or handle using navigator; possible value constants
     * listed below
     */

attribute nsHandlerInfoAction preferredAction;

[src]

/**
     * alwaysAskBeforeHandling: if true, we should always give the user a
     * dialog asking how to dispose of this content.
     */

attribute boolean alwaysAskBeforeHandling;

[src]

/**
     * alwaysAskBeforeHandling: if true, we should always give the user a
     * dialog asking how to dispose of this content.
     */

attribute boolean alwaysAskBeforeHandling;

Methods from Deref<Target = nsISupports>

[src]

Cast this nsISupports to one of its base interfaces.

[src]

void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);

[src]

[noscript,notxpcom] nsrefcnt AddRef ();

[src]

[noscript,notxpcom] nsrefcnt Release ();

Trait Implementations

impl XpCom for nsIHandlerInfo
[src]

IID: nsIID = nsID(845043367, 14178, 17170, [174, 199, 241, 252, 248, 75, 65, 69])

[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 nsIHandlerInfo
[src]

[src]

Increment the reference count.

[src]

Decrement the reference count, potentially freeing backing memory.

impl Deref for nsIHandlerInfo
[src]

The resulting type after dereferencing.

[src]

Dereferences the value.