xpcom/reflect/xptinfo/public/nsIInterfaceInfo.idl

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xpcom/reflect/xptinfo/public/nsIInterfaceInfo.idl	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,102 @@
     1.4 +/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +/* The nsIInterfaceInfo public declaration. */
    1.10 +
    1.11 +
    1.12 +#include "nsISupports.idl"
    1.13 +
    1.14 +// forward declaration of non-XPCOM types
    1.15 +
    1.16 +[ptr] native nsXPTMethodInfoPtr(nsXPTMethodInfo);
    1.17 +[ptr] native nsXPTConstantPtr(nsXPTConstant);
    1.18 +[ptr] native nsXPTParamInfoPtr(nsXPTParamInfo);
    1.19 +      native nsXPTType(nsXPTType);
    1.20 +
    1.21 +// We bend the rules to do a [shared] nsIID (but this is never scriptable)  
    1.22 +[ptr] native nsIIDPtrShared(nsIID);
    1.23 +
    1.24 +%{C++
    1.25 +class nsXPTMethodInfo;
    1.26 +class nsXPTConstant;
    1.27 +class nsXPTParamInfo;
    1.28 +class nsXPTType;
    1.29 +%}
    1.30 +
    1.31 +/* this is NOT intended to be scriptable */
    1.32 +[uuid(1affa260-8965-4612-869a-78af4ccfb287)]
    1.33 +interface nsIInterfaceInfo : nsISupports
    1.34 +{
    1.35 +    readonly attribute string   name;
    1.36 +    readonly attribute nsIIDPtr InterfaceIID;
    1.37 +
    1.38 +    boolean isScriptable();
    1.39 +    boolean isBuiltinClass();
    1.40 +
    1.41 +    readonly attribute nsIInterfaceInfo parent;
    1.42 +
    1.43 +    /**
    1.44 +    * These include counts for parent (and all ancestors).
    1.45 +    */
    1.46 +    readonly attribute uint16_t methodCount;
    1.47 +    readonly attribute uint16_t constantCount;
    1.48 +
    1.49 +    /**
    1.50 +    * These include methods and constants for parent (and all ancestors).
    1.51 +    * 
    1.52 +    * These do *not* make copies ***explicit bending of XPCOM rules***.
    1.53 +    */
    1.54 +    
    1.55 +    void getMethodInfo(in uint16_t index, 
    1.56 +                       [shared, retval] out nsXPTMethodInfoPtr info);
    1.57 +
    1.58 +    void getMethodInfoForName(in string methodName, out uint16_t index, 
    1.59 +                       [shared, retval] out nsXPTMethodInfoPtr info);
    1.60 +
    1.61 +    void getConstant(in uint16_t index, 
    1.62 +                     [shared, retval] out nsXPTConstantPtr constant);
    1.63 +
    1.64 +
    1.65 +    /**
    1.66 +    * Get the interface information or iid associated with a param of some
    1.67 +    * method in this interface.
    1.68 +    */
    1.69 +
    1.70 +    nsIInterfaceInfo getInfoForParam(in uint16_t methodIndex, 
    1.71 +                                     [const] in nsXPTParamInfoPtr param);
    1.72 +
    1.73 +    nsIIDPtr getIIDForParam(in uint16_t methodIndex, 
    1.74 +                            [const] in nsXPTParamInfoPtr param);
    1.75 +
    1.76 +
    1.77 +    /**
    1.78 +    * These do *not* make copies ***explicit bending of XPCOM rules***.
    1.79 +    */
    1.80 +
    1.81 +    nsXPTType getTypeForParam(in uint16_t methodIndex, 
    1.82 +                              [const] in nsXPTParamInfoPtr param,
    1.83 +                              in uint16_t dimension);
    1.84 +
    1.85 +    uint8_t getSizeIsArgNumberForParam(in uint16_t methodIndex, 
    1.86 +                                       [const] in nsXPTParamInfoPtr param,
    1.87 +                                       in uint16_t dimension);
    1.88 +
    1.89 +    uint8_t getInterfaceIsArgNumberForParam(in uint16_t methodIndex, 
    1.90 +                                            [const] in nsXPTParamInfoPtr param);
    1.91 +
    1.92 +    boolean isIID(in nsIIDPtr IID);
    1.93 +
    1.94 +    void   getNameShared([shared,retval] out string name);
    1.95 +    void   getIIDShared([shared,retval] out nsIIDPtrShared iid);
    1.96 +
    1.97 +    boolean isFunction();
    1.98 +
    1.99 +    boolean hasAncestor(in nsIIDPtr iid);
   1.100 +
   1.101 +    [notxpcom] nsresult getIIDForParamNoAlloc(in uint16_t methodIndex, 
   1.102 +                                              [const] in nsXPTParamInfoPtr param,
   1.103 +                                              out nsIID iid);
   1.104 +};
   1.105 +

mercurial