2015-04-09 20:25:05 +03:00
|
|
|
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
|
|
|
/* vim: set ts=8 sts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04: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 10:57:38 +04:00
|
|
|
|
|
|
|
#ifndef nsSupportsPrimitives_h__
|
|
|
|
#define nsSupportsPrimitives_h__
|
|
|
|
|
2011-12-18 07:47:45 +04:00
|
|
|
#include "mozilla/Attributes.h"
|
|
|
|
|
1999-08-04 10:57:38 +04:00
|
|
|
#include "nsISupportsPrimitives.h"
|
2001-04-10 07:56:48 +04:00
|
|
|
#include "nsCOMPtr.h"
|
2013-09-23 21:25:00 +04:00
|
|
|
#include "nsString.h"
|
1999-08-04 10:57:38 +04:00
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
class nsSupportsID final : public nsISupportsID
|
1999-08-04 10:57:38 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 19:15:21 +04:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSID
|
1999-08-04 10:57:38 +04:00
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
nsSupportsID();
|
1999-08-04 10:57:38 +04:00
|
|
|
|
|
|
|
private:
|
2016-05-03 23:25:41 +03:00
|
|
|
~nsSupportsID() {}
|
2004-01-15 09:14:18 +03:00
|
|
|
|
2014-07-09 19:15:21 +04:00
|
|
|
nsID* mData;
|
1999-08-04 10:57:38 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
class nsSupportsCString final : public nsISupportsCString
|
1999-08-04 10:57:38 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 19:15:21 +04:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSCSTRING
|
1999-08-04 10:57:38 +04:00
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
nsSupportsCString() {}
|
1999-08-04 10:57:38 +04:00
|
|
|
|
|
|
|
private:
|
2016-05-03 23:25:41 +03:00
|
|
|
~nsSupportsCString() {}
|
2014-07-09 19:15:21 +04:00
|
|
|
|
|
|
|
nsCString mData;
|
1999-08-04 10:57:38 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
class nsSupportsString final : public nsISupportsString
|
1999-08-04 10:57:38 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 19:15:21 +04:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSSTRING
|
1999-08-04 10:57:38 +04:00
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
nsSupportsString() {}
|
1999-08-04 10:57:38 +04:00
|
|
|
|
|
|
|
private:
|
2016-05-03 23:25:41 +03:00
|
|
|
~nsSupportsString() {}
|
2014-07-09 19:15:21 +04:00
|
|
|
|
|
|
|
nsString mData;
|
1999-08-04 10:57:38 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
class nsSupportsPRBool final : public nsISupportsPRBool
|
1999-08-04 10:57:38 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 19:15:21 +04:00
|
|
|
NS_DECL_THREADSAFE_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSPRBOOL
|
1999-08-04 10:57:38 +04:00
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
nsSupportsPRBool();
|
1999-08-04 10:57:38 +04:00
|
|
|
|
|
|
|
private:
|
2016-05-03 23:25:41 +03:00
|
|
|
~nsSupportsPRBool() {}
|
2004-01-15 09:14:18 +03:00
|
|
|
|
2014-07-09 19:15:21 +04:00
|
|
|
bool mData;
|
1999-08-04 10:57:38 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
class nsSupportsPRUint8 final : public nsISupportsPRUint8
|
1999-08-04 10:57:38 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 19:15:21 +04:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSPRUINT8
|
1999-08-04 10:57:38 +04:00
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
nsSupportsPRUint8();
|
1999-08-04 10:57:38 +04:00
|
|
|
|
|
|
|
private:
|
2016-05-03 23:25:41 +03:00
|
|
|
~nsSupportsPRUint8() {}
|
2004-01-15 09:14:18 +03:00
|
|
|
|
2014-07-09 19:15:21 +04:00
|
|
|
uint8_t mData;
|
1999-08-04 10:57:38 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
class nsSupportsPRUint16 final : public nsISupportsPRUint16
|
1999-08-04 10:57:38 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 19:15:21 +04:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSPRUINT16
|
1999-08-04 10:57:38 +04:00
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
nsSupportsPRUint16();
|
1999-08-04 10:57:38 +04:00
|
|
|
|
|
|
|
private:
|
2016-05-03 23:25:41 +03:00
|
|
|
~nsSupportsPRUint16() {}
|
2004-01-15 09:14:18 +03:00
|
|
|
|
2014-07-09 19:15:21 +04:00
|
|
|
uint16_t mData;
|
1999-08-04 10:57:38 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
class nsSupportsPRUint32 final : public nsISupportsPRUint32
|
1999-08-04 10:57:38 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 19:15:21 +04:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSPRUINT32
|
1999-08-04 10:57:38 +04:00
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
nsSupportsPRUint32();
|
1999-08-04 10:57:38 +04:00
|
|
|
|
|
|
|
private:
|
2016-05-03 23:25:41 +03:00
|
|
|
~nsSupportsPRUint32() {}
|
2004-01-15 09:14:18 +03:00
|
|
|
|
2014-07-09 19:15:21 +04:00
|
|
|
uint32_t mData;
|
1999-08-04 10:57:38 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
class nsSupportsPRUint64 final : public nsISupportsPRUint64
|
1999-08-04 10:57:38 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 19:15:21 +04:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSPRUINT64
|
1999-08-04 10:57:38 +04:00
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
nsSupportsPRUint64();
|
1999-08-04 10:57:38 +04:00
|
|
|
|
|
|
|
private:
|
2016-05-03 23:25:41 +03:00
|
|
|
~nsSupportsPRUint64() {}
|
2004-01-15 09:14:18 +03:00
|
|
|
|
2014-07-09 19:15:21 +04:00
|
|
|
uint64_t mData;
|
1999-08-04 10:57:38 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
class nsSupportsPRTime final : public nsISupportsPRTime
|
1999-08-04 10:57:38 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 19:15:21 +04:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSPRTIME
|
1999-08-04 10:57:38 +04:00
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
nsSupportsPRTime();
|
1999-08-04 10:57:38 +04:00
|
|
|
|
|
|
|
private:
|
2016-05-03 23:25:41 +03:00
|
|
|
~nsSupportsPRTime() {}
|
2004-01-15 09:14:18 +03:00
|
|
|
|
2014-07-09 19:15:21 +04:00
|
|
|
PRTime mData;
|
1999-08-04 10:57:38 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
class nsSupportsChar final : public nsISupportsChar
|
1999-08-04 10:57:38 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 19:15:21 +04:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSCHAR
|
1999-08-04 10:57:38 +04:00
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
nsSupportsChar();
|
1999-08-04 10:57:38 +04:00
|
|
|
|
|
|
|
private:
|
2016-05-03 23:25:41 +03:00
|
|
|
~nsSupportsChar() {}
|
2004-01-15 09:14:18 +03:00
|
|
|
|
2014-07-09 19:15:21 +04:00
|
|
|
char mData;
|
1999-08-04 10:57:38 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
class nsSupportsPRInt16 final : public nsISupportsPRInt16
|
1999-08-04 10:57:38 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 19:15:21 +04:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSPRINT16
|
1999-08-04 10:57:38 +04:00
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
nsSupportsPRInt16();
|
1999-08-04 10:57:38 +04:00
|
|
|
|
|
|
|
private:
|
2016-05-03 23:25:41 +03:00
|
|
|
~nsSupportsPRInt16() {}
|
2004-01-15 09:14:18 +03:00
|
|
|
|
2014-07-09 19:15:21 +04:00
|
|
|
int16_t mData;
|
1999-08-04 10:57:38 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
class nsSupportsPRInt32 final : public nsISupportsPRInt32
|
1999-08-04 10:57:38 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 19:15:21 +04:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSPRINT32
|
1999-08-04 10:57:38 +04:00
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
nsSupportsPRInt32();
|
1999-08-04 10:57:38 +04:00
|
|
|
|
|
|
|
private:
|
2016-05-03 23:25:41 +03:00
|
|
|
~nsSupportsPRInt32() {}
|
2004-01-15 09:14:18 +03:00
|
|
|
|
2014-07-09 19:15:21 +04:00
|
|
|
int32_t mData;
|
1999-08-04 10:57:38 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
class nsSupportsPRInt64 final : public nsISupportsPRInt64
|
1999-08-04 10:57:38 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 19:15:21 +04:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSPRINT64
|
1999-08-04 10:57:38 +04:00
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
nsSupportsPRInt64();
|
1999-08-04 10:57:38 +04:00
|
|
|
|
|
|
|
private:
|
2016-05-03 23:25:41 +03:00
|
|
|
~nsSupportsPRInt64() {}
|
2004-01-15 09:14:18 +03:00
|
|
|
|
2014-07-09 19:15:21 +04:00
|
|
|
int64_t mData;
|
1999-08-04 10:57:38 +04:00
|
|
|
};
|
|
|
|
|
1999-08-06 13:42:12 +04:00
|
|
|
/***************************************************************************/
|
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
class nsSupportsFloat final : public nsISupportsFloat
|
1999-08-06 13:42:12 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 19:15:21 +04:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSFLOAT
|
1999-08-06 13:42:12 +04:00
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
nsSupportsFloat();
|
1999-08-06 13:42:12 +04:00
|
|
|
|
|
|
|
private:
|
2016-05-03 23:25:41 +03:00
|
|
|
~nsSupportsFloat() {}
|
2004-01-15 09:14:18 +03:00
|
|
|
|
2014-07-09 19:15:21 +04:00
|
|
|
float mData;
|
1999-08-06 13:42:12 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
class nsSupportsDouble final : public nsISupportsDouble
|
1999-08-06 13:42:12 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 19:15:21 +04:00
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSDOUBLE
|
1999-08-06 13:42:12 +04:00
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
nsSupportsDouble();
|
1999-08-06 13:42:12 +04:00
|
|
|
|
|
|
|
private:
|
2016-05-03 23:25:41 +03:00
|
|
|
~nsSupportsDouble() {}
|
2004-01-15 09:14:18 +03:00
|
|
|
|
2014-07-09 19:15:21 +04:00
|
|
|
double mData;
|
1999-08-06 13:42:12 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
1999-08-04 10:57:38 +04:00
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
class nsSupportsInterfacePointer final : public nsISupportsInterfacePointer
|
2001-04-10 07:56:48 +04:00
|
|
|
{
|
|
|
|
public:
|
2014-07-09 19:15:21 +04:00
|
|
|
NS_DECL_THREADSAFE_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSINTERFACEPOINTER
|
2001-04-10 07:56:48 +04:00
|
|
|
|
2016-05-03 23:25:41 +03:00
|
|
|
nsSupportsInterfacePointer();
|
2001-04-10 07:56:48 +04:00
|
|
|
|
|
|
|
private:
|
2016-05-03 23:25:41 +03:00
|
|
|
~nsSupportsInterfacePointer();
|
2004-01-15 09:14:18 +03:00
|
|
|
|
2014-07-09 19:15:21 +04:00
|
|
|
nsCOMPtr<nsISupports> mData;
|
|
|
|
nsID* mIID;
|
2001-04-10 07:56:48 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
/***************************************************************************/
|
|
|
|
|
2003-06-18 15:26:27 +04: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!
|
|
|
|
*/
|
2015-03-21 19:28:04 +03:00
|
|
|
class nsSupportsDependentCString final : public nsISupportsCString
|
2003-06-18 15:26:27 +04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
NS_DECL_ISUPPORTS
|
|
|
|
NS_DECL_NSISUPPORTSPRIMITIVE
|
|
|
|
NS_DECL_NSISUPPORTSCSTRING
|
|
|
|
|
2014-07-28 21:19:06 +04:00
|
|
|
explicit nsSupportsDependentCString(const char* aStr);
|
2004-01-15 09:14:18 +03:00
|
|
|
|
2003-06-18 15:26:27 +04:00
|
|
|
private:
|
2004-01-15 09:14:18 +03:00
|
|
|
~nsSupportsDependentCString() {}
|
|
|
|
|
2003-06-18 15:26:27 +04:00
|
|
|
nsDependentCString mData;
|
|
|
|
};
|
|
|
|
|
1999-08-04 10:57:38 +04:00
|
|
|
#endif /* nsSupportsPrimitives_h__ */
|