Bug 846687 - Set the transport as non-seekable if the server sends Accept-Ranges...
[gecko.git] / xpcom / components / nsIClassInfo.idl
blob5cd45c2759806c55d4a0a48c586c3674ddd3213c
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include "nsISupports.idl"
9 %{C++
10 /**
11 * Calling QueryInterface with this special IID will return a null-terminated
12 * table of QITableEntry's. Not all objects support this.
13 * Note that this breaks XPCOM rules a bit (the table doesn't derive from
14 * nsISupports).
16 #define NS_THISPTROFFSETS_SID \
17 { 0x23e017cc, 0x5d6f, 0x430c, \
18 { 0xb3, 0xe6, 0x9d, 0x32, 0x65, 0x70, 0xd6, 0xb8 } }
21 /**
22 * Provides information about a specific implementation class. If you want
23 * your class to implement nsIClassInfo, see nsIClassInfo.h for instructions --
24 * you most likely do not want to inherit from nsIClassInfo.
27 [scriptable, uuid(986c11d0-f340-11d4-9075-0010a4e73d9a)]
28 interface nsIClassInfo : nsISupports
30 /**
31 * Get an ordered list of the interface ids that instances of the class
32 * promise to implement. Note that nsISupports is an implicit member
33 * of any such list and need not be included.
35 * Should set *count = 0 and *array = null and return NS_OK if getting the
36 * list is not supported.
38 void getInterfaces(out uint32_t count,
39 [array, size_is(count), retval] out nsIIDPtr array);
41 /**
42 * Get a language mapping specific helper object that may assist in using
43 * objects of this class in a specific lanaguage. For instance, if asked
44 * for the helper for nsIProgrammingLanguage::JAVASCRIPT this might return
45 * an object that can be QI'd into the nsIXPCScriptable interface to assist
46 * XPConnect in supplying JavaScript specific behavior to callers of the
47 * instance object.
49 * see: nsIProgrammingLanguage.idl
51 * Should return null if no helper available for given language.
53 nsISupports getHelperForLanguage(in uint32_t language);
55 /**
56 * A contract ID through which an instance of this class can be created
57 * (or accessed as a service, if |flags & SINGLETON|), or null.
59 readonly attribute string contractID;
61 /**
62 * A human readable string naming the class, or null.
64 readonly attribute string classDescription;
66 /**
67 * A class ID through which an instance of this class can be created
68 * (or accessed as a service, if |flags & SINGLETON|), or null.
70 readonly attribute nsCIDPtr classID;
72 /**
73 * Return language type from list in nsIProgrammingLanguage
76 readonly attribute uint32_t implementationLanguage;
78 /**
79 * Bitflags for 'flags' attribute.
81 const uint32_t SINGLETON = 1 << 0;
82 const uint32_t THREADSAFE = 1 << 1;
83 const uint32_t MAIN_THREAD_ONLY = 1 << 2;
84 const uint32_t DOM_OBJECT = 1 << 3;
85 const uint32_t PLUGIN_OBJECT = 1 << 4;
86 const uint32_t SINGLETON_CLASSINFO = 1 << 5;
88 /**
89 * 'flags' attribute bitflag: whether objects of this type implement
90 * nsIContent.
92 const uint32_t CONTENT_NODE = 1 << 6;
94 // The high order bit is RESERVED for consumers of these flags.
95 // No implementor of this interface should ever return flags
96 // with this bit set.
97 const uint32_t RESERVED = 1 << 31;
100 readonly attribute uint32_t flags;
103 * Also a class ID through which an instance of this class can be created
104 * (or accessed as a service, if |flags & SINGLETON|). If the class does
105 * not have a CID, it should return NS_ERROR_NOT_AVAILABLE. This attribute
106 * exists so C++ callers can avoid allocating and freeing a CID, as would
107 * happen if they used classID.
109 [noscript] readonly attribute nsCID classIDNoAlloc;