michael@0: /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: /* The nsIInterfaceInfo public declaration. */ michael@0: michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: // forward declaration of non-XPCOM types michael@0: michael@0: [ptr] native nsXPTMethodInfoPtr(nsXPTMethodInfo); michael@0: [ptr] native nsXPTConstantPtr(nsXPTConstant); michael@0: [ptr] native nsXPTParamInfoPtr(nsXPTParamInfo); michael@0: native nsXPTType(nsXPTType); michael@0: michael@0: // We bend the rules to do a [shared] nsIID (but this is never scriptable) michael@0: [ptr] native nsIIDPtrShared(nsIID); michael@0: michael@0: %{C++ michael@0: class nsXPTMethodInfo; michael@0: class nsXPTConstant; michael@0: class nsXPTParamInfo; michael@0: class nsXPTType; michael@0: %} michael@0: michael@0: /* this is NOT intended to be scriptable */ michael@0: [uuid(1affa260-8965-4612-869a-78af4ccfb287)] michael@0: interface nsIInterfaceInfo : nsISupports michael@0: { michael@0: readonly attribute string name; michael@0: readonly attribute nsIIDPtr InterfaceIID; michael@0: michael@0: boolean isScriptable(); michael@0: boolean isBuiltinClass(); michael@0: michael@0: readonly attribute nsIInterfaceInfo parent; michael@0: michael@0: /** michael@0: * These include counts for parent (and all ancestors). michael@0: */ michael@0: readonly attribute uint16_t methodCount; michael@0: readonly attribute uint16_t constantCount; michael@0: michael@0: /** michael@0: * These include methods and constants for parent (and all ancestors). michael@0: * michael@0: * These do *not* make copies ***explicit bending of XPCOM rules***. michael@0: */ michael@0: michael@0: void getMethodInfo(in uint16_t index, michael@0: [shared, retval] out nsXPTMethodInfoPtr info); michael@0: michael@0: void getMethodInfoForName(in string methodName, out uint16_t index, michael@0: [shared, retval] out nsXPTMethodInfoPtr info); michael@0: michael@0: void getConstant(in uint16_t index, michael@0: [shared, retval] out nsXPTConstantPtr constant); michael@0: michael@0: michael@0: /** michael@0: * Get the interface information or iid associated with a param of some michael@0: * method in this interface. michael@0: */ michael@0: michael@0: nsIInterfaceInfo getInfoForParam(in uint16_t methodIndex, michael@0: [const] in nsXPTParamInfoPtr param); michael@0: michael@0: nsIIDPtr getIIDForParam(in uint16_t methodIndex, michael@0: [const] in nsXPTParamInfoPtr param); michael@0: michael@0: michael@0: /** michael@0: * These do *not* make copies ***explicit bending of XPCOM rules***. michael@0: */ michael@0: michael@0: nsXPTType getTypeForParam(in uint16_t methodIndex, michael@0: [const] in nsXPTParamInfoPtr param, michael@0: in uint16_t dimension); michael@0: michael@0: uint8_t getSizeIsArgNumberForParam(in uint16_t methodIndex, michael@0: [const] in nsXPTParamInfoPtr param, michael@0: in uint16_t dimension); michael@0: michael@0: uint8_t getInterfaceIsArgNumberForParam(in uint16_t methodIndex, michael@0: [const] in nsXPTParamInfoPtr param); michael@0: michael@0: boolean isIID(in nsIIDPtr IID); michael@0: michael@0: void getNameShared([shared,retval] out string name); michael@0: void getIIDShared([shared,retval] out nsIIDPtrShared iid); michael@0: michael@0: boolean isFunction(); michael@0: michael@0: boolean hasAncestor(in nsIIDPtr iid); michael@0: michael@0: [notxpcom] nsresult getIIDForParamNoAlloc(in uint16_t methodIndex, michael@0: [const] in nsXPTParamInfoPtr param, michael@0: out nsIID iid); michael@0: }; michael@0: