request-libusb.h
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2019 Intel Corporation. All Rights Reserved.
3 
4 #pragma once
5 
6 #include "libusb.h"
7 #include "../usb/usb-request.h"
8 #include "../usb/usb-device.h"
9 
10 
11 namespace librealsense
12 {
13  namespace platform
14  {
16  {
17  public:
18  usb_request_libusb(libusb_device_handle *dev_handle, rs_usb_endpoint endpoint);
19  virtual ~usb_request_libusb();
20 
21  virtual int get_actual_length() const override;
22  virtual void* get_native_request() const override;
23 
24  std::shared_ptr<usb_request> get_shared() const;
25  void set_shared(const std::shared_ptr<usb_request>& shared);
26  void set_active(bool state);
27 
28  protected:
29  virtual void set_native_buffer_length(int length) override;
30  virtual int get_native_buffer_length() override;
31  virtual void set_native_buffer(uint8_t* buffer) override;
32  virtual uint8_t* get_native_buffer() const override;
33 
34  private:
35  bool _active = false;
36  std::weak_ptr<usb_request> _shared;
37  std::shared_ptr<libusb_transfer> _transfer;
38  };
39  }
40 }
std::shared_ptr< usb_request > get_shared() const
usb_request_libusb(libusb_device_handle *dev_handle, rs_usb_endpoint endpoint)
unsigned char uint8_t
Definition: stdint.h:78
void set_shared(const std::shared_ptr< usb_request > &shared)
std::weak_ptr< usb_request > _shared
std::shared_ptr< libusb_transfer > _transfer
virtual void * get_native_request() const override
std::shared_ptr< usb_endpoint > rs_usb_endpoint
Definition: usb-endpoint.h:24
virtual int get_actual_length() const override
virtual void set_native_buffer(uint8_t *buffer) override
virtual uint8_t * get_native_buffer() const override
virtual void set_native_buffer_length(int length) override
GLenum GLuint GLenum GLsizei length


librealsense2
Author(s): Sergey Dorodnicov , Doron Hirshberg , Mark Horn , Reagan Lopez , Itay Carpis
autogenerated on Mon May 3 2021 02:47:40