27#ifndef SDBUS_CXX_ICONNECTION_H_
28#define SDBUS_CXX_ICONNECTION_H_
178 [[deprecated(
"Use one of other addObjectManager overloads")]]
virtual void addObjectManager(
const std::string& objectPath) = 0;
237 template <
typename _Rep,
typename _Period>
289 [[nodiscard]]
virtual Slot
addMatch(
const std::string& match, message_handler callback) = 0;
314 [[deprecated(
"This function has been replaced by enterEventLoop()")]]
void enterProcessingLoop();
328 [[deprecated(
"This function has been replaced by leaveEventLoop()")]]
void leaveProcessingLoop();
338 template <
typename _Rep,
typename _Period>
341 auto microsecs = std::chrono::duration_cast<std::chrono::microseconds>(timeout);
382 [[nodiscard]] std::unique_ptr<sdbus::IConnection>
createConnection(
const std::string& name);
std::unique_ptr< sdbus::IConnection > createSessionBusConnection()
Creates/opens D-Bus session bus connection.
std::unique_ptr< sdbus::IConnection > createSystemBusConnection()
Creates/opens D-Bus system bus connection.
std::unique_ptr< sdbus::IConnection > createSessionBusConnectionWithAddress(const std::string &address)
Creates/opens D-Bus session bus connection at a custom address.
std::unique_ptr< sdbus::IConnection > createDefaultBusConnection()
Creates/opens D-Bus session bus connection when in a user context, and a system bus connection,...
std::unique_ptr< sdbus::IConnection > createRemoteSystemBusConnection(const std::string &host)
Creates/opens D-Bus system connection on a remote host using ssh.
std::unique_ptr< sdbus::IConnection > createConnection()
Creates/opens D-Bus system bus connection.
Definition: IConnection.h:50
void leaveProcessingLoop()
Definition: IConnection.h:355
void enterProcessingLoop()
Enters I/O event loop on this bus connection.
Definition: IConnection.h:345
virtual void releaseName(const std::string &name)=0
Releases D-Bus name on the connection.
virtual void leaveEventLoop()=0
Leaves the I/O event loop running on this bus connection.
virtual bool processPendingRequest()=0
Process a pending request.
virtual void requestName(const std::string &name)=0
Requests D-Bus name on the connection.
virtual void addObjectManager(const std::string &objectPath)=0
Adds an ObjectManager at the specified D-Bus object path.
virtual std::string getUniqueName() const =0
Retrieve the unique name of a connection. E.g. ":1.xx".
virtual void setMethodCallTimeout(uint64_t timeout)=0
Sets general method call timeout.
virtual void enterEventLoop()=0
Enters I/O event loop on this bus connection.
virtual uint64_t getMethodCallTimeout() const =0
Gets general method call timeout.
virtual void addObjectManager(const std::string &objectPath, floating_slot_t)=0
Adds an ObjectManager at the specified D-Bus object path.
virtual PollData getEventLoopPollData() const =0
Returns fd, I/O events and timeout data you can pass to poll.
virtual void addMatch(const std::string &match, message_handler callback, floating_slot_t)=0
Adds a floating match rule for incoming message dispatching.
virtual void enterEventLoopAsync()=0
Enters I/O event loop on this bus connection in a separate thread.
PollData getProcessLoopPollData() const
Definition: IConnection.h:360
void enterProcessingLoopAsync()
Definition: IConnection.h:350
virtual Slot addMatch(const std::string &match, message_handler callback)=0
Adds a match rule for incoming message dispatching.
Definition: IConnection.h:66
short int events
Definition: IConnection.h:74
std::optional< std::chrono::microseconds > getRelativeTimeout() const
uint64_t timeout_usec
Definition: IConnection.h:79
int getPollTimeout() const
int fd
Definition: IConnection.h:70
std::chrono::microseconds getAbsoluteTimeout() const
Definition: IConnection.h:88
Definition: TypeTraits.h:73