Back to index

lightning-sunbird  0.9+nobinonly
Defines
nsISupportsObsolete.h File Reference
#include "prcmon.h"
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define NS_INIT_REFCNT()   NS_INIT_ISUPPORTS()
#define NS_FREE_XPCOM_ISUPPORTS_POINTER_ARRAY(size, array)   NS_FREE_XPCOM_POINTER_ARRAY((size), (array), NS_IF_RELEASE)
 Macro to free an array of pointers to nsISupports (or classes derived from it).
#define NS_METHOD_GETTER(_method, _type, _member)
#define NS_METHOD_SETTER(_method, _type, _member)
#define NS_METHOD_GETTER_STR(_method, _member)
#define NS_METHOD_SETTER_STR(_method, _member)
#define NS_IMPL_CLASS_GETTER(_method, _type, _member)   NS_IMETHOD NS_METHOD_GETTER(_method, _type, _member)
#define NS_IMPL_CLASS_SETTER(_method, _type, _member)   NS_IMETHOD NS_METHOD_SETTER(_method, _type, _member)
#define NS_IMPL_CLASS_GETSET(_postfix, _type, _member)
#define NS_IMPL_CLASS_GETTER_STR(_method, _member)   NS_IMETHOD NS_METHOD_GETTER_STR(_method, _member)
#define NS_IMPL_CLASS_SETTER_STR(_method, _member)   NS_IMETHOD NS_METHOD_SETTER_STR(_method, _member)
#define NS_IMPL_CLASS_GETSET_STR(_postfix, _member)
#define NS_IMPL_GETTER(_method, _type, _member)   NS_IMETHODIMP NS_METHOD_GETTER(_method, _type, _member)
#define NS_IMPL_SETTER(_method, _type, _member)   NS_IMETHODIMP NS_METHOD_SETTER(_method, _type, _member)
#define NS_IMPL_GETSET(_class, _postfix, _type, _member)
#define NS_IMPL_GETTER_STR(_method, _member)   NS_IMETHODIMP NS_METHOD_GETTER_STR(_method, _member)
#define NS_IMPL_SETTER_STR(_method, _member)   NS_IMETHODIMP NS_METHOD_SETTER_STR(_method, _member)
#define NS_IMPL_GETSET_STR(_class, _postfix, _member)
#define NS_ISTHREADSAFE_IID
 IID for the nsIsThreadsafe interface {88210890-47a6-11d2-bec3-00805f8a66dc}.
#define NS_LOCK_INSTANCE()   PR_CEnterMonitor((void*)this)
#define NS_UNLOCK_INSTANCE()   PR_CExitMonitor((void*)this)
#define NS_VERIFY_THREADSAFE_INTERFACE(_iface)
 This implements query interface with two assumptions: First, the class in question implements nsISupports and its own interface and nothing else.

Define Documentation

Macro to free an array of pointers to nsISupports (or classes derived from it).

A convenience wrapper around NS_FREE_XPCOM_POINTER_ARRAY.

Note that if you know that none of your nsISupports pointers are going to be 0, you can gain a bit of speed by calling NS_FREE_XPCOM_POINTER_ARRAY directly and using NS_RELEASE as your free function.

Parameters:
sizeNumber of elements in the array. If not a constant, this should be a PRInt32. Note that this means this macro will not work if size >= 2^31.
arrayThe array to be freed.

Definition at line 62 of file nsISupportsObsolete.h.

#define NS_IMPL_CLASS_GETSET (   _postfix,
  _type,
  _member 
)
Value:
NS_IMPL_CLASS_GETTER(Get##_postfix, _type, _member) \
NS_IMPL_CLASS_SETTER(Set##_postfix, _type, _member)

Definition at line 161 of file nsISupportsObsolete.h.

#define NS_IMPL_CLASS_GETSET_STR (   _postfix,
  _member 
)
Value:
NS_IMPL_CLASS_GETTER_STR(Get##_postfix, _member) \
NS_IMPL_CLASS_SETTER_STR(Set##_postfix, _member)

Definition at line 172 of file nsISupportsObsolete.h.

#define NS_IMPL_CLASS_GETTER (   _method,
  _type,
  _member 
)    NS_IMETHOD NS_METHOD_GETTER(_method, _type, _member)

Definition at line 155 of file nsISupportsObsolete.h.

#define NS_IMPL_CLASS_GETTER_STR (   _method,
  _member 
)    NS_IMETHOD NS_METHOD_GETTER_STR(_method, _member)

Definition at line 166 of file nsISupportsObsolete.h.

#define NS_IMPL_CLASS_SETTER (   _method,
  _type,
  _member 
)    NS_IMETHOD NS_METHOD_SETTER(_method, _type, _member)

