CLOSED TREE: TraceMonkey merge head. (a=blockers)
[mozilla-central.git] / xpcom / system / nsIGnomeVFSService.idl
blobd20e57e5e92f181be4d5b3dc69385cd32c8f5e95
1 /* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
15 * The Original Code is the Mozilla GNOME integration code.
17 * The Initial Developer of the Original Code is
18 * IBM Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 2004
20 * the Initial Developer. All Rights Reserved.
22 * Contributor(s):
23 * Brian Ryner <bryner@brianryner.com>
25 * Alternatively, the contents of this file may be used under the terms of
26 * either the GNU General Public License Version 2 or later (the "GPL"), or
27 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
37 * ***** END LICENSE BLOCK ***** */
39 #include "nsISupports.idl"
41 interface nsIUTF8StringEnumerator;
42 interface nsIURI;
44 /* nsIGnomeVFSMimeApp holds information about an application that is looked up
45 with nsIGnomeVFSService::GetAppForMimeType. */
47 [scriptable, uuid(66009894-9877-405b-9321-bf30420e34e6)]
48 interface nsIGnomeVFSMimeApp : nsISupports
50 const long EXPECTS_URIS = 0;
51 const long EXPECTS_PATHS = 1;
52 const long EXPECTS_URIS_FOR_NON_FILES = 2;
54 readonly attribute AUTF8String id;
55 readonly attribute AUTF8String name;
56 readonly attribute AUTF8String command;
57 readonly attribute boolean canOpenMultipleFiles;
58 readonly attribute long expectsURIs; // see constants above
59 readonly attribute nsIUTF8StringEnumerator supportedURISchemes;
60 readonly attribute boolean requiresTerminal;
62 void launch(in AUTF8String uri);
66 * The VFS service makes use of a registry for information.
68 * The MIME registry holds information about MIME types, such as which
69 * extensions map to a given MIME type. The MIME registry also stores the
70 * id of the application selected to handle each MIME type.
73 [scriptable, uuid(d1ac73a6-2ceb-4164-8142-215afe7fe8a6)]
74 interface nsIGnomeVFSService : nsISupports
76 /*** MIME registry methods ***/
78 /* Obtain the MIME type registered for an extension. The extension
79 should not include a leading dot. */
80 AUTF8String getMimeTypeFromExtension(in AUTF8String extension);
82 /* Obtain the preferred application for opening a given MIME type */
83 nsIGnomeVFSMimeApp getAppForMimeType(in AUTF8String mimeType);
85 /* Obtain a description for the given MIME type */
86 AUTF8String getDescriptionForMimeType(in AUTF8String mimeType);
88 /*** Misc. methods ***/
90 /* Open the given URI in the default application */
91 void showURI(in nsIURI uri);
92 [noscript] void showURIForInput(in ACString uri);
95 %{C++
96 #define NS_GNOMEVFSSERVICE_CONTRACTID "@mozilla.org/gnome-vfs-service;1"