11#ifndef DEV_TUNNELLED_H
12#define DEV_TUNNELLED_H
14#define DEV_TUNNELLED_H_CVSID "$Id: dev_tunnelled.h 5198 2021-02-01 20:36:02Z chrfranke $"
32 virtual bool is_open()
const override;
34 virtual bool open()
override;
36 virtual bool close()
override;
52template <
class BaseDev,
class TunnelDev>
Base class for all devices.
Common functionality for all tunnelled_device classes.
virtual bool open() override
Open device, return false on error.
virtual bool owns(const smart_device *dev) const override
Return true if other device is owned by this device.
virtual void release(const smart_device *dev) override
Release ownership of other device.
smart_device * m_tunnel_base_dev
virtual ~tunnelled_device_base()
virtual bool is_open() const override
Return true if device is open.
virtual bool close() override
Close device, return false on error.
Implement a device by tunneling through another device.
const tunnel_device_type * get_tunnel_dev() const
tunnelled_device(tunnel_device_type *tunnel_dev)
tunnelled_device(tunnel_device_type *tunnel_dev, unsigned nsid)
virtual void release(const smart_device *dev) override
Release ownership of other device.
TunnelDev tunnel_device_type
tunnel_device_type * get_tunnel_dev()
tunnel_device_type * m_tunnel_dev