media/mtransport/nr_socket_proxy_config.cpp
author John Lin <jolin@mozilla.com>
Fri, 07 Dec 2018 14:44:34 +0000
changeset 508826 8442297c6818db346c8252914f7d69fd68094f10
parent 508163 6f3709b3878117466168c40affa7bca0b60cf75b
child 533379 7ed63d730876b816eb7b91419763208951663a36
permissions -rw-r--r--
Bug 1495053 - p3: implement MediaDrmCDMProxy::SetServerCertificate(). r=cpearce Differential Revision: https://phabricator.services.mozilla.com/D7792

/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* vim: set sw=2 ts=8 et tw=80 ft=cpp : */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this file,
 * You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nr_socket_proxy_config.h"

#include "mozilla/dom/PBrowserOrId.h"

namespace mozilla {

class NrSocketProxyConfig::Private {
 public:
  dom::PBrowserOrId mBrowser;
  nsCString mAlpn;
};

NrSocketProxyConfig::NrSocketProxyConfig(const dom::PBrowserOrId& aBrowser,
                                         const nsCString& aAlpn)
    : mPrivate(new Private({aBrowser, aAlpn})) {}

NrSocketProxyConfig::NrSocketProxyConfig(NrSocketProxyConfig&& aOrig)
    : mPrivate(std::move(aOrig.mPrivate)) {}

NrSocketProxyConfig::~NrSocketProxyConfig() {}

const dom::PBrowserOrId& NrSocketProxyConfig::GetBrowser() const {
  return mPrivate->mBrowser;
}

const nsCString& NrSocketProxyConfig::GetAlpn() const {
  return mPrivate->mAlpn;
}

}  // namespace mozilla