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
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/
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
15 * The Original Code is mozilla.org code.
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.
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.
36 * ***** END LICENSE BLOCK ***** */
38 /* The nsIInterfaceInfo public declaration. */
41 #include
"nsISupports.idl"
43 // forward declaration of non-XPCOM types
45 [ptr] native nsXPTMethodInfoPtr
(nsXPTMethodInfo
);
46 [ptr] native nsXPTConstantPtr
(nsXPTConstant
);
47 [ptr] native nsXPTParamInfoPtr
(nsXPTParamInfo
);
48 native nsXPTType
(nsXPTType
);
50 // We bend the rules to do a [shared] nsIID (but this is never scriptable)
51 [ptr] native nsIIDPtrShared
(nsIID
);
54 class nsXPTMethodInfo
;
60 /* this is NOT intended to be scriptable */
61 [uuid(215DBE04
-94A7
-11d2
-BA58
-00805F8A5DD7
)]
62 interface nsIInterfaceInfo
: nsISupports
64 readonly attribute
string name
;
65 readonly attribute nsIIDPtr InterfaceIID
;
67 PRBool isScriptable
();
69 readonly attribute nsIInterfaceInfo parent
;
72 * These include counts for parent (and all ancestors).
74 readonly attribute PRUint16 methodCount
;
75 readonly attribute PRUint16 constantCount
;
78 * These include methods and constants for parent (and all ancestors).
80 * These do *not* make copies ***explicit bending of XPCOM rules***.
83 void getMethodInfo
(in PRUint16 index
,
84 [shared
, retval] out nsXPTMethodInfoPtr info
);
86 void getMethodInfoForName
(in string methodName
, out PRUint16 index
,
87 [shared
, retval] out nsXPTMethodInfoPtr info
);
89 void getConstant
(in PRUint16 index
,
90 [shared
, retval] out nsXPTConstantPtr constant
);
94 * Get the interface information or iid associated with a param of some
95 * method in this interface.
98 nsIInterfaceInfo getInfoForParam
(in PRUint16 methodIndex
,
99 [const] in nsXPTParamInfoPtr param
);
101 nsIIDPtr getIIDForParam
(in PRUint16 methodIndex
,
102 [const] in nsXPTParamInfoPtr param
);
106 * These do *not* make copies ***explicit bending of XPCOM rules***.
109 nsXPTType getTypeForParam
(in PRUint16 methodIndex
,
110 [const] in nsXPTParamInfoPtr param
,
111 in PRUint16 dimension
);
113 PRUint8 getSizeIsArgNumberForParam
(in PRUint16 methodIndex
,
114 [const] in nsXPTParamInfoPtr param
,
115 in PRUint16 dimension
);
117 PRUint8 getLengthIsArgNumberForParam
(in PRUint16 methodIndex
,
118 [const] in nsXPTParamInfoPtr param
,
119 in PRUint16 dimension
);
121 PRUint8 getInterfaceIsArgNumberForParam
(in PRUint16 methodIndex
,
122 [const] in nsXPTParamInfoPtr param
);
124 PRBool isIID
(in nsIIDPtr IID
);
126 void getNameShared
([shared
,retval] out string name
);
127 void getIIDShared
([shared
,retval] out nsIIDPtrShared iid
);
131 PRBool hasAncestor
(in nsIIDPtr iid
);
133 [notxpcom
] nsresult getIIDForParamNoAlloc
(in PRUint16 methodIndex
,
134 [const] in nsXPTParamInfoPtr param
,