summaryrefslogtreecommitdiffstats
path: root/chromeos/audio/audio_device.h
blob: 891f0302f7718804f75c1aee29b73cc188e9de67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
// Copyright (c) 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROMEOS_AUDIO_AUDIO_DEVICE_H_
#define CHROMEOS_AUDIO_AUDIO_DEVICE_H_

#include <string>
#include <vector>

#include "base/basictypes.h"
#include "base/string16.h"
#include "chromeos/chromeos_export.h"
#include "chromeos/dbus/audio_node.h"

namespace chromeos {

enum AudioDeviceType {
  AUDIO_TYPE_INTERNAL,
  AUDIO_TYPE_HEADPHONE,
  AUDIO_TYPE_USB,
  AUDIO_TYPE_BLUETOOTH,
  AUDIO_TYPE_HDMI,
  AUDIO_TYPE_OTHER,
};

struct CHROMEOS_EXPORT AudioDevice {
  bool is_input;
  uint64 id;
  base::string16 display_name;
  AudioDeviceType type;
  bool active;

  AudioDevice();
  explicit AudioDevice(const AudioNode& node);
  std::string ToString() const;
};

typedef std::vector<AudioDevice> AudioDeviceList;

}  // namespace chromeos

#endif  // CHROMEOS_AUDIO_AUDIO_DEVICE_H_