request-usbhost.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 "usbhost.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:
19  virtual ~usb_request_usbhost();
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<::usb_request> _native_request;
38  };
39  }
40 }
void set_shared(const std::shared_ptr< usb_request > &shared)
std::shared_ptr< usb_request > get_shared() const
virtual void set_native_buffer_length(int length) override
std::shared_ptr<::usb_request > _native_request
std::weak_ptr< usb_request > _shared
unsigned char uint8_t
Definition: stdint.h:78
usb_request_usbhost(rs_usb_device device, rs_usb_endpoint endpoint)
virtual void set_native_buffer(uint8_t *buffer) override
virtual int get_actual_length() const override
std::shared_ptr< usb_endpoint > rs_usb_endpoint
Definition: usb-endpoint.h:24
virtual void * get_native_request() const override
GLenum GLuint GLenum GLsizei length
virtual uint8_t * get_native_buffer() const override
std::shared_ptr< usb_device > rs_usb_device
Definition: usb-device.h:29


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