xpcom/ds/nsIProperties.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xpcom/ds/nsIProperties.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,46 @@
     1.4 +/* -*- Mode: IDL; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#include "nsISupports.idl"
    1.10 +
    1.11 +/*
    1.12 + * Simple mapping service interface.
    1.13 + */
    1.14 +
    1.15 +[scriptable, uuid(78650582-4e93-4b60-8e85-26ebd3eb14ca)]
    1.16 +interface nsIProperties : nsISupports
    1.17 +{
    1.18 +    /**
    1.19 +     * Gets a property with a given name. 
    1.20 +     *
    1.21 +     * @throws NS_ERROR_FAILURE if a property with that name doesn't exist.
    1.22 +     * @throws NS_ERROR_NO_INTERFACE if the found property fails to QI to the 
    1.23 +     * given iid.
    1.24 +     */
    1.25 +    void get(in string prop, in nsIIDRef iid, 
    1.26 +             [iid_is(iid),retval] out nsQIResult result);
    1.27 +
    1.28 +    /**
    1.29 +     * Sets a property with a given name to a given value. 
    1.30 +     */
    1.31 +    void set(in string prop, in nsISupports value);
    1.32 +
    1.33 +    /**
    1.34 +     * Returns true if the property with the given name exists.
    1.35 +     */
    1.36 +    boolean has(in string prop);
    1.37 +
    1.38 +    /**
    1.39 +     * Undefines a property.
    1.40 +     * @throws NS_ERROR_FAILURE if a property with that name doesn't
    1.41 +     * already exist.
    1.42 +     */
    1.43 +    void undefine(in string prop);
    1.44 +
    1.45 +    /**
    1.46 +     *  Returns an array of the keys.
    1.47 +     */
    1.48 +    void getKeys(out uint32_t count, [array, size_is(count), retval] out string keys);
    1.49 +};

mercurial