diff options
Diffstat (limited to 'src/lib/upnp/Discovery.hxx')
-rw-r--r-- | src/lib/upnp/Discovery.hxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/upnp/Discovery.hxx b/src/lib/upnp/Discovery.hxx index 4c64fe420..3208f8727 100644 --- a/src/lib/upnp/Discovery.hxx +++ b/src/lib/upnp/Discovery.hxx @@ -34,6 +34,12 @@ class LibUPnP; class ContentDirectoryService; +class UPnPDiscoveryListener { +public: + virtual void FoundUPnP(const ContentDirectoryService &service) = 0; + virtual void LostUPnP(const ContentDirectoryService &service) = 0; +}; + /** * Manage UPnP discovery and maintain a directory of active devices. Singleton. * @@ -86,6 +92,7 @@ class UPnPDeviceDirectory { }; LibUPnP *const lib; + UPnPDiscoveryListener *const listener; Mutex mutex; std::list<ContentDirectoryDescriptor> directories; @@ -104,7 +111,8 @@ class UPnPDeviceDirectory { unsigned m_lastSearch; public: - UPnPDeviceDirectory(LibUPnP *_lib); + UPnPDeviceDirectory(LibUPnP *_lib, + UPnPDiscoveryListener *_listener=nullptr); ~UPnPDeviceDirectory(); UPnPDeviceDirectory(const UPnPDeviceDirectory &) = delete; |