mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 14:46:12 -04:00
96 lines
3.6 KiB
C++
96 lines
3.6 KiB
C++
|
|
/*
|
|
* This file was automatically generated by sdbus-c++-xml2cpp; DO NOT EDIT!
|
|
*/
|
|
|
|
#ifndef __sdbuscpp___home_lasan_Dev_nearby_latest_internal_platform_implementation_linux_generated_avahi_proxy_h__proxy__H__
|
|
#define __sdbuscpp___home_lasan_Dev_nearby_latest_internal_platform_implementation_linux_generated_avahi_proxy_h__proxy__H__
|
|
|
|
#include <sdbus-c++/sdbus-c++.h>
|
|
#include <string>
|
|
#include <tuple>
|
|
|
|
namespace org {
|
|
namespace freedesktop {
|
|
namespace Avahi {
|
|
|
|
class Server_proxy
|
|
{
|
|
public:
|
|
static constexpr const char* INTERFACE_NAME = "org.freedesktop.Avahi.Server";
|
|
|
|
protected:
|
|
Server_proxy(sdbus::IProxy& proxy)
|
|
: proxy_(&proxy)
|
|
{
|
|
}
|
|
|
|
Server_proxy(const Server_proxy&) = delete;
|
|
Server_proxy& operator=(const Server_proxy&) = delete;
|
|
Server_proxy(Server_proxy&&) = default;
|
|
Server_proxy& operator=(Server_proxy&&) = default;
|
|
|
|
~Server_proxy() = default;
|
|
|
|
public:
|
|
sdbus::ObjectPath ServiceBrowserNew(const int32_t& interface, const int32_t& protocol, const std::string& type, const std::string& domain)
|
|
{
|
|
sdbus::ObjectPath result;
|
|
proxy_->callMethod("ServiceBrowserNew").onInterface(INTERFACE_NAME).withArguments(interface, protocol, type, domain).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
std::tuple<int32_t, int32_t, std::string, std::string, std::string, std::string, int32_t, std::string, uint16_t, std::vector<std::vector<uint8_t>>> ResolveService(const int32_t& interface, const int32_t& protocol, const std::string& name, const std::string& type, const std::string& domain, const int32_t& aprotocol)
|
|
{
|
|
std::tuple<int32_t, int32_t, std::string, std::string, std::string, std::string, int32_t, std::string, uint16_t, std::vector<std::vector<uint8_t>>> result;
|
|
proxy_->callMethod("ResolveService").onInterface(INTERFACE_NAME).withArguments(interface, protocol, name, type, domain, aprotocol).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
private:
|
|
sdbus::IProxy* proxy_;
|
|
};
|
|
|
|
}}} // namespaces
|
|
|
|
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){ this->onItemNew(interface, protocol, name, type, domain); });
|
|
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){ this->onItemRemove(interface, protocol, name, type, domain); });
|
|
}
|
|
|
|
ServiceBrowser_proxy(const ServiceBrowser_proxy&) = delete;
|
|
ServiceBrowser_proxy& operator=(const ServiceBrowser_proxy&) = delete;
|
|
ServiceBrowser_proxy(ServiceBrowser_proxy&&) = default;
|
|
ServiceBrowser_proxy& operator=(ServiceBrowser_proxy&&) = default;
|
|
|
|
~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) = 0;
|
|
virtual void onItemRemove(const int32_t& interface, const int32_t& protocol, const std::string& name, const std::string& type, const std::string& domain) = 0;
|
|
|
|
public:
|
|
void Free()
|
|
{
|
|
proxy_->callMethod("Free").onInterface(INTERFACE_NAME);
|
|
}
|
|
|
|
private:
|
|
sdbus::IProxy* proxy_;
|
|
};
|
|
|
|
}}} // namespaces
|
|
|
|
#endif
|