Add a quick constructor for nsISupportsPRBool as well as make it implement

threadsafe isupports. Stream convs. use it.
This commit is contained in:
ruslan%netscape.com 2000-04-12 00:46:58 +00:00
Родитель 857df0c253
Коммит a6cd5c0692
2 изменённых файлов: 19 добавлений и 1 удалений

Просмотреть файл

@ -272,4 +272,7 @@ interface nsISupportsVoid : nsISupports
{ 0xba, 0xf8, 0x0, 0x80, 0x5f, 0x8a, 0x5d, 0xd7 } }
#define NS_SUPPORTS_VOID_PROGID "component://netscape/supports-void"
#define NS_SUPPORTS_VOID_CLASSNAME "Supports void"
extern NS_COM nsresult NS_NewISupportsPRBool (nsISupportsPRBool ** aResult);
%}

Просмотреть файл

@ -233,7 +233,7 @@ NS_IMETHODIMP nsSupportsWStringImpl::SetDataWithLength(PRInt32 aLength, const PR
/***************************************************************************/
NS_IMPL_ISUPPORTS1(nsSupportsPRBoolImpl, nsISupportsPRBool)
NS_IMPL_THREADSAFE_ISUPPORTS1(nsSupportsPRBoolImpl, nsISupportsPRBool)
nsSupportsPRBoolImpl::nsSupportsPRBoolImpl()
: mData(PR_FALSE)
@ -274,6 +274,21 @@ NS_IMETHODIMP nsSupportsPRBoolImpl::ToString(char **_retval)
return result ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
}
NS_COM nsresult
NS_NewISupportsPRBool (nsISupportsPRBool ** aResult)
{
NS_ENSURE_ARG_POINTER (aResult);
nsISupportsPRBool * rval = (nsISupportsPRBool *) (new nsSupportsPRBoolImpl ());
if (!rval)
return NS_ERROR_OUT_OF_MEMORY;
NS_ADDREF (rval);
*aResult = rval;
return NS_OK;
}
/***************************************************************************/
NS_IMPL_ISUPPORTS1(nsSupportsPRUint8Impl, nsISupportsPRUint8)