hueplusplus  1.0.0
Public Member Functions | List of all members
hueplusplus::UPnP Class Reference

Class that looks for UPnP devices using an m-search package. More...

#include <hueplusplus/UPnP.h>

Public Member Functions

std::vector< std::pair< std::string, std::string > > getDevices (std::shared_ptr< const IHttpHandler > handler)
 Searches for UPnP devices and returns all found ones. More...
 

Detailed Description

Class that looks for UPnP devices using an m-search package.

Member Function Documentation

◆ getDevices()

std::vector< std::pair< std::string, std::string > > hueplusplus::UPnP::getDevices ( std::shared_ptr< const IHttpHandler handler)

Searches for UPnP devices and returns all found ones.

It does it by sending an m-search packet and waits for all responses. Since responses can be received multiple times this function conveniently removes all duplicates.

Parameters
handlerHttpHandler for communication
Returns
A vector containing pairs of address and name of all found devices
Exceptions
std::system_errorwhen system or socket operations fail

The documentation for this class was generated from the following files: