michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef nsSOCKSSocketProvider_h__ michael@0: #define nsSOCKSSocketProvider_h__ michael@0: michael@0: #include "nsISocketProvider.h" michael@0: michael@0: // values for ctor's |version| argument michael@0: enum { michael@0: NS_SOCKS_VERSION_4 = 4, michael@0: NS_SOCKS_VERSION_5 = 5 michael@0: }; michael@0: michael@0: class nsSOCKSSocketProvider : public nsISocketProvider michael@0: { michael@0: public: michael@0: NS_DECL_THREADSAFE_ISUPPORTS michael@0: NS_DECL_NSISOCKETPROVIDER michael@0: michael@0: nsSOCKSSocketProvider(uint32_t version) : mVersion(version) {} michael@0: virtual ~nsSOCKSSocketProvider() {} michael@0: michael@0: static nsresult CreateV4(nsISupports *, REFNSIID aIID, void **aResult); michael@0: static nsresult CreateV5(nsISupports *, REFNSIID aIID, void **aResult); michael@0: michael@0: private: michael@0: uint32_t mVersion; // NS_SOCKS_VERSION_4 or 5 michael@0: }; michael@0: michael@0: #endif /* nsSOCKSSocketProvider_h__ */