blob: c03384e40918624c24a622cff9d43f095c6ce154 [file] [log] [blame]
henrika7e6fcea2018-05-18 10:20:58 +02001/*
2 * Copyright (c) 2018 The WebRTC project authors. All Rights Reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11#ifndef MODULES_AUDIO_DEVICE_AUDIO_DEVICE_NAME_H_
12#define MODULES_AUDIO_DEVICE_AUDIO_DEVICE_NAME_H_
13
14#include <string>
15#include <vector>
16
17namespace webrtc {
18
19struct AudioDeviceName {
20 // Unique ID of the generic default device.
21 static const char kDefaultDeviceId[];
22
23 // Unique ID of the generic default communications device.
24 static const char kDefaultCommunicationsDeviceId[];
25
26 AudioDeviceName() = default;
27 AudioDeviceName(const std::string device_name, const std::string unique_id);
28
29 ~AudioDeviceName() = default;
30
31 // Support copy and move.
32 AudioDeviceName(const AudioDeviceName& other) = default;
33 AudioDeviceName(AudioDeviceName&&) = default;
34 AudioDeviceName& operator=(const AudioDeviceName&) = default;
35 AudioDeviceName& operator=(AudioDeviceName&&) = default;
36
37 bool IsValid();
38
39 std::string device_name; // Friendly name of the device.
40 std::string unique_id; // Unique identifier for the device.
41};
42
43typedef std::vector<AudioDeviceName> AudioDeviceNames;
44
45} // namespace webrtc
46
47#endif // MODULES_AUDIO_DEVICE_AUDIO_DEVICE_NAME_H_