зеркало из https://github.com/mozilla/gecko-dev.git
Bug 364847 Give nsISocketTransport classinfo and a THREADSAFE flag
r+sr=darin
This commit is contained in:
Родитель
de398fc100
Коммит
7499f5da48
|
@ -67,6 +67,7 @@
|
||||||
#include "nsISocketProvider.h"
|
#include "nsISocketProvider.h"
|
||||||
#include "nsISSLSocketControl.h"
|
#include "nsISSLSocketControl.h"
|
||||||
#include "nsIPipe.h"
|
#include "nsIPipe.h"
|
||||||
|
#include "nsIProgrammingLanguage.h"
|
||||||
|
|
||||||
#if defined(XP_WIN)
|
#if defined(XP_WIN)
|
||||||
#include "nsNativeConnectionHelper.h"
|
#include "nsNativeConnectionHelper.h"
|
||||||
|
@ -1572,10 +1573,15 @@ nsSocketTransport::OnSocketDetached(PRFileDesc *fd)
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// xpcom api
|
// xpcom api
|
||||||
|
|
||||||
NS_IMPL_THREADSAFE_ISUPPORTS3(nsSocketTransport,
|
NS_IMPL_THREADSAFE_ISUPPORTS4(nsSocketTransport,
|
||||||
nsISocketTransport,
|
nsISocketTransport,
|
||||||
nsITransport,
|
nsITransport,
|
||||||
nsIDNSListener)
|
nsIDNSListener,
|
||||||
|
nsIClassInfo)
|
||||||
|
NS_IMPL_CI_INTERFACE_GETTER3(nsSocketTransport,
|
||||||
|
nsISocketTransport,
|
||||||
|
nsITransport,
|
||||||
|
nsIDNSListener)
|
||||||
|
|
||||||
NS_IMETHODIMP
|
NS_IMETHODIMP
|
||||||
nsSocketTransport::OpenInputStream(PRUint32 flags,
|
nsSocketTransport::OpenInputStream(PRUint32 flags,
|
||||||
|
@ -1849,6 +1855,61 @@ nsSocketTransport::OnLookupComplete(nsICancelable *request,
|
||||||
return NS_OK;
|
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
|
#ifdef ENABLE_SOCKET_TRACING
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
@ -54,6 +54,7 @@
|
||||||
#include "nsIDNSListener.h"
|
#include "nsIDNSListener.h"
|
||||||
#include "nsIDNSRecord.h"
|
#include "nsIDNSRecord.h"
|
||||||
#include "nsICancelable.h"
|
#include "nsICancelable.h"
|
||||||
|
#include "nsIClassInfo.h"
|
||||||
|
|
||||||
class nsSocketTransport;
|
class nsSocketTransport;
|
||||||
|
|
||||||
|
@ -131,12 +132,14 @@ private:
|
||||||
class nsSocketTransport : public nsASocketHandler
|
class nsSocketTransport : public nsASocketHandler
|
||||||
, public nsISocketTransport
|
, public nsISocketTransport
|
||||||
, public nsIDNSListener
|
, public nsIDNSListener
|
||||||
|
, public nsIClassInfo
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
NS_DECL_ISUPPORTS
|
NS_DECL_ISUPPORTS
|
||||||
NS_DECL_NSITRANSPORT
|
NS_DECL_NSITRANSPORT
|
||||||
NS_DECL_NSISOCKETTRANSPORT
|
NS_DECL_NSISOCKETTRANSPORT
|
||||||
NS_DECL_NSIDNSLISTENER
|
NS_DECL_NSIDNSLISTENER
|
||||||
|
NS_DECL_NSICLASSINFO
|
||||||
|
|
||||||
nsSocketTransport();
|
nsSocketTransport();
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче