Back to index

lightning-sunbird  0.9+nobinonly
Public Member Functions | Public Attributes
nsIMIMEInfo Interface Reference

import "nsIMIMEInfo.idl";

Inheritance diagram for nsIMIMEInfo:
Inheritance graph
[legend]
Collaboration diagram for nsIMIMEInfo:
Collaboration graph
[legend]

List of all members.

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 MIME infos are logically equivalent maintaining the one-to-many relationship between MIME types and file extensions.
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.
attribute AString description
 A human readable description of the MIME info.
attribute PRUint32 macType
 Mac Type and creator types.
attribute PRUint32 macCreator
attribute nsIFile preferredApplicationHandler
 Returns a nsIFile that points to the application the user has said they want associated with this content type.
attribute AString applicationDescription
 A pretty name description of the preferred application.
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.
const long saveToDisk = 0
const long alwaysAsk = 1
const long useHelperApp = 2
const long handleInternally = 3
const long useSystemDefault = 4
attribute nsMIMEInfoHandleAction 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.
attribute boolean alwaysAskBeforeHandling
 alwaysAskBeforeHandling: if true, we should always give the user a dialog asking how to dispose of this content.

Detailed Description

Definition at line 58 of file nsIMIMEInfo.idl.


Member Function Documentation

void nsIMIMEInfo::appendExtension ( in AUTF8String  aExtension)

Append a given extension to the set of extensions.

Returns whether or not these two MIME infos are logically equivalent maintaining the one-to-many relationship between MIME types and file extensions.

Returns:
TRUE if the two are considered equal
boolean nsIMIMEInfo::extensionExists ( in AUTF8String  aExtension)

Returns whether or not the given extension is associated with this MIME info.

Returns:
TRUE if the association exists.

Gives you an array of file types associated with this type.

Returns:
Number of elements in the array.
Array of extensions.

Launches the application with the specified file, in a way that depends on the value of preferredAction.

preferredAction must be useHelperApp or useSystemDefault.

Parameters:
aFileThe file to launch this application with.
Exceptions:
NS_ERROR_INVALID_ARGif 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.


Member Data Documentation

Definition at line 160 of file nsIMIMEInfo.idl.

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

Definition at line 176 of file nsIMIMEInfo.idl.

A pretty name description of the preferred application.

Definition at line 132 of file nsIMIMEInfo.idl.

A pretty name description of the associated default application.

Only usable if hasDefaultHandler is true.

Definition at line 145 of file nsIMIMEInfo.idl.

A human readable description of the MIME info.

Returns:
The description

Definition at line 105 of file nsIMIMEInfo.idl.

Definition at line 162 of file nsIMIMEInfo.idl.

Indicates whether a default application handler exists, i.e.

whether launchWithFile with action = useSystemDefault is possible and applicationDescription will contain usable information.

Definition at line 139 of file nsIMIMEInfo.idl.

Definition at line 111 of file nsIMIMEInfo.idl.

Mac Type and creator types.

Definition at line 110 of file nsIMIMEInfo.idl.

readonly attribute ACString nsIMIMEInfo::MIMEType

The MIME type of this MIMEInfo.

Returns:
String representing the MIME type.

Definition at line 98 of file nsIMIMEInfo.idl.

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.

Definition at line 170 of file nsIMIMEInfo.idl.

Returns a nsIFile that points to the application the user has said they want associated with this content type.

This is not always guaranteed to be set!!

Definition at line 127 of file nsIMIMEInfo.idl.

Returns the first extension association in the internal set of extensions.

Returns:
The first extension.

Definition at line 91 of file nsIMIMEInfo.idl.

Definition at line 159 of file nsIMIMEInfo.idl.

Definition at line 161 of file nsIMIMEInfo.idl.

Definition at line 163 of file nsIMIMEInfo.idl.


The documentation for this interface was generated from the following file: