PageRenderTime 192ms CodeModel.GetById 71ms app.highlight 2ms RepoModel.GetById 71ms app.codeStats 0ms

/gecko_sdk/idl/nsIClassInfo.idl

http://firefox-mac-pdf.googlecode.com/
IDL | 131 lines | 22 code | 15 blank | 94 comment | 0 complexity | 5792d28d109e5529a5e7d36618c78935 MD5 | raw file
  1/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  2 *
  3 * ***** BEGIN LICENSE BLOCK *****
  4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  5 *
  6 * The contents of this file are subject to the Mozilla Public License Version
  7 * 1.1 (the "License"); you may not use this file except in compliance with
  8 * the License. You may obtain a copy of the License at
  9 * http://www.mozilla.org/MPL/
 10 *
 11 * Software distributed under the License is distributed on an "AS IS" basis,
 12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 13 * for the specific language governing rights and limitations under the
 14 * License.
 15 *
 16 * The Original Code is Mozilla Communicator client code, released
 17 * March 31, 1998.
 18 *
 19 * The Initial Developer of the Original Code is
 20 * Netscape Communications Corporation.
 21 * Portions created by the Initial Developer are Copyright (C) 1998
 22 * the Initial Developer. All Rights Reserved.
 23 *
 24 * Contributor(s):
 25 *   John Bandhauer <jband@netscape.com>
 26 *
 27 * Alternatively, the contents of this file may be used under the terms of
 28 * either of the GNU General Public License Version 2 or later (the "GPL"),
 29 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 30 * in which case the provisions of the GPL or the LGPL are applicable instead
 31 * of those above. If you wish to allow use of your version of this file only
 32 * under the terms of either the GPL or the LGPL, and not to allow others to
 33 * use your version of this file under the terms of the MPL, indicate your
 34 * decision by deleting the provisions above and replace them with the notice
 35 * and other provisions required by the GPL or the LGPL. If you do not delete
 36 * the provisions above, a recipient may use your version of this file under
 37 * the terms of any one of the MPL, the GPL or the LGPL.
 38 *
 39 * ***** END LICENSE BLOCK ***** */
 40
 41#include "nsISupports.idl"
 42
 43/**
 44 * Provides information about a specific implementation class
 45 * @status FROZEN
 46 */
 47
 48[scriptable, uuid(986c11d0-f340-11d4-9075-0010a4e73d9a)]
 49interface nsIClassInfo : nsISupports
 50{
 51    /**
 52     * Get an ordered list of the interface ids that instances of the class 
 53     * promise to implement. Note that nsISupports is an implicit member 
 54     * of any such list and need not be included. 
 55     *
 56     * Should set *count = 0 and *array = null and return NS_OK if getting the 
 57     * list is not supported.
 58     */
 59    void getInterfaces(out PRUint32 count, 
 60                       [array, size_is(count), retval] out nsIIDPtr array);
 61
 62    /**
 63     * Get a language mapping specific helper object that may assist in using
 64     * objects of this class in a specific lanaguage. For instance, if asked
 65     * for the helper for nsIProgrammingLanguage::JAVASCRIPT this might return 
 66     * an object that can be QI'd into the nsIXPCScriptable interface to assist 
 67     * XPConnect in supplying JavaScript specific behavior to callers of the 
 68     * instance object.
 69     *
 70     * see: nsIProgrammingLanguage.idl
 71     *
 72     * Should return null if no helper available for given language.
 73     */
 74    nsISupports getHelperForLanguage(in PRUint32 language);
 75
 76    /**
 77     * A contract ID through which an instance of this class can be created
 78     * (or accessed as a service, if |flags & SINGLETON|), or null.
 79     */
 80    readonly attribute string   contractID;
 81
 82    /**
 83     * A human readable string naming the class, or null.
 84     */
 85    readonly attribute string   classDescription;
 86
 87    /**
 88     * A class ID through which an instance of this class can be created
 89     * (or accessed as a service, if |flags & SINGLETON|), or null.
 90     */
 91    readonly attribute nsCIDPtr classID;
 92
 93    /**
 94     * Return language type from list in nsIProgrammingLanguage
 95     */
 96
 97    readonly attribute PRUint32 implementationLanguage;
 98
 99    /**
100     * Bitflags for 'flags' attribute.
101     */
102    const PRUint32 SINGLETON            = 1 << 0;
103    const PRUint32 THREADSAFE           = 1 << 1;
104    const PRUint32 MAIN_THREAD_ONLY     = 1 << 2;
105    const PRUint32 DOM_OBJECT           = 1 << 3;
106    const PRUint32 PLUGIN_OBJECT        = 1 << 4;
107    const PRUint32 EAGER_CLASSINFO      = 1 << 5;
108    /**
109     * 'flags' attribute bitflag: whether objects of this type implement
110     * nsIContent.
111     */
112    const PRUint32 CONTENT_NODE         = 1 << 6;
113    
114    // The high order bit is RESERVED for consumers of these flags. 
115    // No implementor of this interface should ever return flags 
116    // with this bit set.
117    const PRUint32 RESERVED             = 1 << 31;
118
119
120    readonly attribute PRUint32 flags;
121
122    /**
123     * Also a class ID through which an instance of this class can be created
124     * (or accessed as a service, if |flags & SINGLETON|).  If the class does
125     * not have a CID, it should return NS_ERROR_NOT_AVAILABLE.  This attribute
126     * exists so C++ callers can avoid allocating and freeing a CID, as would
127     * happen if they used classID.
128     */
129    [notxpcom] readonly attribute nsCID classIDNoAlloc;
130
131};