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