Bug 1760181 [wpt PR 33182] - Update wpt metadata, a=testonly
[gecko.git] / netwerk / socket / nsSOCKSSocketProvider.h
blob7dc34dae603fa7a12afcb4e1f386f5eb626d97ff
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 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 { NS_SOCKS_VERSION_4 = 4, NS_SOCKS_VERSION_5 = 5 };
15 class nsSOCKSSocketProvider : public nsISocketProvider {
16 public:
17 NS_DECL_THREADSAFE_ISUPPORTS
18 NS_DECL_NSISOCKETPROVIDER
20 explicit nsSOCKSSocketProvider(uint32_t version) : mVersion(version) {}
22 static nsresult CreateV4(nsISupports*, REFNSIID aIID, void** aResult);
23 static nsresult CreateV5(nsISupports*, REFNSIID aIID, void** aResult);
25 private:
26 virtual ~nsSOCKSSocketProvider() = default;
28 uint32_t mVersion; // NS_SOCKS_VERSION_4 or 5
31 #endif /* nsSOCKSSocketProvider_h__ */