xpcom/reflect/xptinfo/public/nsIInterfaceInfo.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
     2 /* This Source Code Form is subject to the terms of the Mozilla Public
     3  * License, v. 2.0. If a copy of the MPL was not distributed with this
     4  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     6 /* The nsIInterfaceInfo public declaration. */
     9 #include "nsISupports.idl"
    11 // forward declaration of non-XPCOM types
    13 [ptr] native nsXPTMethodInfoPtr(nsXPTMethodInfo);
    14 [ptr] native nsXPTConstantPtr(nsXPTConstant);
    15 [ptr] native nsXPTParamInfoPtr(nsXPTParamInfo);
    16       native nsXPTType(nsXPTType);
    18 // We bend the rules to do a [shared] nsIID (but this is never scriptable)  
    19 [ptr] native nsIIDPtrShared(nsIID);
    21 %{C++
    22 class nsXPTMethodInfo;
    23 class nsXPTConstant;
    24 class nsXPTParamInfo;
    25 class nsXPTType;
    26 %}
    28 /* this is NOT intended to be scriptable */
    29 [uuid(1affa260-8965-4612-869a-78af4ccfb287)]
    30 interface nsIInterfaceInfo : nsISupports
    31 {
    32     readonly attribute string   name;
    33     readonly attribute nsIIDPtr InterfaceIID;
    35     boolean isScriptable();
    36     boolean isBuiltinClass();
    38     readonly attribute nsIInterfaceInfo parent;
    40     /**
    41     * These include counts for parent (and all ancestors).
    42     */
    43     readonly attribute uint16_t methodCount;
    44     readonly attribute uint16_t constantCount;
    46     /**
    47     * These include methods and constants for parent (and all ancestors).
    48     * 
    49     * These do *not* make copies ***explicit bending of XPCOM rules***.
    50     */
    52     void getMethodInfo(in uint16_t index, 
    53                        [shared, retval] out nsXPTMethodInfoPtr info);
    55     void getMethodInfoForName(in string methodName, out uint16_t index, 
    56                        [shared, retval] out nsXPTMethodInfoPtr info);
    58     void getConstant(in uint16_t index, 
    59                      [shared, retval] out nsXPTConstantPtr constant);
    62     /**
    63     * Get the interface information or iid associated with a param of some
    64     * method in this interface.
    65     */
    67     nsIInterfaceInfo getInfoForParam(in uint16_t methodIndex, 
    68                                      [const] in nsXPTParamInfoPtr param);
    70     nsIIDPtr getIIDForParam(in uint16_t methodIndex, 
    71                             [const] in nsXPTParamInfoPtr param);
    74     /**
    75     * These do *not* make copies ***explicit bending of XPCOM rules***.
    76     */
    78     nsXPTType getTypeForParam(in uint16_t methodIndex, 
    79                               [const] in nsXPTParamInfoPtr param,
    80                               in uint16_t dimension);
    82     uint8_t getSizeIsArgNumberForParam(in uint16_t methodIndex, 
    83                                        [const] in nsXPTParamInfoPtr param,
    84                                        in uint16_t dimension);
    86     uint8_t getInterfaceIsArgNumberForParam(in uint16_t methodIndex, 
    87                                             [const] in nsXPTParamInfoPtr param);
    89     boolean isIID(in nsIIDPtr IID);
    91     void   getNameShared([shared,retval] out string name);
    92     void   getIIDShared([shared,retval] out nsIIDPtrShared iid);
    94     boolean isFunction();
    96     boolean hasAncestor(in nsIIDPtr iid);
    98     [notxpcom] nsresult getIIDForParamNoAlloc(in uint16_t methodIndex, 
    99                                               [const] in nsXPTParamInfoPtr param,
   100                                               out nsIID iid);
   101 };

mercurial