nsIHandlerInfo gives access to the information about how a given protocol scheme or MIME-type is handled. More...
import "nsIMIMEInfo.idl";
Inheritance diagram for nsIHandlerInfo:
Collaboration diagram for nsIHandlerInfo:Public Member Functions | |
| void | launchWithURI (in nsIURI aURI,[optional] in nsIInterfaceRequestor aWindowContext) |
| Launches the application with the specified URI, in a way that depends on the value of preferredAction. | |
Public Attributes | |
| readonly attribute ACString | type |
| The type of this handler info. | |
| attribute AString | description |
| A human readable description of the handler type. | |
| attribute nsIHandlerApp | preferredApplicationHandler |
| The application the user has said they want associated with this content type. | |
| readonly attribute nsIMutableArray | possibleApplicationHandlers |
| Applications that can handle this content type. | |
| readonly attribute boolean | hasDefaultHandler |
| Indicates whether a default application handler exists, i.e. | |
| readonly attribute AString | defaultDescription |
| A pretty name description of the associated default application. | |
| attribute 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 | |
| const long | saveToDisk = 0 |
| const long | alwaysAsk = 1 |
| Used to indicate that we know nothing about what to do with this. | |
| const long | useHelperApp = 2 |
| const long | handleInternally = 3 |
| const long | useSystemDefault = 4 |
| attribute boolean | alwaysAskBeforeHandling |
| alwaysAskBeforeHandling: if true, we should always give the user a dialog asking how to dispose of this content. | |
nsIHandlerInfo gives access to the information about how a given protocol scheme or MIME-type is handled.
| void nsIHandlerInfo::launchWithURI | ( | in nsIURI | aURI, | |
| [optional] in nsIInterfaceRequestor | aWindowContext | |||
| ) |
Launches the application with the specified URI, in a way that depends on the value of preferredAction.
preferredAction must be useHelperApp or useSystemDefault.
| aURI | The URI to launch this application with | |
| 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. |
| NS_ERROR_INVALID_ARG | if preferredAction is not valid for this call. Other exceptions may be thrown. |
| const long nsIHandlerInfo::alwaysAsk = 1 |
Used to indicate that we know nothing about what to do with this.
You could consider this to be not initialized.
alwaysAskBeforeHandling: if true, we should always give the user a dialog asking how to dispose of this content.
| readonly attribute AString nsIHandlerInfo::defaultDescription |
A pretty name description of the associated default application.
Only usable if hasDefaultHandler is true.
| attribute AString nsIHandlerInfo::description |
A human readable description of the handler type.
| const long nsIHandlerInfo::handleInternally = 3 |
| readonly attribute boolean nsIHandlerInfo::hasDefaultHandler |
Indicates whether a default application handler exists, i.e.
whether launchWithFile with action = useSystemDefault is possible and defaultDescription will contain usable information.
| readonly attribute nsIMutableArray nsIHandlerInfo::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.
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
The application the user has said they want associated with this content type.
This is not always guaranteed to be set!!
| const long nsIHandlerInfo::saveToDisk = 0 |
| readonly attribute ACString nsIHandlerInfo::type |
The type of this handler info.
For MIME handlers, this is the MIME type. For protocol handlers, it's the scheme.
| const long nsIHandlerInfo::useHelperApp = 2 |
| const long nsIHandlerInfo::useSystemDefault = 4 |
1.7.1