Coverage Report

Created: 2018-09-25 14:53

/src/mozilla-central/netwerk/socket/nsSOCKSSocketProvider.h
Line
Count
Source (jump to first uncovered line)
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/. */
6
7
#ifndef nsSOCKSSocketProvider_h__
8
#define nsSOCKSSocketProvider_h__
9
10
#include "nsISocketProvider.h"
11
12
// values for ctor's |version| argument
13
enum {
14
    NS_SOCKS_VERSION_4 = 4,
15
    NS_SOCKS_VERSION_5 = 5
16
};
17
18
class nsSOCKSSocketProvider : public nsISocketProvider
19
{
20
public:
21
    NS_DECL_THREADSAFE_ISUPPORTS
22
    NS_DECL_NSISOCKETPROVIDER
23
24
0
    explicit nsSOCKSSocketProvider(uint32_t version) : mVersion(version) {}
25
26
    static nsresult CreateV4(nsISupports *, REFNSIID aIID, void **aResult);
27
    static nsresult CreateV5(nsISupports *, REFNSIID aIID, void **aResult);
28
29
private:
30
0
    virtual ~nsSOCKSSocketProvider() = default;
31
32
    uint32_t mVersion; // NS_SOCKS_VERSION_4 or 5
33
};
34
35
#endif /* nsSOCKSSocketProvider_h__ */