summaryrefslogtreecommitdiffstats
path: root/chromeos/dbus/audio_node.h
blob: 68e21092a3e6ebe1933a0e1874baaa7336260adb (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
44
45
46
47
// 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_DBUS_AUDIO_NODE_H_
#define CHROMEOS_DBUS_AUDIO_NODE_H_

#include <stdint.h>

#include <string>
#include <vector>

#include "chromeos/chromeos_export.h"

namespace chromeos {

// Structure to hold AudioNode data received from cras.
struct CHROMEOS_EXPORT AudioNode {
  bool is_input;
  uint64_t id;
  uint64_t stable_device_id;
  std::string device_name;
  std::string type;
  std::string name;
  std::string mic_positions;
  bool active;
  // Time that the node was plugged in.
  uint64_t plugged_time;

  AudioNode();
  AudioNode(bool is_input,
            uint64_t id,
            uint64_t stable_device_id,
            std::string device_name,
            std::string type,
            std::string name,
            bool active,
            uint64_t plugged_time);
  ~AudioNode();
  std::string ToString() const;
};

typedef std::vector<AudioNode> AudioNodeList;

}  // namespace chromeos

#endif  // CHROMEOS_DBUS_AUDIO_NODE_H_