nsSOCKSSocketProvider.h (835B)
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- 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/. */ 6 7 #ifndef nsSOCKSSocketProvider_h__ 8 #define nsSOCKSSocketProvider_h__ 9 10 #include "nsISocketProvider.h" 11 12 // values for ctor's |version| argument 13 enum { NS_SOCKS_VERSION_4 = 4, NS_SOCKS_VERSION_5 = 5 }; 14 15 class nsSOCKSSocketProvider : public nsISocketProvider { 16 public: 17 NS_DECL_THREADSAFE_ISUPPORTS 18 NS_DECL_NSISOCKETPROVIDER 19 20 explicit nsSOCKSSocketProvider(uint32_t version) : mVersion(version) {} 21 22 private: 23 virtual ~nsSOCKSSocketProvider() = default; 24 25 uint32_t mVersion; // NS_SOCKS_VERSION_4 or 5 26 }; 27 28 #endif /* nsSOCKSSocketProvider_h__ */