Definition at line 158 of file nsISupportsObsolete.h.

#define NS_IMPL_CLASS_SETTER_STR (   _method,
  _member 
)    NS_IMETHOD NS_METHOD_SETTER_STR(_method, _member)

Definition at line 169 of file nsISupportsObsolete.h.

#define NS_IMPL_GETSET (   _class,
  _postfix,
  _type,
  _member 
)
Value:
NS_IMPL_GETTER(_class::Get##_postfix, _type, _member) \
NS_IMPL_SETTER(_class::Set##_postfix, _type, _member)

Definition at line 185 of file nsISupportsObsolete.h.

#define NS_IMPL_GETSET_STR (   _class,
  _postfix,
  _member 
)
Value:
NS_IMPL_GETTER_STR(_class::Get##_postfix, _member) \
NS_IMPL_SETTER_STR(_class::Set##_postfix, _member)

Definition at line 196 of file nsISupportsObsolete.h.

#define NS_IMPL_GETTER (   _method,
  _type,
  _member 
)    NS_IMETHODIMP NS_METHOD_GETTER(_method, _type, _member)

Definition at line 179 of file nsISupportsObsolete.h.

#define NS_IMPL_GETTER_STR (   _method,
  _member 
)    NS_IMETHODIMP NS_METHOD_GETTER_STR(_method, _member)

Definition at line 190 of file nsISupportsObsolete.h.

#define NS_IMPL_SETTER (   _method,
  _type,
  _member 
)    NS_IMETHODIMP NS_METHOD_SETTER(_method, _type, _member)

Definition at line 182 of file nsISupportsObsolete.h.

#define NS_IMPL_SETTER_STR (   _method,
  _member 
)    NS_IMETHODIMP NS_METHOD_SETTER_STR(_method, _member)

Definition at line 193 of file nsISupportsObsolete.h.

Definition at line 45 of file nsISupportsObsolete.h.

Value:
{ 0x88210890, 0x47a6, 0x11d2,                                               \
    {0xbe, 0xc3, 0x00, 0x80, 0x5f, 0x8a, 0x66, 0xdc} }

IID for the nsIsThreadsafe interface {88210890-47a6-11d2-bec3-00805f8a66dc}.

This interface is only used for debugging purposes to determine if a given component is threadsafe.

Definition at line 207 of file nsISupportsObsolete.h.

#define NS_LOCK_INSTANCE ( )    PR_CEnterMonitor((void*)this)

Definition at line 211 of file nsISupportsObsolete.h.

#define NS_METHOD_GETTER (   _method,
  _type,
  _member 
)
Value:
_method(_type* aResult) \
{\
    if (!aResult) return NS_ERROR_NULL_POINTER; \
    *aResult = _member; \
    return NS_OK; \
}

Definition at line 72 of file nsISupportsObsolete.h.

#define NS_METHOD_GETTER_STR (   _method,
  _member 
)
Value:
_method(char* *aString)                         \
{                                               \
    if (!aString) return NS_ERROR_NULL_POINTER; \
    if (!(*aString = PL_strdup(_member)))       \
      return NS_ERROR_OUT_OF_MEMORY;            \
    return NS_OK;                               \
}

Definition at line 91 of file nsISupportsObsolete.h.

#define NS_METHOD_SETTER (   _method,
  _type,
  _member 
)
Value:
_method(_type aResult) \
{ \
    _member = aResult; \
    return NS_OK; \
}

Definition at line 80 of file nsISupportsObsolete.h.

#define NS_METHOD_SETTER_STR (   _method,
  _member 
)
Value:
_method(const char *aString)                   \
{                                              \
    if (_member) PR_Free(_member);             \
    if (!aString)                              \
      _member = nsnull;                        \
    else if (!(_member = PL_strdup(aString)))  \
      return NS_ERROR_OUT_OF_MEMORY;           \
    return NS_OK;                              \
}

Definition at line 100 of file nsISupportsObsolete.h.

#define NS_UNLOCK_INSTANCE ( )    PR_CExitMonitor((void*)this)

Definition at line 213 of file nsISupportsObsolete.h.

This implements query interface with two assumptions: First, the class in question implements nsISupports and its own interface and nothing else.

Second, the implementation of the class's primary inheritance chain leads to its own interface.

Parameters:
_classThe name of the class implementing the method
_classiiddefThe name of the define symbol that defines the IID for the class (e.g. NS_ISUPPORTS_IID)

Definition at line 236 of file nsISupportsObsolete.h.