lib/upnp: use C++ exceptions instead of class Error

This commit is contained in:
Max Kellermann
2016-02-07 00:29:06 +01:00
parent 6e2ad6860f
commit 3ee5093b03
11 changed files with 143 additions and 230 deletions

View File

@@ -120,20 +120,18 @@ public:
UPnPDeviceDirectory(const UPnPDeviceDirectory &) = delete;
UPnPDeviceDirectory& operator=(const UPnPDeviceDirectory &) = delete;
bool Start(Error &error);
void Start();
/** Retrieve the directory services currently seen on the network */
bool GetDirectories(std::vector<ContentDirectoryService> &, Error &);
std::vector<ContentDirectoryService> GetDirectories();
/**
* Get server by friendly name.
*/
bool GetServer(const char *friendly_name,
ContentDirectoryService &server,
Error &error);
ContentDirectoryService GetServer(const char *friendly_name);
private:
bool Search(Error &error);
void Search();
/**
* Look at the devices and get rid of those which have not
@@ -142,7 +140,7 @@ private:
*
* Caller must lock #mutex.
*/
bool ExpireDevices(Error &error);
void ExpireDevices();
void LockAdd(ContentDirectoryDescriptor &&d);
void LockRemove(const std::string &id);