Thu, 15 Jan 2015 15:55:04 +0100
Back out 97036ab72558 which inappropriately compared turds to third parties.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsSOCKSSocketProvider_h__
8 #define nsSOCKSSocketProvider_h__
10 #include "nsISocketProvider.h"
12 // values for ctor's |version| argument
13 enum {
14 NS_SOCKS_VERSION_4 = 4,
15 NS_SOCKS_VERSION_5 = 5
16 };
18 class nsSOCKSSocketProvider : public nsISocketProvider
19 {
20 public:
21 NS_DECL_THREADSAFE_ISUPPORTS
22 NS_DECL_NSISOCKETPROVIDER
24 nsSOCKSSocketProvider(uint32_t version) : mVersion(version) {}
25 virtual ~nsSOCKSSocketProvider() {}
27 static nsresult CreateV4(nsISupports *, REFNSIID aIID, void **aResult);
28 static nsresult CreateV5(nsISupports *, REFNSIID aIID, void **aResult);
30 private:
31 uint32_t mVersion; // NS_SOCKS_VERSION_4 or 5
32 };
34 #endif /* nsSOCKSSocketProvider_h__ */