device-winusb.h
Go to the documentation of this file.
1 // License: Apache 2.0. See LICENSE file in root directory.
2 // Copyright(c) 2015 Intel Corporation. All Rights Reserved.
3 
4 #pragma once
5 
6 #include "usb/usb-types.h"
7 #include "usb/usb-device.h"
8 
9 #include "device-winusb.h"
10 #include "win/win-helpers.h"
11 #include "messenger-winusb.h"
12 
13 #include <winusb.h>
14 #include <atlstr.h>
15 #include <Windows.h>
16 #include <Sddl.h>
17 #include <string>
18 #include <regex>
19 #include <sstream>
20 #include <mutex>
21 
22 #include <SetupAPI.h>
23 #include <string>
24 
25 namespace librealsense
26 {
27  namespace platform
28  {
29  class usb_device_winusb : public usb_device, public std::enable_shared_from_this<usb_device_winusb>
30  {
31  public:
32  usb_device_winusb(const usb_device_info& info, std::vector<std::wstring> devices_path);
33  virtual ~usb_device_winusb() {}
34 
35  virtual const usb_device_info get_info() const override { return _info; }
36  virtual const std::vector<rs_usb_interface> get_interfaces() const override { return _interfaces; }
37  virtual const rs_usb_interface get_interface(uint8_t interface_number) const override;
38  virtual const rs_usb_messenger open(uint8_t interface_number) override;
39  virtual const std::vector<usb_descriptor> get_descriptors() const override { return _descriptors; }
40 
41  private:
43  std::vector<rs_usb_interface> _interfaces;
44  std::vector<usb_descriptor> _descriptors;
45 
46  void parse_descriptor(WINUSB_INTERFACE_HANDLE handle);
47  std::vector<std::shared_ptr<usb_interface>> query_device_interfaces(const std::wstring& path);
48  };
49  }
50 }
std::shared_ptr< usb_interface > rs_usb_interface
Definition: usb-interface.h:31
GLuint64 GLenum void * handle
Definition: glext.h:7785
GLsizei const GLchar *const * path
Definition: glext.h:4276
virtual const usb_device_info get_info() const override
Definition: device-winusb.h:35
unsigned char uint8_t
Definition: stdint.h:78
std::vector< rs_usb_interface > _interfaces
Definition: device-winusb.h:43
void parse_descriptor(WINUSB_INTERFACE_HANDLE handle)
virtual const rs_usb_messenger open(uint8_t interface_number) override
def info(name, value, persistent=False)
Definition: test.py:301
std::vector< usb_descriptor > _descriptors
Definition: device-winusb.h:44
std::shared_ptr< usb_messenger > rs_usb_messenger
Definition: usb-messenger.h:26
virtual const std::vector< usb_descriptor > get_descriptors() const override
Definition: device-winusb.h:39
virtual const rs_usb_interface get_interface(uint8_t interface_number) const override
virtual const std::vector< rs_usb_interface > get_interfaces() const override
Definition: device-winusb.h:36
usb_device_winusb(const usb_device_info &info, std::vector< std::wstring > devices_path)
std::vector< std::shared_ptr< usb_interface > > query_device_interfaces(const std::wstring &path)


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