34 #include "../Encoding/Http.h" 35 #include "../Variable.h" 41 #include <unordered_map> 54 std::string
ip() {
return _ip; }
56 int32_t
port() {
return _port; }
63 void addField(std::string key, std::string
value) { _fields.emplace(key, value); }
65 auto fieldsIterator = _fields.find(key);
66 if (fieldsIterator != _fields.end())
return fieldsIterator->second;
else return "";
68 std::unordered_map<std::string, std::string> &
getFields() {
return _fields; };
73 std::string _location;
75 std::unordered_map<std::string, std::string> _fields;
90 void searchDevices(
const std::string &stHeader, uint32_t timeout, std::vector<SsdpInfo> &devices);
100 void searchDevicesPassive(
const std::string &stHeader, uint32_t timeout, std::vector<SsdpInfo> &devices, std::atomic_bool &abort);
103 std::string _address;
106 void sendSearchBroadcast(std::shared_ptr<FileDescriptor> &serverSocketDescriptor,
const std::string &stHeader, uint32_t timeout);
107 void processPacket(
Http &http,
const std::string &stHeader, std::map<std::string, SsdpInfo> &
info);
108 void processPacketPassive(
Http &http,
const std::string &stHeader, std::map<std::string, SsdpInfo> &info);
109 void getDeviceInfo(std::map<std::string, SsdpInfo> &info, std::vector<SsdpInfo> &devices);
110 std::shared_ptr<FileDescriptor> getSocketDescriptor(int32_t
port,
bool bindToMulticast);
int32_t port()
Definition: Ssdp.h:56
This is the base library main class.
Definition: BaseLib.h:95
Definition: BaseLib.cpp:34
void addField(std::string key, std::string value)
Definition: Ssdp.h:63
const PVariable info()
Definition: Ssdp.h:61
SsdpInfo()
Definition: Ssdp.cpp:38
std::string location()
Definition: Ssdp.h:59
PVariable value
Definition: UiElements.h:217
virtual ~SsdpInfo()
Definition: Ssdp.cpp:48
std::shared_ptr< Variable > PVariable
Definition: PhysicalInterfaceSettings.h:41
std::string getField(std::string key)
Definition: Ssdp.h:64
std::unordered_map< std::string, std::string > & getFields()
Definition: Ssdp.h:68
void setIp(std::string value)
Definition: Ssdp.h:55
void setPort(int32_t value)
Definition: Ssdp.h:57
void setLocation(std::string value)
Definition: Ssdp.h:60
std::string ip()
Definition: Ssdp.h:54
void setInfo(PVariable value)
Definition: Ssdp.h:62
void setPath(std::string value)
Definition: Ssdp.h:58