We must remove dependency on Chromium, i.e. we can't use Chromium's base/logging.h. That means we need to define these macros in WebRTC also when doing Chromium builds. And this causes redefinition. * DISALLOW_ASSIGN -> RTC_DISALLOW_ASSIGN * DISALLOW_COPY_AND_ASSIGN -> RTC_DISALLOW_COPY_AND_ASSIGN * DISALLOW_IMPLICIT_CONSTRUCTORS -> RTC_DISALLOW_IMPLICIT_CONSTRUCTORS Related CL: https://codereview.webrtc.org/1335923002/ BUG=chromium:468375 NOTRY=true Review URL: https://codereview.webrtc.org/1345433002 Cr-Commit-Position: refs/heads/master@{#9953}
55 lines
1.6 KiB
C++
55 lines
1.6 KiB
C++
/*
|
|
* Copyright 2004 The WebRTC Project Authors. All rights reserved.
|
|
*
|
|
* Use of this source code is governed by a BSD-style license
|
|
* that can be found in the LICENSE file in the root of the source
|
|
* tree. An additional intellectual property rights grant can be found
|
|
* in the file PATENTS. All contributing project authors may
|
|
* be found in the AUTHORS file in the root of the source tree.
|
|
*/
|
|
|
|
#ifndef WEBRTC_SOUND_SOUNDDEVICELOCATOR_H_
|
|
#define WEBRTC_SOUND_SOUNDDEVICELOCATOR_H_
|
|
|
|
#include <string>
|
|
|
|
#include "webrtc/base/constructormagic.h"
|
|
|
|
namespace rtc {
|
|
|
|
// A simple container for holding the name of a device and any additional id
|
|
// information needed to locate and open it. Implementations of
|
|
// SoundSystemInterface must subclass this to add any id information that they
|
|
// need.
|
|
class SoundDeviceLocator {
|
|
public:
|
|
virtual ~SoundDeviceLocator() {}
|
|
|
|
// Human-readable name for the device.
|
|
const std::string &name() const { return name_; }
|
|
|
|
// Name sound system uses to locate this device.
|
|
const std::string &device_name() const { return device_name_; }
|
|
|
|
// Makes a duplicate of this locator.
|
|
virtual SoundDeviceLocator *Copy() const = 0;
|
|
|
|
protected:
|
|
SoundDeviceLocator(const std::string &name,
|
|
const std::string &device_name)
|
|
: name_(name), device_name_(device_name) {}
|
|
|
|
explicit SoundDeviceLocator(const SoundDeviceLocator &that)
|
|
: name_(that.name_), device_name_(that.device_name_) {}
|
|
|
|
std::string name_;
|
|
std::string device_name_;
|
|
|
|
private:
|
|
RTC_DISALLOW_ASSIGN(SoundDeviceLocator);
|
|
};
|
|
|
|
} // namespace rtc
|
|
|
|
#endif // WEBRTC_SOUND_SOUNDDEVICELOCATOR_H_
|