Files
op-pedal/NetworkManagerP2P/src/dbus/hpp/org.freedesktop.NetworkManager.Settings.hpp
T
2024-08-08 12:53:02 -04:00

113 lines
3.8 KiB
C++

/*
* This file was automatically generated by sdbus-c++-xml2cpp; DO NOT EDIT!
*/
#ifndef __sdbuscpp__dbus_hpp_org_freedesktop_NetworkManager_Settings_hpp__proxy__H__
#define __sdbuscpp__dbus_hpp_org_freedesktop_NetworkManager_Settings_hpp__proxy__H__
#include <sdbus-c++/sdbus-c++.h>
#include <string>
#include <tuple>
namespace org {
namespace freedesktop {
namespace NetworkManager {
class Settings_proxy
{
public:
static constexpr const char* INTERFACE_NAME = "org.freedesktop.NetworkManager.Settings";
protected:
Settings_proxy(sdbus::IProxy& proxy)
: proxy_(proxy)
{
proxy_.uponSignal("NewConnection").onInterface(INTERFACE_NAME).call([this](const sdbus::ObjectPath& connection){ this->onNewConnection(connection); });
proxy_.uponSignal("ConnectionRemoved").onInterface(INTERFACE_NAME).call([this](const sdbus::ObjectPath& connection){ this->onConnectionRemoved(connection); });
}
~Settings_proxy() = default;
virtual void onNewConnection(const sdbus::ObjectPath& connection) = 0;
virtual void onConnectionRemoved(const sdbus::ObjectPath& connection) = 0;
public:
std::vector<sdbus::ObjectPath> ListConnections()
{
std::vector<sdbus::ObjectPath> result;
proxy_.callMethod("ListConnections").onInterface(INTERFACE_NAME).storeResultsTo(result);
return result;
}
sdbus::ObjectPath GetConnectionByUuid(const std::string& uuid)
{
sdbus::ObjectPath result;
proxy_.callMethod("GetConnectionByUuid").onInterface(INTERFACE_NAME).withArguments(uuid).storeResultsTo(result);
return result;
}
sdbus::ObjectPath AddConnection(const std::map<std::string, std::map<std::string, sdbus::Variant>>& connection)
{
sdbus::ObjectPath result;
proxy_.callMethod("AddConnection").onInterface(INTERFACE_NAME).withArguments(connection).storeResultsTo(result);
return result;
}
sdbus::ObjectPath AddConnectionUnsaved(const std::map<std::string, std::map<std::string, sdbus::Variant>>& connection)
{
sdbus::ObjectPath result;
proxy_.callMethod("AddConnectionUnsaved").onInterface(INTERFACE_NAME).withArguments(connection).storeResultsTo(result);
return result;
}
std::tuple<sdbus::ObjectPath, std::map<std::string, sdbus::Variant>> AddConnection2(const std::map<std::string, std::map<std::string, sdbus::Variant>>& settings, const uint32_t& flags, const std::map<std::string, sdbus::Variant>& args)
{
std::tuple<sdbus::ObjectPath, std::map<std::string, sdbus::Variant>> result;
proxy_.callMethod("AddConnection2").onInterface(INTERFACE_NAME).withArguments(settings, flags, args).storeResultsTo(result);
return result;
}
std::tuple<bool, std::vector<std::string>> LoadConnections(const std::vector<std::string>& filenames)
{
std::tuple<bool, std::vector<std::string>> result;
proxy_.callMethod("LoadConnections").onInterface(INTERFACE_NAME).withArguments(filenames).storeResultsTo(result);
return result;
}
bool ReloadConnections()
{
bool result;
proxy_.callMethod("ReloadConnections").onInterface(INTERFACE_NAME).storeResultsTo(result);
return result;
}
void SaveHostname(const std::string& hostname)
{
proxy_.callMethod("SaveHostname").onInterface(INTERFACE_NAME).withArguments(hostname);
}
public:
std::vector<sdbus::ObjectPath> Connections()
{
return proxy_.getProperty("Connections").onInterface(INTERFACE_NAME);
}
std::string Hostname()
{
return proxy_.getProperty("Hostname").onInterface(INTERFACE_NAME);
}
bool CanModify()
{
return proxy_.getProperty("CanModify").onInterface(INTERFACE_NAME);
}
private:
sdbus::IProxy& proxy_;
};
}}} // namespaces
#endif