dom/interfaces/apps/mozIApplication.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/dom/interfaces/apps/mozIApplication.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,52 @@
     1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     1.5 + * vim: sw=2 ts=8 et :
     1.6 + */
     1.7 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.8 + * License, v. 2.0. If a copy of the MPL was not distributed with this file,
     1.9 + * You can obtain one at http://mozilla.org/MPL/2.0/. */
    1.10 +
    1.11 +#include "domstubs.idl"
    1.12 +
    1.13 +/**
    1.14 + * We expose Gecko-internal helpers related to "web apps" through this
    1.15 + * sub-interface.
    1.16 + */
    1.17 +[scriptable, uuid(7bd62430-c374-49eb-be1b-ce821a180360)]
    1.18 +interface mozIApplication: nsISupports
    1.19 +{
    1.20 +  /* Return true if this app has |permission|. */
    1.21 +  boolean hasPermission(in string permission);
    1.22 +
    1.23 +  /* Application status as defined in nsIPrincipal. */
    1.24 +  readonly attribute unsigned short appStatus;
    1.25 +
    1.26 +  /* Returns the uuid of the app. */
    1.27 +  readonly attribute DOMString id;
    1.28 +
    1.29 +  /* Returns the origin of the app. */
    1.30 +  readonly attribute DOMString origin;
    1.31 +
    1.32 +  /* Returns the manifest url of the app. */
    1.33 +  readonly attribute DOMString manifestURL;
    1.34 +
    1.35 +  /* Returns the local id of the app. */
    1.36 +  readonly attribute unsigned long localId;
    1.37 +
    1.38 +  /* Returns the base directory for the app */
    1.39 +  readonly attribute DOMString basePath;
    1.40 +
    1.41 +  /* Name copied from the manifest */
    1.42 +  readonly attribute DOMString name;
    1.43 +
    1.44 +  /* CSP copied from the manifest */
    1.45 +  readonly attribute DOMString csp;
    1.46 +
    1.47 +  /* Store ID if the app is installed from a store */
    1.48 +  readonly attribute DOMString storeID;
    1.49 +
    1.50 +  /* Store version if the app is installed from a store */
    1.51 +  readonly attribute unsigned long storeVersion;
    1.52 +
    1.53 +  /* role copied from the manifest */
    1.54 +  readonly attribute DOMString role;
    1.55 +};

mercurial