From a35c7bc81aec11e9720462d8258a0d3c41e2fac7 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 16 Jan 2014 09:06:01 +0100 Subject: db/upnp: move the LibUPnP instance to class UpnpDatabase Delete the object when closing the database. --- src/db/upnp/Discovery.hxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/db/upnp/Discovery.hxx') diff --git a/src/db/upnp/Discovery.hxx b/src/db/upnp/Discovery.hxx index ddc7d2909..412307fd7 100644 --- a/src/db/upnp/Discovery.hxx +++ b/src/db/upnp/Discovery.hxx @@ -26,6 +26,7 @@ #include +class LibUPnP; class ContentDirectoryService; /** @@ -35,6 +36,8 @@ class ContentDirectoryService; * for now, but this could be made more general, by removing the filtering. */ class UPnPDeviceDirectory { + LibUPnP *const lib; + Error error; /** @@ -47,7 +50,7 @@ class UPnPDeviceDirectory { time_t m_lastSearch; public: - UPnPDeviceDirectory(); + UPnPDeviceDirectory(LibUPnP *_lib); UPnPDeviceDirectory(const UPnPDeviceDirectory &) = delete; UPnPDeviceDirectory& operator=(const UPnPDeviceDirectory &) = delete; -- cgit v1.2.3