1# Copyright 2014 The Chromium Authors. All rights reserved.
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5
6class Device(object):
7  """ A base class of devices.
8  A device instance contains all the necessary information for constructing
9  a platform backend object for remote platforms.
10
11  Attributes:
12    name: A device name string in human-understandable term.
13    guid: A unique id of the device. Subclass of device must specify this
14      id properly so that device objects to a same actual device must have same
15      guid.
16    """
17
18  def __init__(self, name, guid):
19    self._name = name
20    self._guid = guid
21
22  @property
23  def name(self):
24    return self._name
25
26  @property
27  def guid(self):
28    return self._guid
29
30  @classmethod
31  def GetAllConnectedDevices(cls):
32    raise NotImplementedError()
33