1 | /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
---|
2 | /* ***** BEGIN LICENSE BLOCK *****
|
---|
3 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
---|
4 | *
|
---|
5 | * The contents of this file are subject to the Mozilla Public License Version
|
---|
6 | * 1.1 (the "License"); you may not use this file except in compliance with
|
---|
7 | * the License. You may obtain a copy of the License at
|
---|
8 | * http://www.mozilla.org/MPL/
|
---|
9 | *
|
---|
10 | * Software distributed under the License is distributed on an "AS IS" basis,
|
---|
11 | * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
---|
12 | * for the specific language governing rights and limitations under the
|
---|
13 | * License.
|
---|
14 | *
|
---|
15 | * The Original Code is mozilla.org code.
|
---|
16 | *
|
---|
17 | * The Initial Developer of the Original Code is
|
---|
18 | * Netscape Communications Corporation.
|
---|
19 | * Portions created by the Initial Developer are Copyright (C) 1999
|
---|
20 | * the Initial Developer. All Rights Reserved.
|
---|
21 | *
|
---|
22 | * Contributor(s):
|
---|
23 | *
|
---|
24 | * Alternatively, the contents of this file may be used under the terms of
|
---|
25 | * either of the GNU General Public License Version 2 or later (the "GPL"),
|
---|
26 | * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
---|
27 | * in which case the provisions of the GPL or the LGPL are applicable instead
|
---|
28 | * of those above. If you wish to allow use of your version of this file only
|
---|
29 | * under the terms of either the GPL or the LGPL, and not to allow others to
|
---|
30 | * use your version of this file under the terms of the MPL, indicate your
|
---|
31 | * decision by deleting the provisions above and replace them with the notice
|
---|
32 | * and other provisions required by the GPL or the LGPL. If you do not delete
|
---|
33 | * the provisions above, a recipient may use your version of this file under
|
---|
34 | * the terms of any one of the MPL, the GPL or the LGPL.
|
---|
35 | *
|
---|
36 | * ***** END LICENSE BLOCK ***** */
|
---|
37 |
|
---|
38 | /* The nsIInterfaceInfo public declaration. */
|
---|
39 |
|
---|
40 |
|
---|
41 | #include "nsISupports.idl"
|
---|
42 |
|
---|
43 | // forward declaration of non-XPCOM types
|
---|
44 |
|
---|
45 | [ptr] native nsXPTMethodInfoPtr(nsXPTMethodInfo);
|
---|
46 | [ptr] native nsXPTConstantPtr(nsXPTConstant);
|
---|
47 | [ptr] native nsXPTParamInfoPtr(nsXPTParamInfo);
|
---|
48 | native nsXPTType(nsXPTType);
|
---|
49 |
|
---|
50 | // We bend the rules to do a [shared] nsIID (but this is never scriptable)
|
---|
51 | [ptr] native nsIIDPtrShared(nsIID);
|
---|
52 |
|
---|
53 | %{C++
|
---|
54 | class nsXPTMethodInfo;
|
---|
55 | class nsXPTConstant;
|
---|
56 | class nsXPTParamInfo;
|
---|
57 | class nsXPTType;
|
---|
58 | %}
|
---|
59 |
|
---|
60 | /* this is NOT intended to be scriptable */
|
---|
61 | [uuid(215DBE04-94A7-11d2-BA58-00805F8A5DD7)]
|
---|
62 | interface nsIInterfaceInfo : nsISupports
|
---|
63 | {
|
---|
64 | readonly attribute string name;
|
---|
65 | readonly attribute nsIIDPtr InterfaceIID;
|
---|
66 |
|
---|
67 | PRBool isScriptable();
|
---|
68 |
|
---|
69 | readonly attribute nsIInterfaceInfo parent;
|
---|
70 |
|
---|
71 | /**
|
---|
72 | * These include counts for parent (and all ancestors).
|
---|
73 | */
|
---|
74 | readonly attribute PRUint16 methodCount;
|
---|
75 | readonly attribute PRUint16 constantCount;
|
---|
76 |
|
---|
77 | /**
|
---|
78 | * These include methods and constants for parent (and all ancestors).
|
---|
79 | *
|
---|
80 | * These do *not* make copies ***explicit bending of XPCOM rules***.
|
---|
81 | */
|
---|
82 |
|
---|
83 | void getMethodInfo(in PRUint16 index,
|
---|
84 | [shared, retval] out nsXPTMethodInfoPtr info);
|
---|
85 |
|
---|
86 | void getMethodInfoForName(in string methodName, out PRUint16 index,
|
---|
87 | [shared, retval] out nsXPTMethodInfoPtr info);
|
---|
88 |
|
---|
89 | void getConstant(in PRUint16 index,
|
---|
90 | [shared, retval] out nsXPTConstantPtr constant);
|
---|
91 |
|
---|
92 |
|
---|
93 | /**
|
---|
94 | * Get the interface information or iid associated with a param of some
|
---|
95 | * method in this interface.
|
---|
96 | */
|
---|
97 |
|
---|
98 | nsIInterfaceInfo getInfoForParam(in PRUint16 methodIndex,
|
---|
99 | [const] in nsXPTParamInfoPtr param);
|
---|
100 |
|
---|
101 | nsIIDPtr getIIDForParam(in PRUint16 methodIndex,
|
---|
102 | [const] in nsXPTParamInfoPtr param);
|
---|
103 |
|
---|
104 |
|
---|
105 | /**
|
---|
106 | * These do *not* make copies ***explicit bending of XPCOM rules***.
|
---|
107 | */
|
---|
108 |
|
---|
109 | nsXPTType getTypeForParam(in PRUint16 methodIndex,
|
---|
110 | [const] in nsXPTParamInfoPtr param,
|
---|
111 | in PRUint16 dimension);
|
---|
112 |
|
---|
113 | PRUint8 getSizeIsArgNumberForParam(in PRUint16 methodIndex,
|
---|
114 | [const] in nsXPTParamInfoPtr param,
|
---|
115 | in PRUint16 dimension);
|
---|
116 |
|
---|
117 | PRUint8 getLengthIsArgNumberForParam(in PRUint16 methodIndex,
|
---|
118 | [const] in nsXPTParamInfoPtr param,
|
---|
119 | in PRUint16 dimension);
|
---|
120 |
|
---|
121 | PRUint8 getInterfaceIsArgNumberForParam(in PRUint16 methodIndex,
|
---|
122 | [const] in nsXPTParamInfoPtr param);
|
---|
123 |
|
---|
124 | PRBool isIID(in nsIIDPtr IID);
|
---|
125 |
|
---|
126 | void getNameShared([shared,retval] out string name);
|
---|
127 | void getIIDShared([shared,retval] out nsIIDPtrShared iid);
|
---|
128 |
|
---|
129 | PRBool isFunction();
|
---|
130 |
|
---|
131 | PRBool hasAncestor(in nsIIDPtr iid);
|
---|
132 |
|
---|
133 | [notxpcom] nsresult getIIDForParamNoAlloc(in PRUint16 methodIndex,
|
---|
134 | [const] in nsXPTParamInfoPtr param,
|
---|
135 | out nsIID iid);
|
---|
136 | };
|
---|
137 |
|
---|