netwerk/socket/nsSOCKSSocketProvider.h

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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__ */

mercurial