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 #ifndef nr_socket_proxy_config__ 8 #define nr_socket_proxy_config__ 9 10 #include <memory> 11 12 namespace mozilla { 13 namespace net { 14 class WebrtcProxyConfig; 15 } 16 17 class NrSocketProxyConfig { 18 public: 19 explicit NrSocketProxyConfig(const net::WebrtcProxyConfig& aProxyConfig); 20 21 // We need to actually write the default impl ourselves, because the compiler 22 // needs to know how to destroy mPrivate in case an exception is thrown, even 23 // though we disable exceptions in our build. 24 NrSocketProxyConfig(NrSocketProxyConfig&& aOrig); 25 26 ~NrSocketProxyConfig(); 27 28 const net::WebrtcProxyConfig& GetConfig() const; 29 bool GetForceProxy() const; 30 31 private: 32 // dom::ProxyConfig includes stuff that conflicts with nICEr includes. 33 // Make it possible to include this header file without tripping over this 34 // problem. 35 class Private; 36 std::unique_ptr<Private> mPrivate; 37 }; 38 39 } // namespace mozilla 40 41 #endif // nr_socket_proxy_config__ 42