dom/interfaces/apps/nsIAppsService.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* This Source Code Form is subject to the terms of the Mozilla Public
michael@0 2 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
michael@0 3 * You can obtain one at http://mozilla.org/MPL/2.0/. */
michael@0 4
michael@0 5 #include "domstubs.idl"
michael@0 6
michael@0 7 interface mozIDOMApplication;
michael@0 8 interface mozIApplication;
michael@0 9 interface nsIURI;
michael@0 10
michael@0 11 %{C++
michael@0 12 #define APPS_SERVICE_CID { 0x05072afa, 0x92fe, 0x45bf, { 0xae, 0x22, 0x39, 0xb6, 0x9c, 0x11, 0x70, 0x58 } }
michael@0 13 #define APPS_SERVICE_CONTRACTID "@mozilla.org/AppsService;1"
michael@0 14 %}
michael@0 15
michael@0 16 /*
michael@0 17 * This service allows accessing some DOMApplicationRegistry methods from
michael@0 18 * non-javascript code.
michael@0 19 */
michael@0 20 [scriptable, uuid(93cde78d-56f6-4322-b707-9b23eb80d90d)]
michael@0 21 interface nsIAppsService : nsISupports
michael@0 22 {
michael@0 23 mozIApplication getAppByManifestURL(in DOMString manifestURL);
michael@0 24
michael@0 25 /**
michael@0 26 * Returns the |localId| of the app associated with the |manifestURL| passed
michael@0 27 * in parameter.
michael@0 28 * Returns nsIScriptSecurityManager::NO_APP_ID if |manifestURL| isn't a valid
michael@0 29 * installed manifest URL.
michael@0 30 */
michael@0 31 unsigned long getAppLocalIdByManifestURL(in DOMString manifestURL);
michael@0 32
michael@0 33 /**
michael@0 34 * Returns the application associated to this localId.
michael@0 35 */
michael@0 36 mozIApplication getAppByLocalId(in unsigned long localId);
michael@0 37
michael@0 38 /**
michael@0 39 * Returns the manifest URL associated to this localId.
michael@0 40 */
michael@0 41 DOMString getManifestURLByLocalId(in unsigned long localId);
michael@0 42
michael@0 43 /**
michael@0 44 * Returns the CSP associated to this localId.
michael@0 45 */
michael@0 46 DOMString getCSPByLocalId(in unsigned long localId);
michael@0 47
michael@0 48 /**
michael@0 49 * Returns the basepath for core apps
michael@0 50 */
michael@0 51 DOMString getCoreAppsBasePath();
michael@0 52
michael@0 53 /**
michael@0 54 * Returns the basepath for regular packaged apps
michael@0 55 */
michael@0 56 DOMString getWebAppsBasePath();
michael@0 57
michael@0 58 jsval getAppInfo(in DOMString appId);
michael@0 59
michael@0 60 /**
michael@0 61 * Returns a URI to redirect to when we get a redirection to 'uri'.
michael@0 62 * Returns null if no redirection is declared for this uri.
michael@0 63 */
michael@0 64 nsIURI getRedirect(in unsigned long localId, in nsIURI uri);
michael@0 65
michael@0 66 /**
michael@0 67 * Returns the localId if the app was installed from a store
michael@0 68 */
michael@0 69 DOMString getAppLocalIdByStoreId(in DOMString storeID);
michael@0 70 };

mercurial