WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

nsIExternalHelperAppService

IID:0ea90cf3-2dd9-470f-8f76-f141743c5678
Inherits From:nsISupports

The external helper app service is used for finding and launching platform specific external applications for a given mime content type.

This interface is intended to be used as a service. To create an object implementing this interface:

var obj = Components.classes["@mozilla.org/uriloader/external-helper-app-service;1"].
            getService(Components.interfaces.nsIExternalHelperAppService);

This interface is implemented by the following components:


Methods

PRBool applyDecodingForExtension ( AUTF8String extension , ACString encodingType ) nsIStreamListener doContent ( ACString mimeContentType , nsIRequest request , nsIInterfaceRequestor windowContext )

PRBool applyDecodingForExtension ( AUTF8String extension , ACString encodingType )

Returns true if data from a URL with this extension combination is to be decoded from encodingType prior to saving or passing off to helper apps, false otherwise.

Arguments:
extension
encodingType

nsIStreamListener doContent ( ACString mimeContentType , nsIRequest request , nsIInterfaceRequestor windowContext )

Binds an external helper application to a stream listener. The caller should pump data into the returned stream listener. When the OnStopRequest is issued, the stream listener implementation will launch the helper app with this data.

Arguments:
mimeContentType: The content type of the incoming data
request: The request corresponding to the incoming data
windowContext: Use GetInterface to retrieve properties like the dom window or parent window... The service might need this in order to bring up dialogs.
Returns:
nsIStreamListener which the caller should pump the data into.

Reference documentation is generated from Mozilla's source.

Copyright © 1999-2006 XULPlanet.com