VirtualBox

source: vbox/trunk/src/libs/xpcom18a4/xpcom/components/nsIClassInfo.idl@ 62375

Last change on this file since 62375 was 1, checked in by vboxsync, 55 years ago

import

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.9 KB
Line 
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 <[email protected]>
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#include "nsIProgrammingLanguage.idl"
43
44/**
45 * Provides information about a specific implementation class
46 * @status FROZEN
47 */
48
49[scriptable, uuid(986c11d0-f340-11d4-9075-0010a4e73d9a)]
50interface nsIClassInfo : nsISupports
51{
52 /**
53 * Get an ordered list of the interface ids that instances of the class
54 * promise to implement. Note that nsISupports is an implicit member
55 * of any such list and need not be included.
56 *
57 * Should set *count = 0 and *array = null and return NS_OK if getting the
58 * list is not supported.
59 */
60 void getInterfaces(out PRUint32 count,
61 [array, size_is(count), retval] out nsIIDPtr array);
62
63 /**
64 * Get a language mapping specific helper object that may assist in using
65 * objects of this class in a specific lanaguage. For instance, if asked
66 * for the helper for nsIProgrammingLanguage::JAVASCRIPT this might return
67 * an object that can be QI'd into the nsIXPCScriptable interface to assist
68 * XPConnect in supplying JavaScript specific behavior to callers of the
69 * instance object.
70 *
71 * see: nsIProgrammingLanguage.idl
72 *
73 * Should return null if no helper available for given language.
74 */
75 nsISupports getHelperForLanguage(in PRUint32 language);
76
77 /**
78 * A contract ID through which an instance of this class can be created
79 * (or accessed as a service, if |flags & SINGLETON|), or null.
80 */
81 readonly attribute string contractID;
82
83 /**
84 * A human readable string naming the class, or null.
85 */
86 readonly attribute string classDescription;
87
88 /**
89 * A class ID through which an instance of this class can be created
90 * (or accessed as a service, if |flags & SINGLETON|), or null.
91 */
92 readonly attribute nsCIDPtr classID;
93
94 /**
95 * Return language type from list in nsIProgrammingLanguage
96 */
97
98 readonly attribute PRUint32 implementationLanguage;
99
100 /**
101 * Bitflags for 'flags' attribute.
102 */
103 const PRUint32 SINGLETON = 1 << 0;
104 const PRUint32 THREADSAFE = 1 << 1;
105 const PRUint32 MAIN_THREAD_ONLY = 1 << 2;
106 const PRUint32 DOM_OBJECT = 1 << 3;
107 const PRUint32 PLUGIN_OBJECT = 1 << 4;
108 const PRUint32 EAGER_CLASSINFO = 1 << 5;
109 /**
110 * 'flags' attribute bitflag: whether objects of this type implement
111 * nsIContent.
112 */
113 const PRUint32 CONTENT_NODE = 1 << 6;
114
115 // The high order bit is RESERVED for consumers of these flags.
116 // No implementor of this interface should ever return flags
117 // with this bit set.
118 const PRUint32 RESERVED = 1 << 31;
119
120
121 readonly attribute PRUint32 flags;
122
123 /**
124 * Also a class ID through which an instance of this class can be created
125 * (or accessed as a service, if |flags & SINGLETON|). If the class does
126 * not have a CID, it should return NS_ERROR_NOT_AVAILABLE. This attribute
127 * exists so C++ callers can avoid allocating and freeing a CID, as would
128 * happen if they used classID.
129 */
130 [notxpcom] readonly attribute nsCID classIDNoAlloc;
131
132};
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette