diff --git a/netwerk/base/src/nsSocketTransport2.cpp b/netwerk/base/src/nsSocketTransport2.cpp index 62cb623f35a..0bd9941289f 100644 --- a/netwerk/base/src/nsSocketTransport2.cpp +++ b/netwerk/base/src/nsSocketTransport2.cpp @@ -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 diff --git a/netwerk/base/src/nsSocketTransport2.h b/netwerk/base/src/nsSocketTransport2.h index 0531a13e9ca..de4133ff467 100644 --- a/netwerk/base/src/nsSocketTransport2.h +++ b/netwerk/base/src/nsSocketTransport2.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();