34 std::vector< std::shared_ptr< platform::platform_device_info > >
36 const std::vector< std::shared_ptr< platform::platform_device_info > > & second )
38 std::vector< std::shared_ptr< platform::platform_device_info > > results;
42 [&]( std::shared_ptr< platform::platform_device_info >
const &
data )
47 [&]( std::shared_ptr< platform::platform_device_info > const & new_dev )
49 return data->get_group().is_contained_in( new_dev->get_group() );
53 results.push_back(
data );
66 std::shared_ptr< platform::backend >
const _backend;
74 std::shared_ptr< platform::backend >
get()
const {
return _backend; }
91 std::shared_ptr< backend_singleton >
const _backend;
98 , _device_watcher( _backend->
get()->create_device_watcher() )
100 assert( _device_watcher->is_stopped() );
101 _device_watcher->start(
103 { _callbacks.
raise( old, curr ); } );
111 std::shared_ptr< platform::backend >
const get_backend()
const {
return _backend->get(); }
118 std::shared_ptr< platform::backend > backend_device::get_backend()
123 throw std::runtime_error(
"backend not created yet!" );
125 return singleton->get();
129 backend_device_factory::backend_device_factory( std::shared_ptr< context >
const &
ctx,
callback &&
cb )
132 , _dtor( _device_watcher->subscribe(
134 platform::backend_device_group const & old, platform::backend_device_group const & curr )
137 auto live_ctx = liveliness.lock();
183 backend->query_usb_devices(),
184 backend->query_hid_devices() );
190 std::vector< std::shared_ptr< platform::platform_device_info > >
194 std::vector< std::shared_ptr< platform::platform_device_info > > list;
201 std::copy( std::begin( d400_devices ),
end( d400_devices ), std::back_inserter( list ) );
207 std::copy( begin( d500_devices ),
end( d500_devices ), std::back_inserter( list ) );
212 auto recovery_devices
214 std::copy( begin( recovery_devices ),
end( recovery_devices ), std::back_inserter( list ) );
221 std::copy( begin( uvc_devices ),
end( uvc_devices ), std::back_inserter( list ) );