This file is indexed.

/usr/share/idl/firefox/nsIExternalProtocolService.idl is in firefox-dev 11.0+build1-0ubuntu4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
/* -*- Mode: C++; tab-width: 3; indent-tabs-mode: nil; c-basic-offset: 2 -*-
 *
 * ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is the Mozilla browser.
 *
 * The Initial Developer of the Original Code is
 * Netscape Communications, Inc.
 * Portions created by the Initial Developer are Copyright (C) 1999
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *   Scott MacGregor <mscott@netscape.com>
 *   Myk Melez <myk@mozilla.org>
 *   Dan Mosedale <dmose@mozilla.org>
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either of the GNU General Public License Version 2 or later (the "GPL"),
 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 *
 * ***** END LICENSE BLOCK ***** */

#include "nsISupports.idl"

interface nsIURI;
interface nsIFile;
interface nsIInterfaceRequestor;
interface nsIHandlerInfo;

/**
 * The external protocol service is used for finding and launching
 * web handlers (a la registerProtocolHandler in the HTML5 draft) or 
 * platform-specific applications for handling particular protocols.
 *
 * You can ask the external protocol service if it has an external
 * handler for a given protocol scheme. And you can ask it to load 
 * the url using the default handler.
 */
[scriptable, uuid(70f93b7a-3ec6-4bcb-b093-92d9984c9f83)]
interface nsIExternalProtocolService : nsISupports
{
  /**
   * Check whether a handler for a specific protocol exists.  Specifically,
   * this looks to see whether there are any known possible application handlers
   * in either the nsIHandlerService datastore or registered with the OS.
   *
   * @param aProtocolScheme The scheme from a url: http, ftp, mailto, etc.
   *
   * @return true if we have a handler and false otherwise.
   *
   * XXX shouldn't aProtocolScheme be an ACString like nsIURI::scheme?
   */
  boolean externalProtocolHandlerExists(in string aProtocolScheme);

  /**
   * Check whether a handler for a specific protocol is "exposed" as a visible
   * feature of the current application.
   *
   * An exposed protocol handler is one that can be used in all contexts.  A
   * non-exposed protocol handler is one that can only be used internally by the
   * application.  For example, a non-exposed protocol would not be loaded by the
   * application in response to a link click or a X-remote openURL command.
   * Instead, it would be deferred to the system's external protocol handler.
   * XXX shouldn't aProtocolScheme be an ACString like nsIURI::scheme?
   */
  boolean isExposedProtocol(in string aProtocolScheme);

  /**
   * Retrieve the handler for the given protocol.  If neither the application
   * nor the OS knows about a handler for the protocol, the object this method
   * returns will represent a default handler for unknown content.
   * 
   * @param aProtocolScheme the scheme from a URL: http, ftp, mailto, etc.
   * 
   * Note: aProtocolScheme should not include a trailing colon, which is part
   * of the URI syntax, not part of the scheme itself (i.e. pass "mailto" not
   * "mailto:").
   * 
   * @return the handler, if any; otherwise a default handler
   */
  nsIHandlerInfo getProtocolHandlerInfo(in ACString aProtocolScheme);

  /**
   * Given a scheme, looks up the protocol info from the OS.  This should be
   * overridden by each OS's implementation.
   *
   * @param aScheme The protocol scheme we are looking for.
   * @param aFound  Was an OS default handler for this scheme found?
   * @return An nsIHanderInfo for the protocol.
   */
  nsIHandlerInfo getProtocolHandlerInfoFromOS(in ACString aProtocolScheme,
                                              out boolean aFound);

  /** 
   * Set some sane defaults for a protocol handler object.
   * 
   * @param aHandlerInfo      nsIHandlerInfo object, as returned by 
   *                          getProtocolHandlerInfoFromOS
   * @param aOSHandlerExists  was the object above created for an extant
   *                          OS default handler?  This is generally the
   *                          value of the aFound out param from
   *                          getProtocolHandlerInfoFromOS.
   */
  void setProtocolHandlerDefaults(in nsIHandlerInfo aHandlerInfo,
                                  in boolean aOSHandlerExists);

  /**
   * Used to load a url via an external protocol handler (if one exists)
   *
   * @param aURL The url to load
   *
   * @deprecated Use LoadURI instead (See Bug 389565 for removal)
   */
   [deprecated] void loadUrl(in nsIURI aURL);

  /**
   * Used to load a URI via an external application. Might prompt the user for
   * permission to load the external application.
   *
   * @param aURI
   *        The URI to load
   *
   * @param aWindowContext 
   *        The window to parent the dialog against, and, if a web handler
   *        is chosen, it is loaded in this window as well.  This parameter
   *        may be ultimately passed nsIURILoader.openURI in the case of a
   *        web handler, and aWindowContext is null or not present, web
   *        handlers will fail.  We need to do better than that; bug 394483
   *        filed in order to track.
   * 
   * @note  Embedders that do not expose the http protocol should not currently
   *        use web-based protocol handlers, as handoff won't work correctly
   *        (bug 394479).  
   */
  void loadURI(in nsIURI aURI,
               [optional] in nsIInterfaceRequestor aWindowContext);

  /**
   * Gets a human-readable description for the application responsible for
   * handling a specific protocol.
   *
   * @param aScheme The scheme to look up. For example, "mms".
   *
   * @throw NS_ERROR_NOT_IMPLEMENTED
   *        If getting descriptions for protocol helpers is not supported
   * @throw NS_ERROR_NOT_AVAILABLE
   *        If no protocol helper exists for this scheme, or if it is not
   *        possible to get a description for it.
   */
  AString getApplicationDescription(in AUTF8String aScheme);
};