mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-12 06:27:12 +03:00
make it fit in allocated space
This commit is contained in:
@@ -5,11 +5,22 @@
|
||||
|
||||
using namespace bell;
|
||||
|
||||
class implMDNSService : public MDNSService {
|
||||
private:
|
||||
const std::string type;
|
||||
const std::string proto;
|
||||
void unregisterService() { mdns_service_remove(type.c_str(), proto.c_str()); }
|
||||
|
||||
public:
|
||||
implMDNSService(std::string type, std::string proto) : type(type), proto(proto) { };
|
||||
};
|
||||
|
||||
/**
|
||||
* ESP32 implementation of MDNSService
|
||||
* @see https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/protocols/mdns.html
|
||||
**/
|
||||
void* MDNSService::registerService(
|
||||
|
||||
std::unique_ptr<MDNSService> MDNSService::registerService(
|
||||
const std::string& serviceName,
|
||||
const std::string& serviceType,
|
||||
const std::string& serviceProto,
|
||||
@@ -35,5 +46,5 @@ void* MDNSService::registerService(
|
||||
txtItems.size() /* num_items */
|
||||
);
|
||||
|
||||
return NULL;
|
||||
return std::make_unique<implMDNSService>(serviceType, serviceProto);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user