2001-09-28 20:14:13 +00:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-05-21 11:12:37 +00: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/. */
|
1999-08-04 06:57:38 +00:00
|
|
|
|
|
|
|
#ifndef nsSupportsPrimitives_h__
|
|
|
|
#define nsSupportsPrimitives_h__
|
|
|
|
|
2011-12-18 03:47:45 +00:00
|
|
|
#include "mozilla/Attributes.h"
|
|
|
|
|
1999-08-04 06:57:38 +00:00
|
|
|
#include "nsISupportsPrimitives.h"
|
2001-04-10 03:56:48 +00:00
|
|
|
#include "nsCOMPtr.h"
|
2013-09-23 17:25:00 +00:00
|
|
|
#include "nsString.h"
|
1999-08-04 06:57:38 +00:00
|
|
|
|
2011-12-18 03:47:45 +00:00
|
|
|
class nsSupportsIDImpl MOZ_FINAL : public nsISupportsID
|
1999-08-04 06:57:38 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 15:15:21 +00:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSID
|
1999-08-04 06:57:38 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
nsSupportsIDImpl();
|
1999-08-04 06:57:38 +00:00
|
|
|
|
|
|
|
private:
|
2014-07-09 15:15:21 +00:00
|
|
|
~nsSupportsIDImpl() {}
|
2004-01-15 06:14:18 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
nsID* mData;
|
1999-08-04 06:57:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2011-12-18 03:47:45 +00:00
|
|
|
class nsSupportsCStringImpl MOZ_FINAL : public nsISupportsCString
|
1999-08-04 06:57:38 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 15:15:21 +00:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSCSTRING
|
1999-08-04 06:57:38 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
nsSupportsCStringImpl() {}
|
1999-08-04 06:57:38 +00:00
|
|
|
|
|
|
|
private:
|
2014-07-09 15:15:21 +00:00
|
|
|
~nsSupportsCStringImpl() {}
|
|
|
|
|
|
|
|
nsCString mData;
|
1999-08-04 06:57:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2011-12-18 03:47:45 +00:00
|
|
|
class nsSupportsStringImpl MOZ_FINAL : public nsISupportsString
|
1999-08-04 06:57:38 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 15:15:21 +00:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSSTRING
|
1999-08-04 06:57:38 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
nsSupportsStringImpl() {}
|
1999-08-04 06:57:38 +00:00
|
|
|
|
|
|
|
private:
|
2014-07-09 15:15:21 +00:00
|
|
|
~nsSupportsStringImpl() {}
|
|
|
|
|
|
|
|
nsString mData;
|
1999-08-04 06:57:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2011-12-18 03:47:45 +00:00
|
|
|
class nsSupportsPRBoolImpl MOZ_FINAL : public nsISupportsPRBool
|
1999-08-04 06:57:38 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 15:15:21 +00:00
|
|
|
NS_DECL_THREADSAFE_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSPRBOOL
|
1999-08-04 06:57:38 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
nsSupportsPRBoolImpl();
|
1999-08-04 06:57:38 +00:00
|
|
|
|
|
|
|
private:
|
2014-07-09 15:15:21 +00:00
|
|
|
~nsSupportsPRBoolImpl() {}
|
2004-01-15 06:14:18 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
bool mData;
|
1999-08-04 06:57:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2011-12-18 03:47:45 +00:00
|
|
|
class nsSupportsPRUint8Impl MOZ_FINAL : public nsISupportsPRUint8
|
1999-08-04 06:57:38 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 15:15:21 +00:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSPRUINT8
|
1999-08-04 06:57:38 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
nsSupportsPRUint8Impl();
|
1999-08-04 06:57:38 +00:00
|
|
|
|
|
|
|
private:
|
2014-07-09 15:15:21 +00:00
|
|
|
~nsSupportsPRUint8Impl() {}
|
2004-01-15 06:14:18 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
uint8_t mData;
|
1999-08-04 06:57:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2011-12-18 03:47:45 +00:00
|
|
|
class nsSupportsPRUint16Impl MOZ_FINAL : public nsISupportsPRUint16
|
1999-08-04 06:57:38 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 15:15:21 +00:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSPRUINT16
|
1999-08-04 06:57:38 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
nsSupportsPRUint16Impl();
|
1999-08-04 06:57:38 +00:00
|
|
|
|
|
|
|
private:
|
2014-07-09 15:15:21 +00:00
|
|
|
~nsSupportsPRUint16Impl() {}
|
2004-01-15 06:14:18 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
uint16_t mData;
|
1999-08-04 06:57:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2011-12-18 03:47:45 +00:00
|
|
|
class nsSupportsPRUint32Impl MOZ_FINAL : public nsISupportsPRUint32
|
1999-08-04 06:57:38 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 15:15:21 +00:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSPRUINT32
|
1999-08-04 06:57:38 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
nsSupportsPRUint32Impl();
|
1999-08-04 06:57:38 +00:00
|
|
|
|
|
|
|
private:
|
2014-07-09 15:15:21 +00:00
|
|
|
~nsSupportsPRUint32Impl() {}
|
2004-01-15 06:14:18 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
uint32_t mData;
|
1999-08-04 06:57:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2011-12-18 03:47:45 +00:00
|
|
|
class nsSupportsPRUint64Impl MOZ_FINAL : public nsISupportsPRUint64
|
1999-08-04 06:57:38 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 15:15:21 +00:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSPRUINT64
|
1999-08-04 06:57:38 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
nsSupportsPRUint64Impl();
|
1999-08-04 06:57:38 +00:00
|
|
|
|
|
|
|
private:
|
2014-07-09 15:15:21 +00:00
|
|
|
~nsSupportsPRUint64Impl() {}
|
2004-01-15 06:14:18 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
uint64_t mData;
|
1999-08-04 06:57:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2011-12-18 03:47:45 +00:00
|
|
|
class nsSupportsPRTimeImpl MOZ_FINAL : public nsISupportsPRTime
|
1999-08-04 06:57:38 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 15:15:21 +00:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSPRTIME
|
1999-08-04 06:57:38 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
nsSupportsPRTimeImpl();
|
1999-08-04 06:57:38 +00:00
|
|
|
|
|
|
|
private:
|
2014-07-09 15:15:21 +00:00
|
|
|
~nsSupportsPRTimeImpl() {}
|
2004-01-15 06:14:18 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
PRTime mData;
|
1999-08-04 06:57:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2011-12-18 03:47:45 +00:00
|
|
|
class nsSupportsCharImpl MOZ_FINAL : public nsISupportsChar
|
1999-08-04 06:57:38 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 15:15:21 +00:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSCHAR
|
1999-08-04 06:57:38 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
nsSupportsCharImpl();
|
1999-08-04 06:57:38 +00:00
|
|
|
|
|
|
|
private:
|
2014-07-09 15:15:21 +00:00
|
|
|
~nsSupportsCharImpl() {}
|
2004-01-15 06:14:18 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
char mData;
|
1999-08-04 06:57:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2011-12-18 03:47:45 +00:00
|
|
|
class nsSupportsPRInt16Impl MOZ_FINAL : public nsISupportsPRInt16
|
1999-08-04 06:57:38 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 15:15:21 +00:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSPRINT16
|
1999-08-04 06:57:38 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
nsSupportsPRInt16Impl();
|
1999-08-04 06:57:38 +00:00
|
|
|
|
|
|
|
private:
|
2014-07-09 15:15:21 +00:00
|
|
|
~nsSupportsPRInt16Impl() {}
|
2004-01-15 06:14:18 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
int16_t mData;
|
1999-08-04 06:57:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2011-12-18 03:47:45 +00:00
|
|
|
class nsSupportsPRInt32Impl MOZ_FINAL : public nsISupportsPRInt32
|
1999-08-04 06:57:38 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 15:15:21 +00:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSPRINT32
|
1999-08-04 06:57:38 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
nsSupportsPRInt32Impl();
|
1999-08-04 06:57:38 +00:00
|
|
|
|
|
|
|
private:
|
2014-07-09 15:15:21 +00:00
|
|
|
~nsSupportsPRInt32Impl() {}
|
2004-01-15 06:14:18 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
int32_t mData;
|
1999-08-04 06:57:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2011-12-18 03:47:45 +00:00
|
|
|
class nsSupportsPRInt64Impl MOZ_FINAL : public nsISupportsPRInt64
|
1999-08-04 06:57:38 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 15:15:21 +00:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSPRINT64
|
1999-08-04 06:57:38 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
nsSupportsPRInt64Impl();
|
1999-08-04 06:57:38 +00:00
|
|
|
|
|
|
|
private:
|
2014-07-09 15:15:21 +00:00
|
|
|
~nsSupportsPRInt64Impl() {}
|
2004-01-15 06:14:18 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
int64_t mData;
|
1999-08-04 06:57:38 +00:00
|
|
|
};
|
|
|
|
|
1999-08-06 09:42:12 +00:00
|
|
|
/***************************************************************************/
|
|
|
|
|
2011-12-18 03:47:45 +00:00
|
|
|
class nsSupportsFloatImpl MOZ_FINAL : public nsISupportsFloat
|
1999-08-06 09:42:12 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 15:15:21 +00:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSFLOAT
|
1999-08-06 09:42:12 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
nsSupportsFloatImpl();
|
1999-08-06 09:42:12 +00:00
|
|
|
|
|
|
|
private:
|
2014-07-09 15:15:21 +00:00
|
|
|
~nsSupportsFloatImpl() {}
|
2004-01-15 06:14:18 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
float mData;
|
1999-08-06 09:42:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2011-12-18 03:47:45 +00:00
|
|
|
class nsSupportsDoubleImpl MOZ_FINAL : public nsISupportsDouble
|
1999-08-06 09:42:12 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 15:15:21 +00:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSDOUBLE
|
1999-08-06 09:42:12 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
nsSupportsDoubleImpl();
|
1999-08-06 09:42:12 +00:00
|
|
|
|
|
|
|
private:
|
2014-07-09 15:15:21 +00:00
|
|
|
~nsSupportsDoubleImpl() {}
|
2004-01-15 06:14:18 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
double mData;
|
1999-08-06 09:42:12 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
1999-08-04 06:57:38 +00:00
|
|
|
|
2011-12-18 03:47:45 +00:00
|
|
|
class nsSupportsVoidImpl MOZ_FINAL : public nsISupportsVoid
|
1999-08-20 03:14:46 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 15:15:21 +00:00
|
|
|
NS_DECL_THREADSAFE_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSVOID
|
1999-08-04 06:57:38 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
nsSupportsVoidImpl();
|
1999-08-20 03:14:46 +00:00
|
|
|
|
|
|
|
private:
|
2014-07-09 15:15:21 +00:00
|
|
|
~nsSupportsVoidImpl() {}
|
2004-01-15 06:14:18 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
void* mData;
|
1999-08-20 03:14:46 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
1999-08-04 06:57:38 +00:00
|
|
|
|
2011-12-18 03:47:45 +00:00
|
|
|
class nsSupportsInterfacePointerImpl MOZ_FINAL : public nsISupportsInterfacePointer
|
2001-04-10 03:56:48 +00:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 15:15:21 +00:00
|
|
|
NS_DECL_THREADSAFE_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSINTERFACEPOINTER
|
2001-04-10 03:56:48 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
nsSupportsInterfacePointerImpl();
|
2001-04-10 03:56:48 +00:00
|
|
|
|
|
|
|
private:
|
2014-07-09 15:15:21 +00:00
|
|
|
~nsSupportsInterfacePointerImpl();
|
2004-01-15 06:14:18 +00:00
|
|
|
|
2014-07-09 15:15:21 +00:00
|
|
|
nsCOMPtr<nsISupports> mData;
|
|
|
|
nsID* mIID;
|
2001-04-10 03:56:48 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2003-06-18 11:26:27 +00:00
|
|
|
/**
|
|
|
|
* Wraps a static const char* buffer for use with nsISupportsCString
|
|
|
|
*
|
|
|
|
* Only use this class with static buffers, or arena-allocated buffers of
|
|
|
|
* permanent lifetime!
|
|
|
|
*/
|
2011-12-18 03:47:45 +00:00
|
|
|
class nsSupportsDependentCString MOZ_FINAL : public nsISupportsCString
|
2003-06-18 11:26:27 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSCSTRING
|
|
|
|
|
2014-07-28 17:19:06 +00:00
|
|
|
explicit nsSupportsDependentCString(const char* aStr);
|
2004-01-15 06:14:18 +00:00
|
|
|
|
2003-06-18 11:26:27 +00:00
|
|
|
private:
|
2004-01-15 06:14:18 +00:00
|
|
|
~nsSupportsDependentCString() {}
|
|
|
|
|
2003-06-18 11:26:27 +00:00
|
|
|
nsDependentCString mData;
|
|
|
|
};
|
|
|
|
|
1999-08-04 06:57:38 +00:00
|
|
|
#endif /* nsSupportsPrimitives_h__ */
|