Files
nearby/internal/platform/implementation/linux/avahi_servicebrowser_client_glue.h
T
2023-08-21 23:19:01 +05:30

59 lines
2.3 KiB
C++

/*
* This file was automatically generated by sdbus-c++-xml2cpp; DO NOT EDIT!
*/
#ifndef __sdbuscpp__avahi_servicebrowser_client_glue_h__proxy__H__
#define __sdbuscpp__avahi_servicebrowser_client_glue_h__proxy__H__
#include <sdbus-c++/sdbus-c++.h>
#include <string>
#include <tuple>
namespace org {
namespace freedesktop {
namespace Avahi {
class ServiceBrowser_proxy
{
public:
static constexpr const char* INTERFACE_NAME = "org.freedesktop.Avahi.ServiceBrowser";
protected:
ServiceBrowser_proxy(sdbus::IProxy& proxy)
: proxy_(proxy)
{
proxy_.uponSignal("ItemNew").onInterface(INTERFACE_NAME).call([this](const int32_t& interface, const int32_t& protocol, const std::string& name, const std::string& type, const std::string& domain, const uint32_t& flags){ this->onItemNew(interface, protocol, name, type, domain, flags); });
proxy_.uponSignal("ItemRemove").onInterface(INTERFACE_NAME).call([this](const int32_t& interface, const int32_t& protocol, const std::string& name, const std::string& type, const std::string& domain, const uint32_t& flags){ this->onItemRemove(interface, protocol, name, type, domain, flags); });
proxy_.uponSignal("Failure").onInterface(INTERFACE_NAME).call([this](const std::string& error){ this->onFailure(error); });
proxy_.uponSignal("AllForNow").onInterface(INTERFACE_NAME).call([this](){ this->onAllForNow(); });
proxy_.uponSignal("CacheExhausted").onInterface(INTERFACE_NAME).call([this](){ this->onCacheExhausted(); });
}
~ServiceBrowser_proxy() = default;
virtual void onItemNew(const int32_t& interface, const int32_t& protocol, const std::string& name, const std::string& type, const std::string& domain, const uint32_t& flags) = 0;
virtual void onItemRemove(const int32_t& interface, const int32_t& protocol, const std::string& name, const std::string& type, const std::string& domain, const uint32_t& flags) = 0;
virtual void onFailure(const std::string& error) = 0;
virtual void onAllForNow() = 0;
virtual void onCacheExhausted() = 0;
public:
void Free()
{
proxy_.callMethod("Free").onInterface(INTERFACE_NAME);
}
void Start()
{
proxy_.callMethod("Start").onInterface(INTERFACE_NAME);
}
private:
sdbus::IProxy& proxy_;
};
}}} // namespaces
#endif