Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2093)

Unified Diff: device/usb/usb_interface.h

Issue 562763002: Convert device::UsbConfigDescriptor and friends to structs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add interface and endpoint descriptor iterator typedefs. Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « device/usb/usb_device_impl.cc ('k') | device/usb/usb_interface_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: device/usb/usb_interface.h
diff --git a/device/usb/usb_interface.h b/device/usb/usb_interface.h
deleted file mode 100644
index 928571803ddc66858070e9dd93355c5ab9ef204f..0000000000000000000000000000000000000000
--- a/device/usb/usb_interface.h
+++ /dev/null
@@ -1,112 +0,0 @@
-// Copyright 2014 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 DEVICE_USB_USB_INTERFACE_H_
-#define DEVICE_USB_USB_INTERFACE_H_
-
-#include "base/memory/ref_counted.h"
-
-namespace device {
-
-enum UsbTransferType {
- USB_TRANSFER_CONTROL = 0,
- USB_TRANSFER_ISOCHRONOUS,
- USB_TRANSFER_BULK,
- USB_TRANSFER_INTERRUPT,
-};
-
-enum UsbEndpointDirection {
- USB_DIRECTION_INBOUND = 0,
- USB_DIRECTION_OUTBOUND,
-};
-
-enum UsbSynchronizationType {
- USB_SYNCHRONIZATION_NONE = 0,
- USB_SYNCHRONIZATION_ASYNCHRONOUS,
- USB_SYNCHRONIZATION_ADAPTIVE,
- USB_SYNCHRONIZATION_SYNCHRONOUS,
-};
-
-enum UsbUsageType {
- USB_USAGE_DATA = 0,
- USB_USAGE_FEEDBACK,
- USB_USAGE_EXPLICIT_FEEDBACK
-};
-
-class UsbEndpointDescriptor
- : public base::RefCounted<const UsbEndpointDescriptor> {
- public:
- virtual int GetAddress() const = 0;
- virtual UsbEndpointDirection GetDirection() const = 0;
- virtual int GetMaximumPacketSize() const = 0;
- virtual UsbSynchronizationType GetSynchronizationType() const = 0;
- virtual UsbTransferType GetTransferType() const = 0;
- virtual UsbUsageType GetUsageType() const = 0;
- virtual int GetPollingInterval() const = 0;
-
- protected:
- friend class base::RefCounted<const UsbEndpointDescriptor>;
-
- UsbEndpointDescriptor() {};
- virtual ~UsbEndpointDescriptor() {};
-
- DISALLOW_COPY_AND_ASSIGN(UsbEndpointDescriptor);
-};
-
-class UsbInterfaceAltSettingDescriptor
- : public base::RefCounted<const UsbInterfaceAltSettingDescriptor> {
- public:
- virtual size_t GetNumEndpoints() const = 0;
- virtual scoped_refptr<const UsbEndpointDescriptor> GetEndpoint(
- size_t index) const = 0;
-
- virtual int GetInterfaceNumber() const = 0;
- virtual int GetAlternateSetting() const = 0;
- virtual int GetInterfaceClass() const = 0;
- virtual int GetInterfaceSubclass() const = 0;
- virtual int GetInterfaceProtocol() const = 0;
-
- protected:
- friend class base::RefCounted<const UsbInterfaceAltSettingDescriptor>;
-
- UsbInterfaceAltSettingDescriptor() {};
- virtual ~UsbInterfaceAltSettingDescriptor() {};
-
- DISALLOW_COPY_AND_ASSIGN(UsbInterfaceAltSettingDescriptor);
-};
-
-class UsbInterfaceDescriptor
- : public base::RefCounted<const UsbInterfaceDescriptor> {
- public:
- virtual size_t GetNumAltSettings() const = 0;
- virtual scoped_refptr<const UsbInterfaceAltSettingDescriptor> GetAltSetting(
- size_t index) const = 0;
-
- protected:
- friend class base::RefCounted<const UsbInterfaceDescriptor>;
-
- UsbInterfaceDescriptor() {};
- virtual ~UsbInterfaceDescriptor() {};
-
- DISALLOW_COPY_AND_ASSIGN(UsbInterfaceDescriptor);
-};
-
-class UsbConfigDescriptor : public base::RefCounted<UsbConfigDescriptor> {
- public:
- virtual size_t GetNumInterfaces() const = 0;
- virtual scoped_refptr<const UsbInterfaceDescriptor> GetInterface(
- size_t index) const = 0;
-
- protected:
- friend class base::RefCounted<UsbConfigDescriptor>;
-
- UsbConfigDescriptor() {};
- virtual ~UsbConfigDescriptor() {};
-
- DISALLOW_COPY_AND_ASSIGN(UsbConfigDescriptor);
-};
-
-} // namespace device
-
-#endif // DEVICE_USB_USB_INTERFACE_H_
« no previous file with comments | « device/usb/usb_device_impl.cc ('k') | device/usb/usb_interface_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698