2001-02-14 04:26:03 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
|
|
|
|
*
|
2012-05-21 12:12:37 +01:00
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2001-02-14 04:26:03 +00:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
2015-03-29 07:52:54 -07:00
|
|
|
interface nsIXPCScriptable;
|
|
|
|
|
2001-10-12 20:21:18 +00:00
|
|
|
/**
|
2011-05-20 12:37:32 -04:00
|
|
|
* Provides information about a specific implementation class. If you want
|
2013-04-14 21:32:07 -04:00
|
|
|
* your class to implement nsIClassInfo, see nsIClassInfoImpl.h for
|
|
|
|
* instructions--you most likely do not want to inherit from nsIClassInfo.
|
2001-10-12 20:21:18 +00:00
|
|
|
*/
|
|
|
|
|
2015-03-30 10:45:39 -07:00
|
|
|
[scriptable, uuid(a60569d7-d401-4677-ba63-2aa5971af25d)]
|
2001-02-14 04:26:03 +00:00
|
|
|
interface nsIClassInfo : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
2019-02-13 21:42:08 +00:00
|
|
|
* Returns a list of the interfaces which instances of this class promise
|
|
|
|
* to implement. Note that nsISupports is an implicit member of any such
|
|
|
|
* list, and need not be included.
|
2001-02-14 04:26:03 +00:00
|
|
|
*/
|
2019-02-13 21:42:08 +00:00
|
|
|
readonly attribute Array<nsIIDRef> interfaces;
|
2001-02-14 04:26:03 +00:00
|
|
|
|
|
|
|
/**
|
2015-03-29 07:52:54 -07:00
|
|
|
* Return an object to assist XPConnect in supplying JavaScript-specific
|
|
|
|
* behavior to callers of the instance object, or null if not needed.
|
2001-02-14 04:26:03 +00:00
|
|
|
*/
|
2015-03-29 07:52:54 -07:00
|
|
|
nsIXPCScriptable getScriptableHelper();
|
2001-02-14 04:26:03 +00:00
|
|
|
|
|
|
|
/**
|
2001-03-12 20:43:02 +00:00
|
|
|
* A contract ID through which an instance of this class can be created
|
2017-10-18 13:17:26 +11:00
|
|
|
* (or accessed as a service, if |flags & SINGLETON|), or null/void.
|
2001-02-14 04:26:03 +00:00
|
|
|
*/
|
2017-10-18 13:17:26 +11:00
|
|
|
readonly attribute AUTF8String contractID;
|
2001-02-14 04:26:03 +00:00
|
|
|
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
/**
|
2017-10-18 13:17:26 +11:00
|
|
|
* A human readable string naming the class, or null/void.
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
*/
|
2017-10-18 13:17:26 +11:00
|
|
|
readonly attribute AUTF8String classDescription;
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
|
2001-02-14 04:26:03 +00:00
|
|
|
/**
|
2001-03-12 20:43:02 +00:00
|
|
|
* A class ID through which an instance of this class can be created
|
2001-08-07 03:59:29 +00:00
|
|
|
* (or accessed as a service, if |flags & SINGLETON|), or null.
|
|
|
|
*/
|
|
|
|
readonly attribute nsCIDPtr classID;
|
|
|
|
|
2001-02-14 04:26:03 +00:00
|
|
|
/**
|
|
|
|
* Bitflags for 'flags' attribute.
|
|
|
|
*/
|
2012-08-22 11:56:38 -04:00
|
|
|
const uint32_t SINGLETON = 1 << 0;
|
|
|
|
const uint32_t THREADSAFE = 1 << 1;
|
|
|
|
const uint32_t MAIN_THREAD_ONLY = 1 << 2;
|
|
|
|
const uint32_t DOM_OBJECT = 1 << 3;
|
|
|
|
const uint32_t PLUGIN_OBJECT = 1 << 4;
|
|
|
|
const uint32_t SINGLETON_CLASSINFO = 1 << 5;
|
2010-06-10 14:11:11 -04:00
|
|
|
|
2019-05-22 22:37:14 +00:00
|
|
|
// The high order bit is RESERVED for consumers of these flags.
|
|
|
|
// No implementor of this interface should ever return flags
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
// with this bit set.
|
2012-08-22 11:56:38 -04:00
|
|
|
const uint32_t RESERVED = 1 << 31;
|
Landing the XPCDOM_20010329_BRANCH branch, changes mostly done by jband@netscape.com and jst@netscape.com, also some changes done by shaver@mozilla.org, peterv@netscape.com and markh@activestate.com. r= and sr= by vidur@netscape.com, jband@netscape.com, jst@netscpae.com, danm@netscape.com, hyatt@netscape.com, shaver@mozilla.org, dbradley@netscape.com, rpotts@netscape.com.
2001-05-08 17:42:36 +00:00
|
|
|
|
|
|
|
|
2012-08-22 11:56:38 -04:00
|
|
|
readonly attribute uint32_t flags;
|
2001-08-28 21:46:08 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Also a class ID through which an instance of this class can be created
|
|
|
|
* (or accessed as a service, if |flags & SINGLETON|). If the class does
|
|
|
|
* not have a CID, it should return NS_ERROR_NOT_AVAILABLE. This attribute
|
|
|
|
* exists so C++ callers can avoid allocating and freeing a CID, as would
|
|
|
|
* happen if they used classID.
|
|
|
|
*/
|
2012-08-09 11:31:14 +03:00
|
|
|
[noscript] readonly attribute nsCID classIDNoAlloc;
|
2001-08-28 21:46:08 +00:00
|
|
|
|
2001-02-14 04:26:03 +00:00
|
|
|
};
|