PageRenderTime 80ms CodeModel.GetById 39ms app.highlight 1ms RepoModel.GetById 30ms app.codeStats 1ms

/gecko_api/include/nsISupports.h

http://firefox-mac-pdf.googlecode.com/
C++ Header | 125 lines | 68 code | 30 blank | 27 comment | 0 complexity | 03b49ed409322f5f4402cdf5492e9200 MD5 | raw file
  1/*
  2 * DO NOT EDIT.  THIS FILE IS GENERATED FROM /builds/tinderbox/XR-Trunk/Darwin_8.8.4_Depend/mozilla/xpcom/base/nsISupports.idl
  3 */
  4
  5#ifndef __gen_nsISupports_h__
  6#define __gen_nsISupports_h__
  7
  8
  9#ifndef __gen_nsrootidl_h__
 10#include "nsrootidl.h"
 11#endif
 12
 13/* For IDL files that don't want to include root IDL files. */
 14#ifndef NS_NO_VTABLE
 15#define NS_NO_VTABLE
 16#endif
 17/* 
 18 * Start commenting out the C++ versions of the below in the output header
 19 */
 20#if 0
 21
 22/* starting interface:    nsISupports */
 23#define NS_ISUPPORTS_IID_STR "00000000-0000-0000-c000-000000000046"
 24
 25#define NS_ISUPPORTS_IID \
 26  {0x00000000, 0x0000, 0x0000, \
 27    { 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46 }}
 28
 29class NS_NO_VTABLE NS_SCRIPTABLE nsISupports {
 30 public: 
 31
 32  NS_DECLARE_STATIC_IID_ACCESSOR(NS_ISUPPORTS_IID)
 33
 34  /* void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */
 35  NS_SCRIPTABLE NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result) = 0;
 36
 37  /* [noscript, notxpcom] nsrefcnt AddRef (); */
 38  NS_IMETHOD_(nsrefcnt) AddRef(void) = 0;
 39
 40  /* [noscript, notxpcom] nsrefcnt Release (); */
 41  NS_IMETHOD_(nsrefcnt) Release(void) = 0;
 42
 43};
 44
 45  NS_DEFINE_STATIC_IID_ACCESSOR(nsISupports, NS_ISUPPORTS_IID)
 46
 47/* Use this macro when declaring classes that implement this interface. */
 48#define NS_DECL_NSISUPPORTS \
 49  NS_SCRIPTABLE NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result); \
 50  NS_IMETHOD_(nsrefcnt) AddRef(void); \
 51  NS_IMETHOD_(nsrefcnt) Release(void); 
 52
 53/* Use this macro to declare functions that forward the behavior of this interface to another object. */
 54#define NS_FORWARD_NSISUPPORTS(_to) \
 55  NS_SCRIPTABLE NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result) { return _to QueryInterface(uuid, result); } \
 56  NS_IMETHOD_(nsrefcnt) AddRef(void) { return _to AddRef(); } \
 57  NS_IMETHOD_(nsrefcnt) Release(void) { return _to Release(); } 
 58
 59/* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */
 60#define NS_FORWARD_SAFE_NSISUPPORTS(_to) \
 61  NS_SCRIPTABLE NS_IMETHOD QueryInterface(const nsIID & uuid, void * *result) { return !_to ? NS_ERROR_NULL_POINTER : _to->QueryInterface(uuid, result); } \
 62  NS_IMETHOD_(nsrefcnt) AddRef(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->AddRef(); } \
 63  NS_IMETHOD_(nsrefcnt) Release(void) { return !_to ? NS_ERROR_NULL_POINTER : _to->Release(); } 
 64
 65#if 0
 66/* Use the code below as a template for the implementation class for this interface. */
 67
 68/* Header file */
 69class nsSupports : public nsISupports
 70{
 71public:
 72  NS_DECL_ISUPPORTS
 73  NS_DECL_NSISUPPORTS
 74
 75  nsSupports();
 76
 77private:
 78  ~nsSupports();
 79
 80protected:
 81  /* additional members */
 82};
 83
 84/* Implementation file */
 85NS_IMPL_ISUPPORTS1(nsSupports, nsISupports)
 86
 87nsSupports::nsSupports()
 88{
 89  /* member initializers and constructor code */
 90}
 91
 92nsSupports::~nsSupports()
 93{
 94  /* destructor code */
 95}
 96
 97/* void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */
 98NS_IMETHODIMP nsSupports::QueryInterface(const nsIID & uuid, void * *result)
 99{
100    return NS_ERROR_NOT_IMPLEMENTED;
101}
102
103/* [noscript, notxpcom] nsrefcnt AddRef (); */
104NS_IMETHODIMP_(nsrefcnt) nsSupports::AddRef()
105{
106    return NS_ERROR_NOT_IMPLEMENTED;
107}
108
109/* [noscript, notxpcom] nsrefcnt Release (); */
110NS_IMETHODIMP_(nsrefcnt) nsSupports::Release()
111{
112    return NS_ERROR_NOT_IMPLEMENTED;
113}
114
115/* End of implementation class template. */
116#endif
117
118/* 
119 * End commenting out the C++ versions of the above in the output header
120 */
121#endif
122#include "nsISupportsBase.h"
123#include "nsISupportsUtils.h"
124
125#endif /* __gen_nsISupports_h__ */