Bug 364847 Give nsISocketTransport classinfo and a THREADSAFE flag

r+sr=darin
This commit is contained in:
cbiesinger%web.de 2006-12-26 22:14:29 +00:00
Родитель aa9a79a6da
Коммит 7835963149
2 изменённых файлов: 66 добавлений и 2 удалений

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

@ -67,6 +67,7 @@
#include "nsISocketProvider.h"
#include "nsISSLSocketControl.h"
#include "nsIPipe.h"
#include "nsIProgrammingLanguage.h"
#if defined(XP_WIN)
#include "nsNativeConnectionHelper.h"
@ -1572,10 +1573,15 @@ nsSocketTransport::OnSocketDetached(PRFileDesc *fd)
//-----------------------------------------------------------------------------
// xpcom api
NS_IMPL_THREADSAFE_ISUPPORTS3(nsSocketTransport,
NS_IMPL_THREADSAFE_ISUPPORTS4(nsSocketTransport,
nsISocketTransport,
nsITransport,
nsIDNSListener)
nsIDNSListener,
nsIClassInfo)
NS_IMPL_CI_INTERFACE_GETTER3(nsSocketTransport,
nsISocketTransport,
nsITransport,
nsIDNSListener)
NS_IMETHODIMP
nsSocketTransport::OpenInputStream(PRUint32 flags,
@ -1849,6 +1855,61 @@ nsSocketTransport::OnLookupComplete(nsICancelable *request,
return NS_OK;
}
NS_IMETHODIMP
nsSocketTransport::GetInterfaces(PRUint32 *count, nsIID * **array)
{
return NS_CI_INTERFACE_GETTER_NAME(nsSocketTransport)(count, array);
}
NS_IMETHODIMP
nsSocketTransport::GetHelperForLanguage(PRUint32 language, nsISupports **_retval)
{
*_retval = nsnull;
return NS_OK;
}
NS_IMETHODIMP
nsSocketTransport::GetContractID(char * *aContractID)
{
*aContractID = nsnull;
return NS_OK;
}
NS_IMETHODIMP
nsSocketTransport::GetClassDescription(char * *aClassDescription)
{
*aClassDescription = nsnull;
return NS_OK;
}
NS_IMETHODIMP
nsSocketTransport::GetClassID(nsCID * *aClassID)
{
*aClassID = nsnull;
return NS_OK;
}
NS_IMETHODIMP
nsSocketTransport::GetImplementationLanguage(PRUint32 *aImplementationLanguage)
{
*aImplementationLanguage = nsIProgrammingLanguage::CPLUSPLUS;
return NS_OK;
}
NS_IMETHODIMP
nsSocketTransport::GetFlags(PRUint32 *aFlags)
{
*aFlags = nsIClassInfo::THREADSAFE;
return NS_OK;
}
NS_IMETHODIMP
nsSocketTransport::GetClassIDNoAlloc(nsCID *aClassIDNoAlloc)
{
return NS_ERROR_NOT_AVAILABLE;
}
#ifdef ENABLE_SOCKET_TRACING
#include <stdio.h>

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

@ -54,6 +54,7 @@
#include "nsIDNSListener.h"
#include "nsIDNSRecord.h"
#include "nsICancelable.h"
#include "nsIClassInfo.h"
class nsSocketTransport;
@ -131,12 +132,14 @@ private:
class nsSocketTransport : public nsASocketHandler
, public nsISocketTransport
, public nsIDNSListener
, public nsIClassInfo
{
public:
NS_DECL_ISUPPORTS
NS_DECL_NSITRANSPORT
NS_DECL_NSISOCKETTRANSPORT
NS_DECL_NSIDNSLISTENER
NS_DECL_NSICLASSINFO
nsSocketTransport();