toolkit/mozapps/extensions/amIAddonManager.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/toolkit/mozapps/extensions/amIAddonManager.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,29 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +
     1.8 +#include "nsISupports.idl"
     1.9 +
    1.10 +interface nsIURI;
    1.11 +
    1.12 +/**
    1.13 + * A service to make some AddonManager functionality available to C++ callers.
    1.14 + * Javascript callers should still use AddonManager.jsm directly.
    1.15 + */
    1.16 +[scriptable, function, uuid(7b45d82d-7ad5-48d7-9b05-f32eb9818cd4)]
    1.17 +interface amIAddonManager : nsISupports
    1.18 +{
    1.19 +  /**
    1.20 +   * Synchronously map a URI to the corresponding Addon ID.
    1.21 +   *
    1.22 +   * Mappable URIs are limited to in-application resources belonging to the
    1.23 +   * add-on, such as Javascript compartments, XUL windows, XBL bindings, etc.
    1.24 +   * but do not include URIs from meta data, such as the add-on homepage.
    1.25 +   *
    1.26 +   * @param  aURI
    1.27 +   *         The nsIURI to map
    1.28 +   * @return
    1.29 +   *         true if the URI has been mapped successfully to an Addon ID
    1.30 +   */
    1.31 +  boolean mapURIToAddonID(in nsIURI aURI, out AUTF8String aID);
    1.32 +};

mercurial