1dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine/*
2dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine * Copyright (C) 2006 The Android Open Source Project
3dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine *
4dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine * Licensed under the Apache License, Version 2.0 (the "License");
5dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine * you may not use this file except in compliance with the License.
6dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine * You may obtain a copy of the License at
7dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine *
8dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine *      http://www.apache.org/licenses/LICENSE-2.0
9dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine *
10dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine * Unless required by applicable law or agreed to in writing, software
11dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine * distributed under the License is distributed on an "AS IS" BASIS,
12dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine * See the License for the specific language governing permissions and
14dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine * limitations under the License.
15dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine */
16dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
17dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine#ifndef ANDROID_USB_API_ADB_ENDPOINT_OBJECT_H__
18dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine#define ANDROID_USB_API_ADB_ENDPOINT_OBJECT_H__
19dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine/** \file
208267511c96e3226e45a0be773ee442b66261824dvchtchetkine  This file consists of declaration of class AdbEndpointObject that
218267511c96e3226e45a0be773ee442b66261824dvchtchetkine  encapsulates a handle opened to an endpoint on our device.
22dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine*/
23dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
24dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine#include "adb_interface.h"
25dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
26dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine/** Class AdbEndpointObject encapsulates a handle opened to an endpoint on
27dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  our device.
288267511c96e3226e45a0be773ee442b66261824dvchtchetkine
298267511c96e3226e45a0be773ee442b66261824dvchtchetkine  This class implement functionality that is common for both, WinUsb and
308267511c96e3226e45a0be773ee442b66261824dvchtchetkine  legacy APIs.
31dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine*/
32acc6f826433e639b1ba00c021ab5f9161eb56e59vchtchetkineclass ADBWIN_API_CLASS AdbEndpointObject : public AdbObjectHandle {
33dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine public:
34dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  /** \brief Constructs the object
35dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
36dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @param[in] interface Parent interface for this object. Interface will be
37dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine           referenced in this object's constructur and released in the
38dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine           destructor.
39dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @param[in] endpoint_id Endpoint ID (endpoint address) on the device.
40dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @param[in] endpoint_index Zero-based endpoint index in the interface's
41dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine          array of endpoints.
42dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  */
43dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  AdbEndpointObject(AdbInterfaceObject* parent_interf,
44dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine                    UCHAR endpoint_id,
45dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine                    UCHAR endpoint_index);
46dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
47dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine protected:
48dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  /** \brief Destructs the object.
49dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
50dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    We hide destructor in order to prevent ourseves from accidentaly allocating
51dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    instances on the stack. If such attemp occur, compiler will error.
52dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  */
53dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  virtual ~AdbEndpointObject();
54dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
558267511c96e3226e45a0be773ee442b66261824dvchtchetkine  //
568267511c96e3226e45a0be773ee442b66261824dvchtchetkine  // Abstract
578267511c96e3226e45a0be773ee442b66261824dvchtchetkine  //
588267511c96e3226e45a0be773ee442b66261824dvchtchetkine
598267511c96e3226e45a0be773ee442b66261824dvchtchetkine protected:
608267511c96e3226e45a0be773ee442b66261824dvchtchetkine  /** \brief Common code for async read / write
618267511c96e3226e45a0be773ee442b66261824dvchtchetkine
628267511c96e3226e45a0be773ee442b66261824dvchtchetkine    @param[in] is_read Read or write selector.
638267511c96e3226e45a0be773ee442b66261824dvchtchetkine    @param[in,out] buffer Pointer to the buffer for read / write.
648267511c96e3226e45a0be773ee442b66261824dvchtchetkine    @param[in] bytes_to_transfer Number of bytes to be read / written.
658267511c96e3226e45a0be773ee442b66261824dvchtchetkine    @param[out] bytes_transferred Number of bytes read / written. Can be NULL.
668267511c96e3226e45a0be773ee442b66261824dvchtchetkine    @param[in] event_handle Event handle that should be signaled when async I/O
678267511c96e3226e45a0be773ee442b66261824dvchtchetkine           completes. Can be NULL. If it's not NULL this handle will be used to
688267511c96e3226e45a0be773ee442b66261824dvchtchetkine           initialize OVERLAPPED structure for this I/O.
698267511c96e3226e45a0be773ee442b66261824dvchtchetkine    @param[in] time_out A timeout (in milliseconds) required for this I/O to
708267511c96e3226e45a0be773ee442b66261824dvchtchetkine           complete. Zero value in this parameter means that there is no
718267511c96e3226e45a0be773ee442b66261824dvchtchetkine           timeout set for this I/O.
728267511c96e3226e45a0be773ee442b66261824dvchtchetkine    @return A handle to IO completion object or NULL on failure. If NULL is
738267511c96e3226e45a0be773ee442b66261824dvchtchetkine            returned GetLastError() provides extended error information.
748267511c96e3226e45a0be773ee442b66261824dvchtchetkine  */
758267511c96e3226e45a0be773ee442b66261824dvchtchetkine  virtual ADBAPIHANDLE CommonAsyncReadWrite(bool is_read,
768267511c96e3226e45a0be773ee442b66261824dvchtchetkine                                            void* buffer,
778267511c96e3226e45a0be773ee442b66261824dvchtchetkine                                            ULONG bytes_to_transfer,
788267511c96e3226e45a0be773ee442b66261824dvchtchetkine                                            ULONG* bytes_transferred,
798267511c96e3226e45a0be773ee442b66261824dvchtchetkine                                            HANDLE event_handle,
808267511c96e3226e45a0be773ee442b66261824dvchtchetkine                                            ULONG time_out) = 0;
818267511c96e3226e45a0be773ee442b66261824dvchtchetkine
828267511c96e3226e45a0be773ee442b66261824dvchtchetkine  /** \brief Common code for sync read / write
838267511c96e3226e45a0be773ee442b66261824dvchtchetkine
848267511c96e3226e45a0be773ee442b66261824dvchtchetkine    @param[in] is_read Read or write selector.
858267511c96e3226e45a0be773ee442b66261824dvchtchetkine    @param[in,out] buffer Pointer to the buffer for read / write.
868267511c96e3226e45a0be773ee442b66261824dvchtchetkine    @param[in] bytes_to_transfer Number of bytes to be read / written.
878267511c96e3226e45a0be773ee442b66261824dvchtchetkine    @param[out] bytes_transferred Number of bytes read / written. Can be NULL.
888267511c96e3226e45a0be773ee442b66261824dvchtchetkine    @param[in] time_out A timeout (in milliseconds) required for this I/O to
898267511c96e3226e45a0be773ee442b66261824dvchtchetkine           complete. Zero value in this parameter means that there is no
908267511c96e3226e45a0be773ee442b66261824dvchtchetkine           timeout set for this I/O.
918267511c96e3226e45a0be773ee442b66261824dvchtchetkine    @return true on success, false on failure. If false is returned
928267511c96e3226e45a0be773ee442b66261824dvchtchetkine            GetLastError() provides extended error information.
938267511c96e3226e45a0be773ee442b66261824dvchtchetkine  */
948267511c96e3226e45a0be773ee442b66261824dvchtchetkine  virtual bool CommonSyncReadWrite(bool is_read,
958267511c96e3226e45a0be773ee442b66261824dvchtchetkine                                   void* buffer,
968267511c96e3226e45a0be773ee442b66261824dvchtchetkine                                   ULONG bytes_to_transfer,
978267511c96e3226e45a0be773ee442b66261824dvchtchetkine                                   ULONG* bytes_transferred,
988267511c96e3226e45a0be773ee442b66261824dvchtchetkine                                   ULONG time_out) = 0;
998267511c96e3226e45a0be773ee442b66261824dvchtchetkine
1008267511c96e3226e45a0be773ee442b66261824dvchtchetkine  //
1018267511c96e3226e45a0be773ee442b66261824dvchtchetkine  // Operations
1028267511c96e3226e45a0be773ee442b66261824dvchtchetkine  //
1038267511c96e3226e45a0be773ee442b66261824dvchtchetkine
104dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine public:
105dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  /** \brief Gets information about this endpoint.
106dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
107dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @param[out] info Upon successful completion will have endpoint information.
108dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @return true on success, false on failure. If false is returned
109dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine            GetLastError() provides extended error information.
110dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  */
1118267511c96e3226e45a0be773ee442b66261824dvchtchetkine  virtual bool GetEndpointInformation(AdbEndpointInformation* info);
112dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
113dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  /** \brief Reads from opened I/O object asynchronously
114dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
115dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @param[out] buffer Pointer to the buffer that receives the data.
116dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @param[in] bytes_to_read Number of bytes to be read.
117dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @param[out] bytes_read Number of bytes read. Can be NULL.
118dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @param[in] event_handle Event handle that should be signaled when async I/O
119dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine           completes. Can be NULL. If it's not NULL this handle will be used to
120dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine           initialize OVERLAPPED structure for this I/O.
121dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @param[in] time_out A timeout (in milliseconds) required for this I/O to
122dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine           complete. Zero value in this parameter means that there is no
123dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine           timeout set for this I/O.
124dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @return A handle to IO completion object or NULL on failure. If NULL is
125dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine            returned GetLastError() provides extended error information.
126dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  */
127dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  virtual ADBAPIHANDLE AsyncRead(void* buffer,
128dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine                                 ULONG bytes_to_read,
129dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine                                 ULONG* bytes_read,
130dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine                                 HANDLE event_handle,
131dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine                                 ULONG time_out);
132dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
133dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  /** \brief Writes to opened I/O object asynchronously
134dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
135dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @param[in] buffer Pointer to the buffer containing the data to be written.
136dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @param[in] bytes_to_write Number of bytes to be written.
137dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @param[out] bytes_written Number of bytes written. Can be NULL.
138dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @param[in] event_handle Event handle that should be signaled when async I/O
139dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine           completes. Can be NULL. If it's not NULL this handle will be used to
140dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine           initialize OVERLAPPED structure for this I/O.
141dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @param[in] time_out A timeout (in milliseconds) required for this I/O to
142dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine           complete. Zero value in this parameter means that there is no
143dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine           timeout set for this I/O.
144dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @return A handle to IO completion object or NULL on failure. If NULL is
145dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine            returned GetLastError() provides extended error information.
146dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  */
147dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  virtual ADBAPIHANDLE AsyncWrite(void* buffer,
148dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine                                  ULONG bytes_to_write,
149dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine                                  ULONG* bytes_written,
150dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine                                  HANDLE event_handle,
151dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine                                  ULONG time_out);
152dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
153dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  /** \brief Reads from opened I/O object synchronously
154dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
155dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @param[out] buffer Pointer to the buffer that receives the data.
156dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @param[in] bytes_to_read Number of bytes to be read.
157dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @param[out] bytes_read Number of bytes read. Can be NULL.
158dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @param[in] time_out A timeout (in milliseconds) required for this I/O to
159dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine           complete. Zero value in this parameter means that there is no
160dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine           timeout set for this I/O.
161dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @return true on success and false on failure. If false is
162dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine            returned GetLastError() provides extended error information.
163dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  */
164dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  virtual bool SyncRead(void* buffer,
165dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine                        ULONG bytes_to_read,
166dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine                        ULONG* bytes_read,
167dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine                        ULONG time_out);
168dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
169dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  /** \brief Writes to opened I/O object synchronously
170dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
171dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @param[in] buffer Pointer to the buffer containing the data to be written.
172dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @param[in] bytes_to_write Number of bytes to be written.
173dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @param[out] bytes_written Number of bytes written. Can be NULL.
174dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @param[in] time_out A timeout (in milliseconds) required for this I/O to
175dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine           complete. Zero value in this parameter means that there is no
176dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine           timeout set for this I/O.
177dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    @return true on success and false on failure. If false is
178dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine            returned GetLastError() provides extended error information.
179dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  */
180dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  virtual bool SyncWrite(void* buffer,
181dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine                         ULONG bytes_to_write,
182dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine                         ULONG* bytes_written,
183dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine                         ULONG time_out);
184dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
185dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine public:
186dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  /// This is a helper for extracting object from the AdbObjectHandleMap
187dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  static AdbObjectType Type() {
188dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    return AdbObjectTypeEndpoint;
189dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  }
190dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
191dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  /// Gets parent interface
192dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  AdbInterfaceObject* parent_interface() const {
193dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    return parent_interface_;
194dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  }
195dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  /// Gets this endpoint ID
196dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  UCHAR endpoint_id() const {
197dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    return endpoint_id_;
198dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  }
199dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
200dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  /// Gets this endpoint index on the interface
201dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  UCHAR endpoint_index() const {
202dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    return endpoint_index_;
203dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  }
204dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
205dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  /// Gets parent interface handle
206dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  ADBAPIHANDLE GetParentInterfaceHandle() const {
207dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine    return (NULL != parent_interface()) ? parent_interface()->adb_handle() :
208dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine                                          NULL;
209dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  }
210dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
211dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine protected:
212dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  /// Parent interface
213dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  AdbInterfaceObject* parent_interface_;
214dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
215dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  /// This endpoint id
216dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  UCHAR               endpoint_id_;
217dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
218dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  /// This endpoint index on the interface
219dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine  UCHAR               endpoint_index_;
220dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine};
221dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine
222dceaaa52cec11631c72cfea5fb74ee607602ecdevchtchetkine#endif  // ANDROID_USB_API_ADB_ENDPOINT_OBJECT_H__
223