зеркало из https://github.com/mozilla/gecko-dev.git
Bug 288011 eliminate nsISSLSocketProvider
r=darin sr=bz
This commit is contained in:
Родитель
7f22407c14
Коммит
504bf13768
|
@ -45,8 +45,9 @@
|
|||
|
||||
#include "nsCOMPtr.h"
|
||||
#include "nsIServiceManager.h"
|
||||
#include "nsISSLSocketProvider.h"
|
||||
#include "nsIInterfaceRequestor.h"
|
||||
#include "nsNetCID.h"
|
||||
#include "nsISocketProvider.h"
|
||||
#include "nsISSLSocketControl.h"
|
||||
#include "nsMemory.h"
|
||||
#include "nsLDAPInternal.h"
|
||||
|
@ -131,7 +132,7 @@ nsLDAPSSLConnect(const char *hostlist, int defport, int timeout,
|
|||
nsLDAPSSLSessionClosure *sessionClosure;
|
||||
int intfd = -1;
|
||||
nsCOMPtr <nsISupports> securityInfo;
|
||||
nsCOMPtr <nsISSLSocketProvider> tlsSocketProvider;
|
||||
nsCOMPtr <nsISocketProvider> tlsSocketProvider;
|
||||
nsCOMPtr <nsISSLSocketControl> sslSocketControl;
|
||||
nsresult rv;
|
||||
|
||||
|
|
|
@ -685,6 +685,16 @@
|
|||
{ 0xa2, 0x8a, 0x5b, 0xa2, 0x44, 0x7f, 0xba, 0xce } \
|
||||
}
|
||||
|
||||
#define NS_SSLSOCKETPROVIDER_CONTRACTID \
|
||||
NS_NETWORK_SOCKET_CONTRACTID_PREFIX "ssl"
|
||||
|
||||
/* This code produces a normal socket which can be used to initiate the
|
||||
* STARTTLS protocol by calling its nsISSLSocketControl->StartTLS()
|
||||
*/
|
||||
#define NS_STARTTLSSOCKETPROVIDER_CONTRACTID \
|
||||
NS_NETWORK_SOCKET_CONTRACTID_PREFIX "starttls"
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
* netwerk/cookie classes
|
||||
*/
|
||||
|
|
|
@ -63,7 +63,6 @@ XPIDLSRCS = \
|
|||
nsISocketProviderService.idl \
|
||||
nsISOCKSSocketInfo.idl \
|
||||
nsITransportSecurityInfo.idl \
|
||||
nsISSLSocketProvider.idl \
|
||||
nsISSLSocketControl.idl \
|
||||
$(NULL)
|
||||
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
||||
*
|
||||
* ***** BEGIN LICENSE BLOCK *****
|
||||
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
||||
*
|
||||
* The contents of this file are subject to the Mozilla Public License Version
|
||||
* 1.1 (the "License"); you may not use this file except in compliance with
|
||||
* the License. You may obtain a copy of the License at
|
||||
* http://www.mozilla.org/MPL/
|
||||
*
|
||||
* Software distributed under the License is distributed on an "AS IS" basis,
|
||||
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
||||
* for the specific language governing rights and limitations under the
|
||||
* License.
|
||||
*
|
||||
* The Original Code is mozilla.org code.
|
||||
*
|
||||
* The Initial Developer of the Original Code is
|
||||
* Netscape Communications Corporation.
|
||||
* Portions created by the Initial Developer are Copyright (C) 1998
|
||||
* the Initial Developer. All Rights Reserved.
|
||||
*
|
||||
* Contributor(s):
|
||||
* Hubbie Shaw
|
||||
* Doug Turner <dougt@netscape.com>
|
||||
*
|
||||
* Alternatively, the contents of this file may be used under the terms of
|
||||
* either the GNU General Public License Version 2 or later (the "GPL"), or
|
||||
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
||||
* in which case the provisions of the GPL or the LGPL are applicable instead
|
||||
* of those above. If you wish to allow use of your version of this file only
|
||||
* under the terms of either the GPL or the LGPL, and not to allow others to
|
||||
* use your version of this file under the terms of the MPL, indicate your
|
||||
* decision by deleting the provisions above and replace them with the notice
|
||||
* and other provisions required by the GPL or the LGPL. If you do not delete
|
||||
* the provisions above, a recipient may use your version of this file under
|
||||
* the terms of any one of the MPL, the GPL or the LGPL.
|
||||
*
|
||||
* ***** END LICENSE BLOCK ***** */
|
||||
|
||||
#include "nsISocketProvider.idl"
|
||||
|
||||
[noscript, uuid(856a93d0-5415-11d3-bbc8-0000861d1237)]
|
||||
interface nsISSLSocketProvider : nsISocketProvider {
|
||||
};
|
||||
|
||||
%{C++
|
||||
#define NS_ISSLSOCKETPROVIDER_CONTRACTID NS_NETWORK_SOCKET_CONTRACTID_PREFIX "ssl"
|
||||
#define NS_ISSLSOCKETPROVIDER_CLASSNAME "Mozilla SSL Socket Provider Component"
|
||||
|
||||
/* This code produces a normal socket which can be used to initiate the STARTTLS protocol
|
||||
* by calling its nsISSLSocketControl->StartTLS()
|
||||
*/
|
||||
#define NS_STARTTLSSOCKETPROVIDER_CONTRACTID NS_NETWORK_SOCKET_CONTRACTID_PREFIX "starttls"
|
||||
#define NS_STARTTLSSOCKETPROVIDER_CLASSNAME "Mozilla STARTTLS Capable Socket Provider Component"
|
||||
|
||||
%}
|
|
@ -245,9 +245,9 @@ static const nsModuleComponentInfo components[] =
|
|||
},
|
||||
|
||||
{
|
||||
NS_ISSLSOCKETPROVIDER_CLASSNAME,
|
||||
NS_SSLSOCKETPROVIDER_CLASSNAME,
|
||||
NS_SSLSOCKETPROVIDER_CID,
|
||||
NS_ISSLSOCKETPROVIDER_CONTRACTID,
|
||||
NS_SSLSOCKETPROVIDER_CONTRACTID,
|
||||
nsSSLSocketProviderConstructor
|
||||
},
|
||||
|
||||
|
|
|
@ -49,8 +49,7 @@ nsSSLSocketProvider::~nsSSLSocketProvider()
|
|||
{
|
||||
}
|
||||
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS2(nsSSLSocketProvider, nsISocketProvider,
|
||||
nsISSLSocketProvider)
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS1(nsSSLSocketProvider, nsISocketProvider)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsSSLSocketProvider::NewSocket(PRInt32 family,
|
||||
|
|
|
@ -40,19 +40,19 @@
|
|||
#ifndef _NSSSLSOCKETPROVIDER_H_
|
||||
#define _NSSSLSOCKETPROVIDER_H_
|
||||
|
||||
#include "nsISSLSocketProvider.h"
|
||||
#include "nsISocketProvider.h"
|
||||
|
||||
#define NS_SSLSOCKETPROVIDER_CLASSNAME "Mozilla SSL Socket Provider Component"
|
||||
/* 217d014a-1dd2-11b2-999c-b0c4df79b324 */
|
||||
#define NS_SSLSOCKETPROVIDER_CID \
|
||||
{ 0x217d014a, 0x1dd2, 0x11b2, {0x99, 0x9c, 0xb0, 0xc4, 0xdf, 0x79, 0xb3, 0x24}}
|
||||
|
||||
|
||||
class nsSSLSocketProvider : public nsISSLSocketProvider
|
||||
class nsSSLSocketProvider : public nsISocketProvider
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSISOCKETPROVIDER
|
||||
NS_DECL_NSISSLSOCKETPROVIDER
|
||||
|
||||
// nsSSLSocketProvider methods:
|
||||
nsSSLSocketProvider();
|
||||
|
|
|
@ -49,8 +49,7 @@ nsTLSSocketProvider::~nsTLSSocketProvider()
|
|||
{
|
||||
}
|
||||
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS2(nsTLSSocketProvider, nsISocketProvider,
|
||||
nsISSLSocketProvider)
|
||||
NS_IMPL_THREADSAFE_ISUPPORTS1(nsTLSSocketProvider, nsISocketProvider)
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsTLSSocketProvider::NewSocket(PRInt32 family,
|
||||
|
|
|
@ -40,9 +40,10 @@
|
|||
#ifndef _NSTLSSOCKETPROVIDER_H_
|
||||
#define _NSTLSSOCKETPROVIDER_H_
|
||||
|
||||
#include "nsISSLSocketProvider.h"
|
||||
#include "nsISocketProvider.h"
|
||||
|
||||
|
||||
#define NS_STARTTLSSOCKETPROVIDER_CLASSNAME "Mozilla STARTTLS Capable Socket Provider Component"
|
||||
#define NS_STARTTLSSOCKETPROVIDER_CID \
|
||||
{ /* b9507aec-1dd1-11b2-8cd5-c48ee0c50307 */ \
|
||||
0xb9507aec, \
|
||||
|
@ -51,13 +52,12 @@
|
|||
{0x8c, 0xd5, 0xc4, 0x8e, 0xe0, 0xc5, 0x03, 0x07} \
|
||||
}
|
||||
|
||||
class nsTLSSocketProvider : public nsISSLSocketProvider
|
||||
class nsTLSSocketProvider : public nsISocketProvider
|
||||
{
|
||||
public:
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSISOCKETPROVIDER
|
||||
NS_DECL_NSISSLSOCKETPROVIDER
|
||||
|
||||
|
||||
// nsTLSSocketProvider methods:
|
||||
nsTLSSocketProvider();
|
||||
virtual ~nsTLSSocketProvider();
|
||||
|
|
Загрузка…
Ссылка в новой задаче