nr_socket_proxy_config.cpp (1059B)
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ 2 /* vim: set sw=2 ts=8 et tw=80 ft=cpp : */ 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 file, 5 * You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 #include "nr_socket_proxy_config.h" 8 9 #include "mozilla/net/WebrtcProxyConfig.h" 10 11 namespace mozilla { 12 13 class NrSocketProxyConfig::Private { 14 public: 15 net::WebrtcProxyConfig mProxyConfig; 16 }; 17 18 NrSocketProxyConfig::NrSocketProxyConfig( 19 const net::WebrtcProxyConfig& aProxyConfig) 20 : mPrivate(new Private({aProxyConfig})) {} 21 22 NrSocketProxyConfig::NrSocketProxyConfig(NrSocketProxyConfig&& aOrig) 23 : mPrivate(std::move(aOrig.mPrivate)) {} 24 25 NrSocketProxyConfig::~NrSocketProxyConfig() = default; 26 27 const net::WebrtcProxyConfig& NrSocketProxyConfig::GetConfig() const { 28 return mPrivate->mProxyConfig; 29 } 30 31 bool NrSocketProxyConfig::GetForceProxy() const { 32 return mPrivate->mProxyConfig.forceProxy(); 33 } 34 } // namespace mozilla