1c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org// libjingle
2c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org// Copyright 2014 Google Inc.
3c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org//
4c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org// Redistribution and use in source and binary forms, with or without
5c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org// modification, are permitted provided that the following conditions are met:
6c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org//
7c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org//  1. Redistributions of source code must retain the above copyright notice,
8c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org//     this list of conditions and the following disclaimer.
9c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org//  2. Redistributions in binary form must reproduce the above copyright notice,
10c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org//     this list of conditions and the following disclaimer in the documentation
11c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org//     and/or other materials provided with the distribution.
12c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org//  3. The name of the author may not be used to endorse or promote products
13c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org//     derived from this software without specific prior written permission.
14c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org//
15c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
16c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
17c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
18c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
19c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
21c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
22c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
23c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
24c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org//
26c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org
27c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org#ifndef TALK_MEDIA_BASE_DEVICE_H_
28c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org#define TALK_MEDIA_BASE_DEVICE_H_
29c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org
30c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org#include "webrtc/base/stringencode.h"
31c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org
32c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.orgnamespace cricket {
33c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org
34c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org// Used to represent an audio or video capture or render device.
35c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.orgstruct Device {
36c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org  Device() {}
37c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org  Device(const std::string& name, int id)
38c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org      : name(name),
39c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org        id(rtc::ToString(id)) {
40c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org  }
41c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org  Device(const std::string& name, const std::string& id)
42c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org      : name(name), id(id) {}
43c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org
44c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org  std::string name;
45c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org  std::string id;
46c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org};
47c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org
48c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org}  // namespace cricket
49c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org
50c7416745e9d35902e62517d1bddcd546623e1c34buildbot@webrtc.org#endif  // TALK_MEDIA_BASE_DEVICE_H_
51