checking in generated versions of these xpcom headers. soon we will be generating these at compile time. Sources for these files are in xpcom/idl. They are regenerated from those files using xpidl -m header filename.idl
git-svn-id: svn://10.0.0.236/trunk@30647 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
parent
d3101412a1
commit
809d970fe8
@ -19,6 +19,115 @@
|
||||
#ifndef __nsISupportsUtils_h
|
||||
#define __nsISupportsUtils_h
|
||||
|
||||
/***************************************************************************/
|
||||
/* this section copied from the hand written nsISupports.h */
|
||||
|
||||
#include "nsDebug.h"
|
||||
#include "nsTraceRefcnt.h"
|
||||
#include "nsID.h"
|
||||
#include "nsIID.h"
|
||||
#include "nsError.h"
|
||||
|
||||
#if defined(NS_MT_SUPPORTED)
|
||||
#include "prcmon.h"
|
||||
#endif /* NS_MT_SUPPORTED */
|
||||
|
||||
#if defined(XPIDL_JS_STUBS)
|
||||
struct JSObject;
|
||||
struct JSContext;
|
||||
#endif
|
||||
|
||||
/*@{*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* IID for the nsISupports interface
|
||||
* {00000000-0000-0000-c000-000000000046}
|
||||
*
|
||||
* NOTE: NEVER EVER EVER EVER EVER change this IID. Never. Not once.
|
||||
* No. Don't do it. Stop!
|
||||
*/
|
||||
#define NS_ISUPPORTS_IID \
|
||||
{ 0x00000000, 0x0000, 0x0000, \
|
||||
{0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} }
|
||||
|
||||
/**
|
||||
* Reference count values
|
||||
*/
|
||||
typedef PRUint32 nsrefcnt;
|
||||
|
||||
/**
|
||||
* Base class for all XPCOM objects to use. This macro forces the C++
|
||||
* compiler to use a compatible vtable layout for all XPCOM objects.
|
||||
*/
|
||||
#ifdef XP_MAC
|
||||
#define XPCOM_OBJECT : public __comobject
|
||||
#else
|
||||
#define XPCOM_OBJECT
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Basic component object model interface. Objects which implement
|
||||
* this interface support runtime interface discovery (QueryInterface)
|
||||
* and a reference counted memory model (AddRef/Release). This is
|
||||
* modelled after the win32 IUnknown API.
|
||||
*/
|
||||
class nsISupports XPCOM_OBJECT {
|
||||
public:
|
||||
static const nsIID& GetIID() { static nsIID iid = NS_ISUPPORTS_IID; return iid; }
|
||||
/**
|
||||
* @name Methods
|
||||
*/
|
||||
|
||||
//@{
|
||||
/**
|
||||
* A run time mechanism for interface discovery.
|
||||
* @param aIID [in] A requested interface IID
|
||||
* @param aInstancePtr [out] A pointer to an interface pointer to
|
||||
* receive the result.
|
||||
* @return <b>NS_OK</b> if the interface is supported by the associated
|
||||
* instance, <b>NS_NOINTERFACE</b> if it is not.
|
||||
* <b>NS_ERROR_INVALID_POINTER</b> if <i>aInstancePtr</i> is <b>NULL</b>.
|
||||
*/
|
||||
NS_IMETHOD QueryInterface(REFNSIID aIID,
|
||||
void** aInstancePtr) = 0;
|
||||
/**
|
||||
* Increases the reference count for this interface.
|
||||
* The associated instance will not be deleted unless
|
||||
* the reference count is returned to zero.
|
||||
*
|
||||
* @return The resulting reference count.
|
||||
*/
|
||||
NS_IMETHOD_(nsrefcnt) AddRef(void) = 0;
|
||||
|
||||
/**
|
||||
* Decreases the reference count for this interface.
|
||||
* Generally, if the reference count returns to zero,
|
||||
* the associated instance is deleted.
|
||||
*
|
||||
* @return The resulting reference count.
|
||||
*/
|
||||
NS_IMETHOD_(nsrefcnt) Release(void) = 0;
|
||||
|
||||
#if XPIDL_JS_STUBS
|
||||
// XXX Scriptability hack...
|
||||
static NS_EXPORT_(JSObject*) InitJSClass(JSContext* cx) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static NS_EXPORT_(JSObject*) GetJSObject(JSContext* cx, nsISupports* priv) {
|
||||
NS_NOTYETIMPLEMENTED("nsISupports isn't XPIDL scriptable yet");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
//@}
|
||||
};
|
||||
|
||||
/*@}*/
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
/**
|
||||
* A macro to build the static const IID accessor method
|
||||
|
||||
@ -1,45 +1,39 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
* DO NOT EDIT. THIS FILE IS GENERATED FROM nsIFactory.idl
|
||||
*/
|
||||
|
||||
#ifndef __nsIFactory_h
|
||||
#define __nsIFactory_h
|
||||
#ifndef __gen_nsIFactory_h__
|
||||
#define __gen_nsIFactory_h__
|
||||
|
||||
#include "prtypes.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsISupports.h" /* interface nsISupports */
|
||||
#include "nsrootidl.h" /* interface nsrootidl */
|
||||
|
||||
/*
|
||||
* nsIFactory interface
|
||||
*/
|
||||
#ifdef XPIDL_JS_STUBS
|
||||
#include "jsapi.h"
|
||||
#endif
|
||||
|
||||
// {00000001-0000-0000-c000-000000000046}
|
||||
/* starting interface: nsIFactory */
|
||||
|
||||
/* {00000001-0000-0000-c000-000000000046} */
|
||||
#define NS_IFACTORY_IID_STR "00000001-0000-0000-c000-000000000046"
|
||||
#define NS_IFACTORY_IID \
|
||||
{ 0x00000001, 0x0000, 0x0000, \
|
||||
{ 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 } }
|
||||
{0x00000001, 0x0000, 0x0000, \
|
||||
{ 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }}
|
||||
|
||||
class nsIFactory: public nsISupports {
|
||||
public:
|
||||
static const nsIID& GetIID() { static nsIID iid = NS_IFACTORY_IID; return iid; }
|
||||
class nsIFactory : public nsISupports {
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFACTORY_IID)
|
||||
|
||||
NS_IMETHOD CreateInstance(nsISupports *aOuter,
|
||||
REFNSIID aIID,
|
||||
void **aResult) = 0;
|
||||
/* voidStar CreateInstance (in nsISupports aOuter, in nsIIDRef iid); */
|
||||
NS_IMETHOD CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *_retval) = 0;
|
||||
|
||||
NS_IMETHOD LockFactory(PRBool aLock) = 0;
|
||||
/* void LockFactory (in PRBool lock); */
|
||||
NS_IMETHOD LockFactory(PRBool lock) = 0;
|
||||
|
||||
#ifdef XPIDL_JS_STUBS
|
||||
static NS_EXPORT_(JSObject *) InitJSClass(JSContext *cx);
|
||||
static NS_EXPORT_(JSObject *) GetJSObject(JSContext *cx, nsIFactory *priv);
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif /* __gen_nsIFactory_h__ */
|
||||
|
||||
@ -1,99 +1,96 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
* DO NOT EDIT. THIS FILE IS GENERATED FROM nsIEnumerator.idl
|
||||
*/
|
||||
|
||||
#ifndef nsIEnumerator_h___
|
||||
#define nsIEnumerator_h___
|
||||
#ifndef __gen_nsIEnumerator_h__
|
||||
#define __gen_nsIEnumerator_h__
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsISupports.h" /* interface nsISupports */
|
||||
#include "nsrootidl.h" /* interface nsrootidl */
|
||||
|
||||
// {D1899240-F9D2-11d2-BDD6-000064657374}
|
||||
#ifdef XPIDL_JS_STUBS
|
||||
#include "jsapi.h"
|
||||
#endif
|
||||
|
||||
/* starting interface: nsISimpleEnumerator */
|
||||
|
||||
/* {D1899240-F9D2-11D2-BDD6-000064657374} */
|
||||
#define NS_ISIMPLEENUMERATOR_IID_STR "D1899240-F9D2-11D2-BDD6-000064657374"
|
||||
#define NS_ISIMPLEENUMERATOR_IID \
|
||||
{ 0xd1899240, 0xf9d2, 0x11d2, { 0xbd, 0xd6, 0x0, 0x0, 0x64, 0x65, 0x73, 0x74 } }
|
||||
{0xD1899240, 0xF9D2, 0x11D2, \
|
||||
{ 0xBD, 0xD6, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 }}
|
||||
|
||||
class nsISimpleEnumerator : public nsISupports {
|
||||
public:
|
||||
static const nsIID& GetIID(void) { static nsIID iid = NS_ISIMPLEENUMERATOR_IID; return iid; }
|
||||
NS_IMETHOD HasMoreElements(PRBool* aResult) = 0;
|
||||
NS_IMETHOD GetNext(nsISupports** aResult) = 0;
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISIMPLEENUMERATOR_IID)
|
||||
|
||||
/* boolean HasMoreElements (); */
|
||||
NS_IMETHOD HasMoreElements(PRBool *_retval) = 0;
|
||||
|
||||
/* nsISupports GetNext (); */
|
||||
NS_IMETHOD GetNext(nsISupports **_retval) = 0;
|
||||
|
||||
#ifdef XPIDL_JS_STUBS
|
||||
static NS_EXPORT_(JSObject *) InitJSClass(JSContext *cx);
|
||||
static NS_EXPORT_(JSObject *) GetJSObject(JSContext *cx, nsISimpleEnumerator *priv);
|
||||
#endif
|
||||
};
|
||||
|
||||
/* starting interface: nsIEnumerator */
|
||||
|
||||
extern "C" NS_COM nsresult
|
||||
NS_NewEmptyEnumerator(nsISimpleEnumerator** aResult);
|
||||
|
||||
|
||||
#define NS_IENUMERATOR_IID \
|
||||
{ /* ad385286-cbc4-11d2-8cca-0060b0fc14a3 */ \
|
||||
0xad385286, \
|
||||
0xcbc4, \
|
||||
0x11d2, \
|
||||
{0x8c, 0xca, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \
|
||||
}
|
||||
|
||||
/* {ad385286-cbc4-11d2-8cca-0060b0fc14a3} */
|
||||
#define NS_IENUMERATOR_IID_STR "ad385286-cbc4-11d2-8cca-0060b0fc14a3"
|
||||
#define NS_IENUMERATOR_IID \
|
||||
{0xad385286, 0xcbc4, 0x11d2, \
|
||||
{ 0x8c, 0xca, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 }}
|
||||
|
||||
class nsIEnumerator : public nsISupports {
|
||||
public:
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IENUMERATOR_IID)
|
||||
|
||||
static const nsIID& GetIID(void) { static nsIID iid = NS_IENUMERATOR_IID; return iid; }
|
||||
/* void First (); */
|
||||
NS_IMETHOD First() = 0;
|
||||
|
||||
/** First will reset the list. will return NS_FAILED if no items
|
||||
*/
|
||||
NS_IMETHOD First(void) = 0;
|
||||
|
||||
/** Next will advance the list. will return failed if already at end
|
||||
*/
|
||||
NS_IMETHOD Next(void) = 0;
|
||||
/* void Next (); */
|
||||
NS_IMETHOD Next() = 0;
|
||||
|
||||
/** CurrentItem will return the CurrentItem item it will fail if the list is empty
|
||||
* @param aItem return value
|
||||
*/
|
||||
NS_IMETHOD CurrentItem(nsISupports **aItem) = 0;
|
||||
/* nsISupports CurrentItem (); */
|
||||
NS_IMETHOD CurrentItem(nsISupports **_retval) = 0;
|
||||
|
||||
/** return if the collection is at the end. that is the beginning following a call to Prev
|
||||
* and it is the end of the list following a call to next
|
||||
* @param aItem return value
|
||||
*/
|
||||
NS_IMETHOD IsDone(void) = 0;
|
||||
/* void IsDone (); */
|
||||
NS_IMETHOD IsDone() = 0;
|
||||
|
||||
#ifdef XPIDL_JS_STUBS
|
||||
static NS_EXPORT_(JSObject *) InitJSClass(JSContext *cx);
|
||||
static NS_EXPORT_(JSObject *) GetJSObject(JSContext *cx, nsIEnumerator *priv);
|
||||
#endif
|
||||
};
|
||||
|
||||
#define NS_IBIDIRECTIONALENUMERATOR_IID \
|
||||
{ /* 75f158a0-cadd-11d2-8cca-0060b0fc14a3 */ \
|
||||
0x75f158a0, \
|
||||
0xcadd, \
|
||||
0x11d2, \
|
||||
{0x8c, 0xca, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \
|
||||
}
|
||||
/* starting interface: nsIBidirectionalEnumerator */
|
||||
|
||||
/* {75f158a0-cadd-11d2-8cca-0060b0fc14a3} */
|
||||
#define NS_IBIDIRECTIONALENUMERATOR_IID_STR "75f158a0-cadd-11d2-8cca-0060b0fc14a3"
|
||||
#define NS_IBIDIRECTIONALENUMERATOR_IID \
|
||||
{0x75f158a0, 0xcadd, 0x11d2, \
|
||||
{ 0x8c, 0xca, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 }}
|
||||
|
||||
class nsIBidirectionalEnumerator : public nsIEnumerator {
|
||||
public:
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IBIDIRECTIONALENUMERATOR_IID)
|
||||
|
||||
static const nsIID& GetIID(void) { static nsIID iid = NS_IBIDIRECTIONALENUMERATOR_IID; return iid; }
|
||||
/* void Last (); */
|
||||
NS_IMETHOD Last() = 0;
|
||||
|
||||
/** Last will reset the list to the end. will return NS_FAILED if no items
|
||||
*/
|
||||
NS_IMETHOD Last(void) = 0;
|
||||
|
||||
/** Prev will decrement the list. will return failed if already at beginning
|
||||
*/
|
||||
NS_IMETHOD Prev(void) = 0;
|
||||
/* void Prev (); */
|
||||
NS_IMETHOD Prev() = 0;
|
||||
|
||||
#ifdef XPIDL_JS_STUBS
|
||||
static NS_EXPORT_(JSObject *) InitJSClass(JSContext *cx);
|
||||
static NS_EXPORT_(JSObject *) GetJSObject(JSContext *cx, nsIBidirectionalEnumerator *priv);
|
||||
#endif
|
||||
};
|
||||
|
||||
extern "C" NS_COM nsresult
|
||||
NS_NewEmptyEnumerator(nsISimpleEnumerator** aResult);
|
||||
// Construct and return an implementation of a "conjoining enumerator." This
|
||||
// enumerator lets you string together two other enumerators into one sequence.
|
||||
// The result is an nsIBidirectionalEnumerator, but if either input is not
|
||||
@ -101,14 +98,12 @@ public:
|
||||
extern "C" NS_COM nsresult
|
||||
NS_NewConjoiningEnumerator(nsIEnumerator* first, nsIEnumerator* second,
|
||||
nsIBidirectionalEnumerator* *aInstancePtrResult);
|
||||
|
||||
// Construct and return an implementation of a "union enumerator." This
|
||||
// enumerator will only return elements that are found in both constituent
|
||||
// enumerators.
|
||||
extern "C" NS_COM nsresult
|
||||
NS_NewUnionEnumerator(nsIEnumerator* first, nsIEnumerator* second,
|
||||
nsIEnumerator* *aInstancePtrResult);
|
||||
|
||||
// Construct and return an implementation of an "intersection enumerator." This
|
||||
// enumerator will return elements that are found in either constituent
|
||||
// enumerators, eliminating duplicates.
|
||||
@ -116,5 +111,5 @@ extern "C" NS_COM nsresult
|
||||
NS_NewIntersectionEnumerator(nsIEnumerator* first, nsIEnumerator* second,
|
||||
nsIEnumerator* *aInstancePtrResult);
|
||||
|
||||
#endif // __nsIEnumerator_h
|
||||
|
||||
#endif /* __gen_nsIEnumerator_h__ */
|
||||
|
||||
@ -19,6 +19,115 @@
|
||||
#ifndef __nsISupportsUtils_h
|
||||
#define __nsISupportsUtils_h
|
||||
|
||||
/***************************************************************************/
|
||||
/* this section copied from the hand written nsISupports.h */
|
||||
|
||||
#include "nsDebug.h"
|
||||
#include "nsTraceRefcnt.h"
|
||||
#include "nsID.h"
|
||||
#include "nsIID.h"
|
||||
#include "nsError.h"
|
||||
|
||||
#if defined(NS_MT_SUPPORTED)
|
||||
#include "prcmon.h"
|
||||
#endif /* NS_MT_SUPPORTED */
|
||||
|
||||
#if defined(XPIDL_JS_STUBS)
|
||||
struct JSObject;
|
||||
struct JSContext;
|
||||
#endif
|
||||
|
||||
/*@{*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* IID for the nsISupports interface
|
||||
* {00000000-0000-0000-c000-000000000046}
|
||||
*
|
||||
* NOTE: NEVER EVER EVER EVER EVER change this IID. Never. Not once.
|
||||
* No. Don't do it. Stop!
|
||||
*/
|
||||
#define NS_ISUPPORTS_IID \
|
||||
{ 0x00000000, 0x0000, 0x0000, \
|
||||
{0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} }
|
||||
|
||||
/**
|
||||
* Reference count values
|
||||
*/
|
||||
typedef PRUint32 nsrefcnt;
|
||||
|
||||
/**
|
||||
* Base class for all XPCOM objects to use. This macro forces the C++
|
||||
* compiler to use a compatible vtable layout for all XPCOM objects.
|
||||
*/
|
||||
#ifdef XP_MAC
|
||||
#define XPCOM_OBJECT : public __comobject
|
||||
#else
|
||||
#define XPCOM_OBJECT
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Basic component object model interface. Objects which implement
|
||||
* this interface support runtime interface discovery (QueryInterface)
|
||||
* and a reference counted memory model (AddRef/Release). This is
|
||||
* modelled after the win32 IUnknown API.
|
||||
*/
|
||||
class nsISupports XPCOM_OBJECT {
|
||||
public:
|
||||
static const nsIID& GetIID() { static nsIID iid = NS_ISUPPORTS_IID; return iid; }
|
||||
/**
|
||||
* @name Methods
|
||||
*/
|
||||
|
||||
//@{
|
||||
/**
|
||||
* A run time mechanism for interface discovery.
|
||||
* @param aIID [in] A requested interface IID
|
||||
* @param aInstancePtr [out] A pointer to an interface pointer to
|
||||
* receive the result.
|
||||
* @return <b>NS_OK</b> if the interface is supported by the associated
|
||||
* instance, <b>NS_NOINTERFACE</b> if it is not.
|
||||
* <b>NS_ERROR_INVALID_POINTER</b> if <i>aInstancePtr</i> is <b>NULL</b>.
|
||||
*/
|
||||
NS_IMETHOD QueryInterface(REFNSIID aIID,
|
||||
void** aInstancePtr) = 0;
|
||||
/**
|
||||
* Increases the reference count for this interface.
|
||||
* The associated instance will not be deleted unless
|
||||
* the reference count is returned to zero.
|
||||
*
|
||||
* @return The resulting reference count.
|
||||
*/
|
||||
NS_IMETHOD_(nsrefcnt) AddRef(void) = 0;
|
||||
|
||||
/**
|
||||
* Decreases the reference count for this interface.
|
||||
* Generally, if the reference count returns to zero,
|
||||
* the associated instance is deleted.
|
||||
*
|
||||
* @return The resulting reference count.
|
||||
*/
|
||||
NS_IMETHOD_(nsrefcnt) Release(void) = 0;
|
||||
|
||||
#if XPIDL_JS_STUBS
|
||||
// XXX Scriptability hack...
|
||||
static NS_EXPORT_(JSObject*) InitJSClass(JSContext* cx) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static NS_EXPORT_(JSObject*) GetJSObject(JSContext* cx, nsISupports* priv) {
|
||||
NS_NOTYETIMPLEMENTED("nsISupports isn't XPIDL scriptable yet");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
//@}
|
||||
};
|
||||
|
||||
/*@}*/
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
/**
|
||||
* A macro to build the static const IID accessor method
|
||||
|
||||
@ -1,99 +1,96 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
* DO NOT EDIT. THIS FILE IS GENERATED FROM nsIEnumerator.idl
|
||||
*/
|
||||
|
||||
#ifndef nsIEnumerator_h___
|
||||
#define nsIEnumerator_h___
|
||||
#ifndef __gen_nsIEnumerator_h__
|
||||
#define __gen_nsIEnumerator_h__
|
||||
|
||||
#include "nsISupports.h"
|
||||
#include "nsISupports.h" /* interface nsISupports */
|
||||
#include "nsrootidl.h" /* interface nsrootidl */
|
||||
|
||||
// {D1899240-F9D2-11d2-BDD6-000064657374}
|
||||
#ifdef XPIDL_JS_STUBS
|
||||
#include "jsapi.h"
|
||||
#endif
|
||||
|
||||
/* starting interface: nsISimpleEnumerator */
|
||||
|
||||
/* {D1899240-F9D2-11D2-BDD6-000064657374} */
|
||||
#define NS_ISIMPLEENUMERATOR_IID_STR "D1899240-F9D2-11D2-BDD6-000064657374"
|
||||
#define NS_ISIMPLEENUMERATOR_IID \
|
||||
{ 0xd1899240, 0xf9d2, 0x11d2, { 0xbd, 0xd6, 0x0, 0x0, 0x64, 0x65, 0x73, 0x74 } }
|
||||
{0xD1899240, 0xF9D2, 0x11D2, \
|
||||
{ 0xBD, 0xD6, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 }}
|
||||
|
||||
class nsISimpleEnumerator : public nsISupports {
|
||||
public:
|
||||
static const nsIID& GetIID(void) { static nsIID iid = NS_ISIMPLEENUMERATOR_IID; return iid; }
|
||||
NS_IMETHOD HasMoreElements(PRBool* aResult) = 0;
|
||||
NS_IMETHOD GetNext(nsISupports** aResult) = 0;
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISIMPLEENUMERATOR_IID)
|
||||
|
||||
/* boolean HasMoreElements (); */
|
||||
NS_IMETHOD HasMoreElements(PRBool *_retval) = 0;
|
||||
|
||||
/* nsISupports GetNext (); */
|
||||
NS_IMETHOD GetNext(nsISupports **_retval) = 0;
|
||||
|
||||
#ifdef XPIDL_JS_STUBS
|
||||
static NS_EXPORT_(JSObject *) InitJSClass(JSContext *cx);
|
||||
static NS_EXPORT_(JSObject *) GetJSObject(JSContext *cx, nsISimpleEnumerator *priv);
|
||||
#endif
|
||||
};
|
||||
|
||||
/* starting interface: nsIEnumerator */
|
||||
|
||||
extern "C" NS_COM nsresult
|
||||
NS_NewEmptyEnumerator(nsISimpleEnumerator** aResult);
|
||||
|
||||
|
||||
#define NS_IENUMERATOR_IID \
|
||||
{ /* ad385286-cbc4-11d2-8cca-0060b0fc14a3 */ \
|
||||
0xad385286, \
|
||||
0xcbc4, \
|
||||
0x11d2, \
|
||||
{0x8c, 0xca, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \
|
||||
}
|
||||
|
||||
/* {ad385286-cbc4-11d2-8cca-0060b0fc14a3} */
|
||||
#define NS_IENUMERATOR_IID_STR "ad385286-cbc4-11d2-8cca-0060b0fc14a3"
|
||||
#define NS_IENUMERATOR_IID \
|
||||
{0xad385286, 0xcbc4, 0x11d2, \
|
||||
{ 0x8c, 0xca, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 }}
|
||||
|
||||
class nsIEnumerator : public nsISupports {
|
||||
public:
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IENUMERATOR_IID)
|
||||
|
||||
static const nsIID& GetIID(void) { static nsIID iid = NS_IENUMERATOR_IID; return iid; }
|
||||
/* void First (); */
|
||||
NS_IMETHOD First() = 0;
|
||||
|
||||
/** First will reset the list. will return NS_FAILED if no items
|
||||
*/
|
||||
NS_IMETHOD First(void) = 0;
|
||||
|
||||
/** Next will advance the list. will return failed if already at end
|
||||
*/
|
||||
NS_IMETHOD Next(void) = 0;
|
||||
/* void Next (); */
|
||||
NS_IMETHOD Next() = 0;
|
||||
|
||||
/** CurrentItem will return the CurrentItem item it will fail if the list is empty
|
||||
* @param aItem return value
|
||||
*/
|
||||
NS_IMETHOD CurrentItem(nsISupports **aItem) = 0;
|
||||
/* nsISupports CurrentItem (); */
|
||||
NS_IMETHOD CurrentItem(nsISupports **_retval) = 0;
|
||||
|
||||
/** return if the collection is at the end. that is the beginning following a call to Prev
|
||||
* and it is the end of the list following a call to next
|
||||
* @param aItem return value
|
||||
*/
|
||||
NS_IMETHOD IsDone(void) = 0;
|
||||
/* void IsDone (); */
|
||||
NS_IMETHOD IsDone() = 0;
|
||||
|
||||
#ifdef XPIDL_JS_STUBS
|
||||
static NS_EXPORT_(JSObject *) InitJSClass(JSContext *cx);
|
||||
static NS_EXPORT_(JSObject *) GetJSObject(JSContext *cx, nsIEnumerator *priv);
|
||||
#endif
|
||||
};
|
||||
|
||||
#define NS_IBIDIRECTIONALENUMERATOR_IID \
|
||||
{ /* 75f158a0-cadd-11d2-8cca-0060b0fc14a3 */ \
|
||||
0x75f158a0, \
|
||||
0xcadd, \
|
||||
0x11d2, \
|
||||
{0x8c, 0xca, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3} \
|
||||
}
|
||||
/* starting interface: nsIBidirectionalEnumerator */
|
||||
|
||||
/* {75f158a0-cadd-11d2-8cca-0060b0fc14a3} */
|
||||
#define NS_IBIDIRECTIONALENUMERATOR_IID_STR "75f158a0-cadd-11d2-8cca-0060b0fc14a3"
|
||||
#define NS_IBIDIRECTIONALENUMERATOR_IID \
|
||||
{0x75f158a0, 0xcadd, 0x11d2, \
|
||||
{ 0x8c, 0xca, 0x00, 0x60, 0xb0, 0xfc, 0x14, 0xa3 }}
|
||||
|
||||
class nsIBidirectionalEnumerator : public nsIEnumerator {
|
||||
public:
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IBIDIRECTIONALENUMERATOR_IID)
|
||||
|
||||
static const nsIID& GetIID(void) { static nsIID iid = NS_IBIDIRECTIONALENUMERATOR_IID; return iid; }
|
||||
/* void Last (); */
|
||||
NS_IMETHOD Last() = 0;
|
||||
|
||||
/** Last will reset the list to the end. will return NS_FAILED if no items
|
||||
*/
|
||||
NS_IMETHOD Last(void) = 0;
|
||||
|
||||
/** Prev will decrement the list. will return failed if already at beginning
|
||||
*/
|
||||
NS_IMETHOD Prev(void) = 0;
|
||||
/* void Prev (); */
|
||||
NS_IMETHOD Prev() = 0;
|
||||
|
||||
#ifdef XPIDL_JS_STUBS
|
||||
static NS_EXPORT_(JSObject *) InitJSClass(JSContext *cx);
|
||||
static NS_EXPORT_(JSObject *) GetJSObject(JSContext *cx, nsIBidirectionalEnumerator *priv);
|
||||
#endif
|
||||
};
|
||||
|
||||
extern "C" NS_COM nsresult
|
||||
NS_NewEmptyEnumerator(nsISimpleEnumerator** aResult);
|
||||
// Construct and return an implementation of a "conjoining enumerator." This
|
||||
// enumerator lets you string together two other enumerators into one sequence.
|
||||
// The result is an nsIBidirectionalEnumerator, but if either input is not
|
||||
@ -101,14 +98,12 @@ public:
|
||||
extern "C" NS_COM nsresult
|
||||
NS_NewConjoiningEnumerator(nsIEnumerator* first, nsIEnumerator* second,
|
||||
nsIBidirectionalEnumerator* *aInstancePtrResult);
|
||||
|
||||
// Construct and return an implementation of a "union enumerator." This
|
||||
// enumerator will only return elements that are found in both constituent
|
||||
// enumerators.
|
||||
extern "C" NS_COM nsresult
|
||||
NS_NewUnionEnumerator(nsIEnumerator* first, nsIEnumerator* second,
|
||||
nsIEnumerator* *aInstancePtrResult);
|
||||
|
||||
// Construct and return an implementation of an "intersection enumerator." This
|
||||
// enumerator will return elements that are found in either constituent
|
||||
// enumerators, eliminating duplicates.
|
||||
@ -116,5 +111,5 @@ extern "C" NS_COM nsresult
|
||||
NS_NewIntersectionEnumerator(nsIEnumerator* first, nsIEnumerator* second,
|
||||
nsIEnumerator* *aInstancePtrResult);
|
||||
|
||||
#endif // __nsIEnumerator_h
|
||||
|
||||
#endif /* __gen_nsIEnumerator_h__ */
|
||||
|
||||
@ -1,45 +1,39 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
* DO NOT EDIT. THIS FILE IS GENERATED FROM nsIFactory.idl
|
||||
*/
|
||||
|
||||
#ifndef __nsIFactory_h
|
||||
#define __nsIFactory_h
|
||||
#ifndef __gen_nsIFactory_h__
|
||||
#define __gen_nsIFactory_h__
|
||||
|
||||
#include "prtypes.h"
|
||||
#include "nsISupports.h"
|
||||
#include "nsISupports.h" /* interface nsISupports */
|
||||
#include "nsrootidl.h" /* interface nsrootidl */
|
||||
|
||||
/*
|
||||
* nsIFactory interface
|
||||
*/
|
||||
#ifdef XPIDL_JS_STUBS
|
||||
#include "jsapi.h"
|
||||
#endif
|
||||
|
||||
// {00000001-0000-0000-c000-000000000046}
|
||||
/* starting interface: nsIFactory */
|
||||
|
||||
/* {00000001-0000-0000-c000-000000000046} */
|
||||
#define NS_IFACTORY_IID_STR "00000001-0000-0000-c000-000000000046"
|
||||
#define NS_IFACTORY_IID \
|
||||
{ 0x00000001, 0x0000, 0x0000, \
|
||||
{ 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 } }
|
||||
{0x00000001, 0x0000, 0x0000, \
|
||||
{ 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }}
|
||||
|
||||
class nsIFactory: public nsISupports {
|
||||
public:
|
||||
static const nsIID& GetIID() { static nsIID iid = NS_IFACTORY_IID; return iid; }
|
||||
class nsIFactory : public nsISupports {
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_IFACTORY_IID)
|
||||
|
||||
NS_IMETHOD CreateInstance(nsISupports *aOuter,
|
||||
REFNSIID aIID,
|
||||
void **aResult) = 0;
|
||||
/* voidStar CreateInstance (in nsISupports aOuter, in nsIIDRef iid); */
|
||||
NS_IMETHOD CreateInstance(nsISupports *aOuter, const nsIID & iid, void * *_retval) = 0;
|
||||
|
||||
NS_IMETHOD LockFactory(PRBool aLock) = 0;
|
||||
/* void LockFactory (in PRBool lock); */
|
||||
NS_IMETHOD LockFactory(PRBool lock) = 0;
|
||||
|
||||
#ifdef XPIDL_JS_STUBS
|
||||
static NS_EXPORT_(JSObject *) InitJSClass(JSContext *cx);
|
||||
static NS_EXPORT_(JSObject *) GetJSObject(JSContext *cx, nsIFactory *priv);
|
||||
#endif
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif /* __gen_nsIFactory_h__ */
|
||||
|
||||
@ -1,132 +1,57 @@
|
||||
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
||||
/*
|
||||
* The contents of this file are subject to the Netscape Public License
|
||||
* Version 1.0 (the "NPL"); you may not use this file except in
|
||||
* compliance with the NPL. You may obtain a copy of the NPL at
|
||||
* http://www.mozilla.org/NPL/
|
||||
*
|
||||
* Software distributed under the NPL is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the NPL
|
||||
* for the specific language governing rights and limitations under the
|
||||
* NPL.
|
||||
*
|
||||
* The Initial Developer of this code under the NPL is Netscape
|
||||
* Communications Corporation. Portions created by Netscape are
|
||||
* Copyright (C) 1998 Netscape Communications Corporation. All Rights
|
||||
* Reserved.
|
||||
* DO NOT EDIT. THIS FILE IS GENERATED FROM nsISupports.idl
|
||||
*/
|
||||
|
||||
#ifndef nsISupports_h___
|
||||
#define nsISupports_h___
|
||||
#ifndef __gen_nsISupports_h__
|
||||
#define __gen_nsISupports_h__
|
||||
|
||||
#include "nsDebug.h"
|
||||
#include "nsTraceRefcnt.h"
|
||||
#include "nsID.h"
|
||||
#include "nsIID.h"
|
||||
#include "nsError.h"
|
||||
#include "nsrootidl.h" /* interface nsrootidl */
|
||||
|
||||
#ifdef XPIDL_JS_STUBS
|
||||
#include "jsapi.h"
|
||||
#endif
|
||||
/*
|
||||
* Start commenting out the C++ versions of the below in the output header
|
||||
*/
|
||||
#if 0
|
||||
|
||||
|
||||
/* starting interface: nsISupports */
|
||||
|
||||
/* {00000000-0000-0000-c000-000000000046} */
|
||||
#define NS_ISUPPORTS_IID_STR "00000000-0000-0000-c000-000000000046"
|
||||
#define NS_ISUPPORTS_IID \
|
||||
{0x00000000, 0x0000, 0x0000, \
|
||||
{ 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }}
|
||||
|
||||
class nsISupports {
|
||||
public:
|
||||
NS_DEFINE_STATIC_IID_ACCESSOR(NS_ISUPPORTS_IID)
|
||||
|
||||
/* void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */
|
||||
NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result) = 0;
|
||||
|
||||
/* [noscript, notxpcom] nsrefcnt AddRef (); */
|
||||
NS_IMETHOD_(nsrefcnt) AddRef() = 0;
|
||||
|
||||
/* [noscript, notxpcom] nsrefcnt Release (); */
|
||||
NS_IMETHOD_(nsrefcnt) Release() = 0;
|
||||
|
||||
#ifdef XPIDL_JS_STUBS
|
||||
static NS_EXPORT_(JSObject *) InitJSClass(JSContext *cx);
|
||||
static NS_EXPORT_(JSObject *) GetJSObject(JSContext *cx, nsISupports *priv);
|
||||
#endif
|
||||
};
|
||||
/*
|
||||
* End commenting out the C++ versions of the above in the output header
|
||||
*/
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The declaration of nsISupports for C++ is in nsISupportsUtils.h.
|
||||
* This is to allow for some macro trickery to support the Mac.
|
||||
*/
|
||||
#include "nsISupportsUtils.h"
|
||||
|
||||
#if defined(NS_MT_SUPPORTED)
|
||||
#include "prcmon.h"
|
||||
#endif /* NS_MT_SUPPORTED */
|
||||
|
||||
#if defined(XPIDL_JS_STUBS)
|
||||
struct JSObject;
|
||||
struct JSContext;
|
||||
#endif
|
||||
|
||||
/*@{*/
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* IID for the nsISupports interface
|
||||
* {00000000-0000-0000-c000-000000000046}
|
||||
*
|
||||
* NOTE: NEVER EVER EVER EVER EVER change this IID. Never. Not once.
|
||||
* No. Don't do it. Stop!
|
||||
*/
|
||||
#define NS_ISUPPORTS_IID \
|
||||
{ 0x00000000, 0x0000, 0x0000, \
|
||||
{0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} }
|
||||
|
||||
/**
|
||||
* Reference count values
|
||||
*/
|
||||
typedef PRUint32 nsrefcnt;
|
||||
|
||||
/**
|
||||
* Base class for all XPCOM objects to use. This macro forces the C++
|
||||
* compiler to use a compatible vtable layout for all XPCOM objects.
|
||||
*/
|
||||
#ifdef XP_MAC
|
||||
#define XPCOM_OBJECT : public __comobject
|
||||
#else
|
||||
#define XPCOM_OBJECT
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Basic component object model interface. Objects which implement
|
||||
* this interface support runtime interface discovery (QueryInterface)
|
||||
* and a reference counted memory model (AddRef/Release). This is
|
||||
* modelled after the win32 IUnknown API.
|
||||
*/
|
||||
class nsISupports XPCOM_OBJECT {
|
||||
public:
|
||||
static const nsIID& GetIID() { static nsIID iid = NS_ISUPPORTS_IID; return iid; }
|
||||
/**
|
||||
* @name Methods
|
||||
*/
|
||||
|
||||
//@{
|
||||
/**
|
||||
* A run time mechanism for interface discovery.
|
||||
* @param aIID [in] A requested interface IID
|
||||
* @param aInstancePtr [out] A pointer to an interface pointer to
|
||||
* receive the result.
|
||||
* @return <b>NS_OK</b> if the interface is supported by the associated
|
||||
* instance, <b>NS_NOINTERFACE</b> if it is not.
|
||||
* <b>NS_ERROR_INVALID_POINTER</b> if <i>aInstancePtr</i> is <b>NULL</b>.
|
||||
*/
|
||||
NS_IMETHOD QueryInterface(REFNSIID aIID,
|
||||
void** aInstancePtr) = 0;
|
||||
/**
|
||||
* Increases the reference count for this interface.
|
||||
* The associated instance will not be deleted unless
|
||||
* the reference count is returned to zero.
|
||||
*
|
||||
* @return The resulting reference count.
|
||||
*/
|
||||
NS_IMETHOD_(nsrefcnt) AddRef(void) = 0;
|
||||
|
||||
/**
|
||||
* Decreases the reference count for this interface.
|
||||
* Generally, if the reference count returns to zero,
|
||||
* the associated instance is deleted.
|
||||
*
|
||||
* @return The resulting reference count.
|
||||
*/
|
||||
NS_IMETHOD_(nsrefcnt) Release(void) = 0;
|
||||
|
||||
#if XPIDL_JS_STUBS
|
||||
// XXX Scriptability hack...
|
||||
static NS_EXPORT_(JSObject*) InitJSClass(JSContext* cx) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static NS_EXPORT_(JSObject*) GetJSObject(JSContext* cx, nsISupports* priv) {
|
||||
NS_NOTYETIMPLEMENTED("nsISupports isn't XPIDL scriptable yet");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
//@}
|
||||
};
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/*@}*/
|
||||
|
||||
#endif /* nsISupports_h___ */
|
||||
#endif /* __gen_nsISupports_h__ */
|
||||
|
||||
@ -19,6 +19,115 @@
|
||||
#ifndef __nsISupportsUtils_h
|
||||
#define __nsISupportsUtils_h
|
||||
|
||||
/***************************************************************************/
|
||||
/* this section copied from the hand written nsISupports.h */
|
||||
|
||||
#include "nsDebug.h"
|
||||
#include "nsTraceRefcnt.h"
|
||||
#include "nsID.h"
|
||||
#include "nsIID.h"
|
||||
#include "nsError.h"
|
||||
|
||||
#if defined(NS_MT_SUPPORTED)
|
||||
#include "prcmon.h"
|
||||
#endif /* NS_MT_SUPPORTED */
|
||||
|
||||
#if defined(XPIDL_JS_STUBS)
|
||||
struct JSObject;
|
||||
struct JSContext;
|
||||
#endif
|
||||
|
||||
/*@{*/
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* IID for the nsISupports interface
|
||||
* {00000000-0000-0000-c000-000000000046}
|
||||
*
|
||||
* NOTE: NEVER EVER EVER EVER EVER change this IID. Never. Not once.
|
||||
* No. Don't do it. Stop!
|
||||
*/
|
||||
#define NS_ISUPPORTS_IID \
|
||||
{ 0x00000000, 0x0000, 0x0000, \
|
||||
{0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46} }
|
||||
|
||||
/**
|
||||
* Reference count values
|
||||
*/
|
||||
typedef PRUint32 nsrefcnt;
|
||||
|
||||
/**
|
||||
* Base class for all XPCOM objects to use. This macro forces the C++
|
||||
* compiler to use a compatible vtable layout for all XPCOM objects.
|
||||
*/
|
||||
#ifdef XP_MAC
|
||||
#define XPCOM_OBJECT : public __comobject
|
||||
#else
|
||||
#define XPCOM_OBJECT
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Basic component object model interface. Objects which implement
|
||||
* this interface support runtime interface discovery (QueryInterface)
|
||||
* and a reference counted memory model (AddRef/Release). This is
|
||||
* modelled after the win32 IUnknown API.
|
||||
*/
|
||||
class nsISupports XPCOM_OBJECT {
|
||||
public:
|
||||
static const nsIID& GetIID() { static nsIID iid = NS_ISUPPORTS_IID; return iid; }
|
||||
/**
|
||||
* @name Methods
|
||||
*/
|
||||
|
||||
//@{
|
||||
/**
|
||||
* A run time mechanism for interface discovery.
|
||||
* @param aIID [in] A requested interface IID
|
||||
* @param aInstancePtr [out] A pointer to an interface pointer to
|
||||
* receive the result.
|
||||
* @return <b>NS_OK</b> if the interface is supported by the associated
|
||||
* instance, <b>NS_NOINTERFACE</b> if it is not.
|
||||
* <b>NS_ERROR_INVALID_POINTER</b> if <i>aInstancePtr</i> is <b>NULL</b>.
|
||||
*/
|
||||
NS_IMETHOD QueryInterface(REFNSIID aIID,
|
||||
void** aInstancePtr) = 0;
|
||||
/**
|
||||
* Increases the reference count for this interface.
|
||||
* The associated instance will not be deleted unless
|
||||
* the reference count is returned to zero.
|
||||
*
|
||||
* @return The resulting reference count.
|
||||
*/
|
||||
NS_IMETHOD_(nsrefcnt) AddRef(void) = 0;
|
||||
|
||||
/**
|
||||
* Decreases the reference count for this interface.
|
||||
* Generally, if the reference count returns to zero,
|
||||
* the associated instance is deleted.
|
||||
*
|
||||
* @return The resulting reference count.
|
||||
*/
|
||||
NS_IMETHOD_(nsrefcnt) Release(void) = 0;
|
||||
|
||||
#if XPIDL_JS_STUBS
|
||||
// XXX Scriptability hack...
|
||||
static NS_EXPORT_(JSObject*) InitJSClass(JSContext* cx) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
static NS_EXPORT_(JSObject*) GetJSObject(JSContext* cx, nsISupports* priv) {
|
||||
NS_NOTYETIMPLEMENTED("nsISupports isn't XPIDL scriptable yet");
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
//@}
|
||||
};
|
||||
|
||||
/*@}*/
|
||||
|
||||
/***************************************************************************/
|
||||
|
||||
/**
|
||||
* A macro to build the static const IID accessor method
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
*/
|
||||
#if 0
|
||||
|
||||
typedef PRBool PRBool;
|
||||
typedef PRUint8 PRUint8;
|
||||
typedef PRUint16 PRUint16;
|
||||
typedef PRUint32 PRUint32;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user