nsIMIMEInfo extends nsIHandlerInfo with a bunch of information specific to MIME content-types. More...
import "nsIMIMEInfo.idl";
Inheritance diagram for nsIMIMEInfo:
Collaboration diagram for nsIMIMEInfo:Public Member Functions | |
| nsIUTF8StringEnumerator | getFileExtensions () |
| Gives you an array of file types associated with this type. | |
| void | setFileExtensions (in AUTF8String aExtensions) |
| Set File Extensions. | |
| boolean | extensionExists (in AUTF8String aExtension) |
| Returns whether or not the given extension is associated with this MIME info. | |
| void | appendExtension (in AUTF8String aExtension) |
| Append a given extension to the set of extensions. | |
| boolean | equals (in nsIMIMEInfo aMIMEInfo) |
| Returns whether or not these two nsIMIMEInfos are logically equivalent. | |
| void | launchWithFile (in nsIFile aFile) |
| Launches the application with the specified file, in a way that depends on the value of preferredAction. | |
Public Attributes | |
| attribute AUTF8String | primaryExtension |
| Returns the first extension association in the internal set of extensions. | |
| readonly attribute ACString | MIMEType |
| The MIME type of this MIMEInfo. | |
| readonly attribute nsIArray | possibleLocalHandlers |
| Returns a list of nsILocalHandlerApp objects containing handlers associated with this mimeinfo. | |
nsIMIMEInfo extends nsIHandlerInfo with a bunch of information specific to MIME content-types.
There is a one-to-many relationship between MIME types and file extensions. This means that a MIMEInfo object may have multiple file extensions associated with it. However, the reverse is not true.
MIMEInfo objects are generally retrieved from the MIME Service
| void nsIMIMEInfo::appendExtension | ( | in AUTF8String | aExtension | ) |
Append a given extension to the set of extensions.
| boolean nsIMIMEInfo::equals | ( | in nsIMIMEInfo | aMIMEInfo | ) |
Returns whether or not these two nsIMIMEInfos are logically equivalent.
| boolean nsIMIMEInfo::extensionExists | ( | in AUTF8String | aExtension | ) |
Returns whether or not the given extension is associated with this MIME info.
| nsIUTF8StringEnumerator nsIMIMEInfo::getFileExtensions | ( | ) |
Gives you an array of file types associated with this type.
| void nsIMIMEInfo::launchWithFile | ( | in nsIFile | aFile | ) |
Launches the application with the specified file, in a way that depends on the value of preferredAction.
preferredAction must be useHelperApp or useSystemDefault.
| aFile | The file to launch this application with. |
| NS_ERROR_INVALID_ARG | if action is not valid for this function. Other exceptions may be thrown. |
| void nsIMIMEInfo::setFileExtensions | ( | in AUTF8String | aExtensions | ) |
Set File Extensions.
Input is a comma delimited list of extensions.
| readonly attribute ACString nsIMIMEInfo::MIMEType |
The MIME type of this MIMEInfo.
| readonly attribute nsIArray nsIMIMEInfo::possibleLocalHandlers |
Returns a list of nsILocalHandlerApp objects containing handlers associated with this mimeinfo.
Implemented per platform using information in this object to generate the best list. Typically used for an "open with" style user option.
| attribute AUTF8String nsIMIMEInfo::primaryExtension |
Returns the first extension association in the internal set of extensions.
1.7.1