mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-14 22:56:12 -04:00
400 lines
16 KiB
C++
400 lines
16 KiB
C++
|
|
/*
|
|
* This file was automatically generated by sdbus-c++-xml2cpp; DO NOT EDIT!
|
|
*/
|
|
|
|
#ifndef __sdbuscpp__avahi_server_client_glue_h__proxy__H__
|
|
#define __sdbuscpp__avahi_server_client_glue_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)
|
|
{
|
|
proxy_.uponSignal("StateChanged").onInterface(INTERFACE_NAME).call([this](const int32_t& state, const std::string& error){ this->onStateChanged(state, error); });
|
|
}
|
|
|
|
~Server_proxy() = default;
|
|
|
|
virtual void onStateChanged(const int32_t& state, const std::string& error) = 0;
|
|
|
|
public:
|
|
std::string GetVersionString()
|
|
{
|
|
std::string result;
|
|
proxy_.callMethod("GetVersionString").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
uint32_t GetAPIVersion()
|
|
{
|
|
uint32_t result;
|
|
proxy_.callMethod("GetAPIVersion").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
std::string GetHostName()
|
|
{
|
|
std::string result;
|
|
proxy_.callMethod("GetHostName").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
void SetHostName(const std::string& name)
|
|
{
|
|
proxy_.callMethod("SetHostName").onInterface(INTERFACE_NAME).withArguments(name);
|
|
}
|
|
|
|
std::string GetHostNameFqdn()
|
|
{
|
|
std::string result;
|
|
proxy_.callMethod("GetHostNameFqdn").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
std::string GetDomainName()
|
|
{
|
|
std::string result;
|
|
proxy_.callMethod("GetDomainName").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
bool IsNSSSupportAvailable()
|
|
{
|
|
bool result;
|
|
proxy_.callMethod("IsNSSSupportAvailable").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
int32_t GetState()
|
|
{
|
|
int32_t result;
|
|
proxy_.callMethod("GetState").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
uint32_t GetLocalServiceCookie()
|
|
{
|
|
uint32_t result;
|
|
proxy_.callMethod("GetLocalServiceCookie").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
std::string GetAlternativeHostName(const std::string& name)
|
|
{
|
|
std::string result;
|
|
proxy_.callMethod("GetAlternativeHostName").onInterface(INTERFACE_NAME).withArguments(name).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
std::string GetAlternativeServiceName(const std::string& name)
|
|
{
|
|
std::string result;
|
|
proxy_.callMethod("GetAlternativeServiceName").onInterface(INTERFACE_NAME).withArguments(name).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
std::string GetNetworkInterfaceNameByIndex(const int32_t& index)
|
|
{
|
|
std::string result;
|
|
proxy_.callMethod("GetNetworkInterfaceNameByIndex").onInterface(INTERFACE_NAME).withArguments(index).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
int32_t GetNetworkInterfaceIndexByName(const std::string& name)
|
|
{
|
|
int32_t result;
|
|
proxy_.callMethod("GetNetworkInterfaceIndexByName").onInterface(INTERFACE_NAME).withArguments(name).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
std::tuple<int32_t, int32_t, std::string, int32_t, std::string, uint32_t> ResolveHostName(const int32_t& interface, const int32_t& protocol, const std::string& name, const int32_t& aprotocol, const uint32_t& flags)
|
|
{
|
|
std::tuple<int32_t, int32_t, std::string, int32_t, std::string, uint32_t> result;
|
|
proxy_.callMethod("ResolveHostName").onInterface(INTERFACE_NAME).withArguments(interface, protocol, name, aprotocol, flags).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
std::tuple<int32_t, int32_t, int32_t, std::string, std::string, uint32_t> ResolveAddress(const int32_t& interface, const int32_t& protocol, const std::string& address, const uint32_t& flags)
|
|
{
|
|
std::tuple<int32_t, int32_t, int32_t, std::string, std::string, uint32_t> result;
|
|
proxy_.callMethod("ResolveAddress").onInterface(INTERFACE_NAME).withArguments(interface, protocol, address, flags).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>>, uint32_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, const uint32_t& flags)
|
|
{
|
|
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>>, uint32_t> result;
|
|
proxy_.callMethod("ResolveService").onInterface(INTERFACE_NAME).withArguments(interface, protocol, name, type, domain, aprotocol, flags).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
sdbus::ObjectPath EntryGroupNew()
|
|
{
|
|
sdbus::ObjectPath result;
|
|
proxy_.callMethod("EntryGroupNew").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
sdbus::ObjectPath DomainBrowserNew(const int32_t& interface, const int32_t& protocol, const std::string& domain, const int32_t& btype, const uint32_t& flags)
|
|
{
|
|
sdbus::ObjectPath result;
|
|
proxy_.callMethod("DomainBrowserNew").onInterface(INTERFACE_NAME).withArguments(interface, protocol, domain, btype, flags).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
sdbus::ObjectPath ServiceTypeBrowserNew(const int32_t& interface, const int32_t& protocol, const std::string& domain, const uint32_t& flags)
|
|
{
|
|
sdbus::ObjectPath result;
|
|
proxy_.callMethod("ServiceTypeBrowserNew").onInterface(INTERFACE_NAME).withArguments(interface, protocol, domain, flags).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
sdbus::ObjectPath ServiceBrowserNew(const int32_t& interface, const int32_t& protocol, const std::string& type, const std::string& domain, const uint32_t& flags)
|
|
{
|
|
sdbus::ObjectPath result;
|
|
proxy_.callMethod("ServiceBrowserNew").onInterface(INTERFACE_NAME).withArguments(interface, protocol, type, domain, flags).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
sdbus::ObjectPath ServiceResolverNew(const int32_t& interface, const int32_t& protocol, const std::string& name, const std::string& type, const std::string& domain, const int32_t& aprotocol, const uint32_t& flags)
|
|
{
|
|
sdbus::ObjectPath result;
|
|
proxy_.callMethod("ServiceResolverNew").onInterface(INTERFACE_NAME).withArguments(interface, protocol, name, type, domain, aprotocol, flags).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
sdbus::ObjectPath HostNameResolverNew(const int32_t& interface, const int32_t& protocol, const std::string& name, const int32_t& aprotocol, const uint32_t& flags)
|
|
{
|
|
sdbus::ObjectPath result;
|
|
proxy_.callMethod("HostNameResolverNew").onInterface(INTERFACE_NAME).withArguments(interface, protocol, name, aprotocol, flags).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
sdbus::ObjectPath AddressResolverNew(const int32_t& interface, const int32_t& protocol, const std::string& address, const uint32_t& flags)
|
|
{
|
|
sdbus::ObjectPath result;
|
|
proxy_.callMethod("AddressResolverNew").onInterface(INTERFACE_NAME).withArguments(interface, protocol, address, flags).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
sdbus::ObjectPath RecordBrowserNew(const int32_t& interface, const int32_t& protocol, const std::string& name, const uint16_t& clazz, const uint16_t& type, const uint32_t& flags)
|
|
{
|
|
sdbus::ObjectPath result;
|
|
proxy_.callMethod("RecordBrowserNew").onInterface(INTERFACE_NAME).withArguments(interface, protocol, name, clazz, type, flags).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
private:
|
|
sdbus::IProxy& proxy_;
|
|
};
|
|
|
|
}}} // namespaces
|
|
|
|
namespace org {
|
|
namespace freedesktop {
|
|
namespace Avahi {
|
|
|
|
class Server2_proxy
|
|
{
|
|
public:
|
|
static constexpr const char* INTERFACE_NAME = "org.freedesktop.Avahi.Server2";
|
|
|
|
protected:
|
|
Server2_proxy(sdbus::IProxy& proxy)
|
|
: proxy_(proxy)
|
|
{
|
|
proxy_.uponSignal("StateChanged").onInterface(INTERFACE_NAME).call([this](const int32_t& state, const std::string& error){ this->onStateChanged(state, error); });
|
|
}
|
|
|
|
~Server2_proxy() = default;
|
|
|
|
virtual void onStateChanged(const int32_t& state, const std::string& error) = 0;
|
|
|
|
public:
|
|
std::string GetVersionString()
|
|
{
|
|
std::string result;
|
|
proxy_.callMethod("GetVersionString").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
uint32_t GetAPIVersion()
|
|
{
|
|
uint32_t result;
|
|
proxy_.callMethod("GetAPIVersion").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
std::string GetHostName()
|
|
{
|
|
std::string result;
|
|
proxy_.callMethod("GetHostName").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
void SetHostName(const std::string& name)
|
|
{
|
|
proxy_.callMethod("SetHostName").onInterface(INTERFACE_NAME).withArguments(name);
|
|
}
|
|
|
|
std::string GetHostNameFqdn()
|
|
{
|
|
std::string result;
|
|
proxy_.callMethod("GetHostNameFqdn").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
std::string GetDomainName()
|
|
{
|
|
std::string result;
|
|
proxy_.callMethod("GetDomainName").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
bool IsNSSSupportAvailable()
|
|
{
|
|
bool result;
|
|
proxy_.callMethod("IsNSSSupportAvailable").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
int32_t GetState()
|
|
{
|
|
int32_t result;
|
|
proxy_.callMethod("GetState").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
uint32_t GetLocalServiceCookie()
|
|
{
|
|
uint32_t result;
|
|
proxy_.callMethod("GetLocalServiceCookie").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
std::string GetAlternativeHostName(const std::string& name)
|
|
{
|
|
std::string result;
|
|
proxy_.callMethod("GetAlternativeHostName").onInterface(INTERFACE_NAME).withArguments(name).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
std::string GetAlternativeServiceName(const std::string& name)
|
|
{
|
|
std::string result;
|
|
proxy_.callMethod("GetAlternativeServiceName").onInterface(INTERFACE_NAME).withArguments(name).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
std::string GetNetworkInterfaceNameByIndex(const int32_t& index)
|
|
{
|
|
std::string result;
|
|
proxy_.callMethod("GetNetworkInterfaceNameByIndex").onInterface(INTERFACE_NAME).withArguments(index).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
int32_t GetNetworkInterfaceIndexByName(const std::string& name)
|
|
{
|
|
int32_t result;
|
|
proxy_.callMethod("GetNetworkInterfaceIndexByName").onInterface(INTERFACE_NAME).withArguments(name).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
std::tuple<int32_t, int32_t, std::string, int32_t, std::string, uint32_t> ResolveHostName(const int32_t& interface, const int32_t& protocol, const std::string& name, const int32_t& aprotocol, const uint32_t& flags)
|
|
{
|
|
std::tuple<int32_t, int32_t, std::string, int32_t, std::string, uint32_t> result;
|
|
proxy_.callMethod("ResolveHostName").onInterface(INTERFACE_NAME).withArguments(interface, protocol, name, aprotocol, flags).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
std::tuple<int32_t, int32_t, int32_t, std::string, std::string, uint32_t> ResolveAddress(const int32_t& interface, const int32_t& protocol, const std::string& address, const uint32_t& flags)
|
|
{
|
|
std::tuple<int32_t, int32_t, int32_t, std::string, std::string, uint32_t> result;
|
|
proxy_.callMethod("ResolveAddress").onInterface(INTERFACE_NAME).withArguments(interface, protocol, address, flags).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>>, uint32_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, const uint32_t& flags)
|
|
{
|
|
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>>, uint32_t> result;
|
|
proxy_.callMethod("ResolveService").onInterface(INTERFACE_NAME).withArguments(interface, protocol, name, type, domain, aprotocol, flags).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
sdbus::ObjectPath EntryGroupNew()
|
|
{
|
|
sdbus::ObjectPath result;
|
|
proxy_.callMethod("EntryGroupNew").onInterface(INTERFACE_NAME).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
sdbus::ObjectPath DomainBrowserPrepare(const int32_t& interface, const int32_t& protocol, const std::string& domain, const int32_t& btype, const uint32_t& flags)
|
|
{
|
|
sdbus::ObjectPath result;
|
|
proxy_.callMethod("DomainBrowserPrepare").onInterface(INTERFACE_NAME).withArguments(interface, protocol, domain, btype, flags).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
sdbus::ObjectPath ServiceTypeBrowserPrepare(const int32_t& interface, const int32_t& protocol, const std::string& domain, const uint32_t& flags)
|
|
{
|
|
sdbus::ObjectPath result;
|
|
proxy_.callMethod("ServiceTypeBrowserPrepare").onInterface(INTERFACE_NAME).withArguments(interface, protocol, domain, flags).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
sdbus::ObjectPath ServiceBrowserPrepare(const int32_t& interface, const int32_t& protocol, const std::string& type, const std::string& domain, const uint32_t& flags)
|
|
{
|
|
sdbus::ObjectPath result;
|
|
proxy_.callMethod("ServiceBrowserPrepare").onInterface(INTERFACE_NAME).withArguments(interface, protocol, type, domain, flags).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
sdbus::ObjectPath ServiceResolverPrepare(const int32_t& interface, const int32_t& protocol, const std::string& name, const std::string& type, const std::string& domain, const int32_t& aprotocol, const uint32_t& flags)
|
|
{
|
|
sdbus::ObjectPath result;
|
|
proxy_.callMethod("ServiceResolverPrepare").onInterface(INTERFACE_NAME).withArguments(interface, protocol, name, type, domain, aprotocol, flags).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
sdbus::ObjectPath HostNameResolverPrepare(const int32_t& interface, const int32_t& protocol, const std::string& name, const int32_t& aprotocol, const uint32_t& flags)
|
|
{
|
|
sdbus::ObjectPath result;
|
|
proxy_.callMethod("HostNameResolverPrepare").onInterface(INTERFACE_NAME).withArguments(interface, protocol, name, aprotocol, flags).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
sdbus::ObjectPath AddressResolverPrepare(const int32_t& interface, const int32_t& protocol, const std::string& address, const uint32_t& flags)
|
|
{
|
|
sdbus::ObjectPath result;
|
|
proxy_.callMethod("AddressResolverPrepare").onInterface(INTERFACE_NAME).withArguments(interface, protocol, address, flags).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
sdbus::ObjectPath RecordBrowserPrepare(const int32_t& interface, const int32_t& protocol, const std::string& name, const uint16_t& clazz, const uint16_t& type, const uint32_t& flags)
|
|
{
|
|
sdbus::ObjectPath result;
|
|
proxy_.callMethod("RecordBrowserPrepare").onInterface(INTERFACE_NAME).withArguments(interface, protocol, name, clazz, type, flags).storeResultsTo(result);
|
|
return result;
|
|
}
|
|
|
|
private:
|
|
sdbus::IProxy& proxy_;
|
|
};
|
|
|
|
}}} // namespaces
|
|
|
|
#endif
|