nsIHandlerInfo
| IID: | 325e56a7-3762-4312-aec7-f1fcf84b4145 |
| Inherits From: | nsISupports |
nsIHandlerInfo gives access to the information about how a given protocol scheme or MIME-type is handled.
Constants
Properties
PRBool alwaysAskBeforeHandling
AlwaysAskBeforeHandling: if true, we should always give the user a dialog asking how to dispose of this content.
readonly AString defaultDescription
A pretty name description of the associated default application. Only usable if hasDefaultHandler is true.
AString description
A human readable description of the handler type
readonly PRBool hasDefaultHandler
Indicates whether a default application handler exists, i.e. whether launchWithFile with action = useSystemDefault is possible and defaultDescription will contain usable information.
readonly nsIMutableArray possibleApplicationHandlers
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.
nsHandlerInfoAction preferredAction
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
nsIHandlerApp preferredApplicationHandler
The application the user has said they want associated with this content type. This is not always guaranteed to be set!!
readonly ACString type
The type of this handler info. For MIME handlers, this is the MIME type. For protocol handlers, it's the scheme.
Methods
void launchWithURI ( nsIURI URI , nsIInterfaceRequestor windowContext )
void launchWithURI ( nsIURI URI , nsIInterfaceRequestor windowContext )
Launches the application with the specified URI, in a way that depends on the value of preferredAction. preferredAction must be useHelperApp or useSystemDefault.
- Arguments:
- URI: The URI to launch this application with
- windowContext: 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.
References
This interface is passed as an argument to the following methods:
nsIContentDispatchChooser.ask, nsIHandlerService.exists, nsIHandlerService.fillHandlerInfo, nsIHandlerService.remove, nsIHandlerService.store
This interface is returned from the following methods:
nsIExternalProtocolService.getProtocolHandlerInfo
Reference documentation is generated from Mozilla's source.
