diff options
author | Max Kellermann <max@duempel.org> | 2014-01-18 13:47:12 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-01-18 14:29:31 +0100 |
commit | 22dd3c8048a408a5c045164c439bb2f94b062fa3 (patch) | |
tree | 9165594ed801ce204c4e80d8f5b955ed9c69db86 /src/db/upnp/Device.hxx | |
parent | 04b7648e004a5f21c615aa36c0801ae0986baf1e (diff) | |
download | mpd-22dd3c8048a408a5c045164c439bb2f94b062fa3.tar.gz mpd-22dd3c8048a408a5c045164c439bb2f94b062fa3.tar.xz mpd-22dd3c8048a408a5c045164c439bb2f94b062fa3.zip |
db/upnp/Device: move code to method Parse()
Forward the Error to the caller.
Diffstat (limited to 'src/db/upnp/Device.hxx')
-rw-r--r-- | src/db/upnp/Device.hxx | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/db/upnp/Device.hxx b/src/db/upnp/Device.hxx index 78be01bd5..d03ad24f6 100644 --- a/src/db/upnp/Device.hxx +++ b/src/db/upnp/Device.hxx @@ -61,7 +61,6 @@ struct UPnPService { */ class UPnPDevice { public: - bool ok; // e.g. urn:schemas-upnp-org:device:MediaServer:1 std::string deviceType; // e.g. MediaTomb @@ -78,17 +77,17 @@ public: // Services provided by this device. std::vector<UPnPService> services; + UPnPDevice() = default; + UPnPDevice(const UPnPDevice &) = delete; + UPnPDevice(UPnPDevice &&) = default; + UPnPDevice &operator=(UPnPDevice &&) = default; + /** Build device from xml description downloaded from discovery * @param url where the description came from * @param description the xml device description */ - UPnPDevice(const std::string &url, const char *description); - - UPnPDevice() : ok(false) {} - - UPnPDevice(const UPnPDevice &) = delete; - UPnPDevice(UPnPDevice &&) = default; - UPnPDevice &operator=(UPnPDevice &&) = default; + bool Parse(const std::string &url, const char *description, + Error &error); }; #endif /* _UPNPDEV_HXX_INCLUDED_ */ |