27#ifndef SDBUS_CXX_IPROXY_H_
28#define SDBUS_CXX_IPROXY_H_
46 class PendingAsyncCall;
433 template <
typename _Rep,
typename _Period>
482 , async_reply_handler asyncReplyCallback
508 , async_reply_handler asyncReplyCallback
509 , uint64_t timeout ) = 0;
535 , async_reply_handler asyncReplyCallback
542 template <
typename _Rep,
typename _Period>
544 , async_reply_handler asyncReplyCallback
545 ,
const std::chrono::duration<_Rep, _Period>& timeout );
550 template <
typename _Rep,
typename _Period>
552 , async_reply_handler asyncReplyCallback
553 ,
const std::chrono::duration<_Rep, _Period>& timeout
604 template <
typename _Rep,
typename _Period>
606 ,
const std::chrono::duration<_Rep, _Period>& timeout
627 , signal_handler signalHandler ) = 0;
647 , signal_handler signalHandler
657 ,
const char* signalName
658 , signal_handler signalHandler ) = 0;
660 ,
const char* signalName
661 , signal_handler signalHandler
700 friend internal::Proxy;
704 std::weak_ptr<void> callInfo_;
709 template <
typename _Rep,
typename _Period>
712 auto microsecs = std::chrono::duration_cast<std::chrono::microseconds>(timeout);
713 return callMethod(message, microsecs.count());
716 template <
typename _Rep,
typename _Period>
718 , async_reply_handler asyncReplyCallback
719 ,
const std::chrono::duration<_Rep, _Period>& timeout )
721 auto microsecs = std::chrono::duration_cast<std::chrono::microseconds>(timeout);
722 return callMethodAsync(message, std::move(asyncReplyCallback), microsecs.count());
725 template <
typename _Rep,
typename _Period>
727 , async_reply_handler asyncReplyCallback
728 ,
const std::chrono::duration<_Rep, _Period>& timeout
731 auto microsecs = std::chrono::duration_cast<std::chrono::microseconds>(timeout);
732 return callMethodAsync(message, std::move(asyncReplyCallback), microsecs.count(), return_slot);
735 template <
typename _Rep,
typename _Period>
737 ,
const std::chrono::duration<_Rep, _Period>& timeout
740 auto microsecs = std::chrono::duration_cast<std::chrono::microseconds>(timeout);
887 [[nodiscard]] std::unique_ptr<sdbus::IProxy>
createProxy( std::unique_ptr<sdbus::IConnection>&& connection
914 [[nodiscard]] std::unique_ptr<sdbus::IProxy>
createProxy( std::unique_ptr<sdbus::IConnection>&& connection
std::unique_ptr< sdbus::IProxy > createProxy(sdbus::IConnection &connection, ServiceName destination, ObjectPath objectPath)
Creates a proxy object for a specific remote D-Bus object.
Definition ConvenienceApiClasses.h:255
Definition ConvenienceApiClasses.h:270
Definition ConvenienceApiClasses.h:124
Definition ConvenienceApiClasses.h:191
Definition ConvenienceApiClasses.h:232
Definition IConnection.h:61
PropertyGetter getProperty(const PropertyName &propertyName)
Gets value of a property of the D-Bus object.
Definition IProxy.h:789
AsyncPropertyGetter getPropertyAsync(const PropertyName &propertyName)
Gets value of a property of the D-Bus object asynchronously.
Definition IProxy.h:799
virtual std::future< MethodReply > callMethodAsync(const MethodCall &message, with_future_t)=0
Calls method on the D-Bus object asynchronously.
virtual PendingAsyncCall callMethodAsync(const MethodCall &message, async_reply_handler asyncReplyCallback, uint64_t timeout)=0
Calls method on the D-Bus object asynchronously, with custom timeout.
virtual MethodReply callMethod(const MethodCall &message)=0
Calls method on the remote D-Bus object.
AsyncAllPropertiesGetter getAllPropertiesAsync()
Gets values of all properties of the D-Bus object asynchronously.
Definition IProxy.h:834
virtual void registerSignalHandler(const InterfaceName &interfaceName, const SignalName &signalName, signal_handler signalHandler)=0
Registers a handler for the desired signal emitted by the D-Bus object.
virtual Slot callMethodAsync(const MethodCall &message, async_reply_handler asyncReplyCallback, return_slot_t)=0
Calls method on the D-Bus object asynchronously.
PropertySetter setProperty(const PropertyName &propertyName)
Sets value of a property of the D-Bus object.
Definition IProxy.h:809
MethodInvoker callMethod(const MethodName &methodName)
Calls method on the D-Bus object.
Definition IProxy.h:744
virtual Message getCurrentlyProcessedMessage() const =0
Provides access to the currently processed D-Bus message.
virtual void unregister()=0
Unregisters proxy's signal handlers and stops receiving replies to pending async calls.
virtual MethodCall createMethodCall(const InterfaceName &interfaceName, const MethodName &methodName)=0
Creates a method call message.
virtual MethodReply callMethod(const MethodCall &message, uint64_t timeout)=0
Calls method on the remote D-Bus object.
virtual sdbus::IConnection & getConnection() const =0
Provides D-Bus connection used by the proxy.
virtual std::future< MethodReply > callMethodAsync(const MethodCall &message, uint64_t timeout, with_future_t)=0
Calls method on the D-Bus object asynchronously, with custom timeout.
virtual Slot registerSignalHandler(const InterfaceName &interfaceName, const SignalName &signalName, signal_handler signalHandler, return_slot_t)=0
Registers a handler for the desired signal emitted by the D-Bus object.
virtual Slot callMethodAsync(const MethodCall &message, async_reply_handler asyncReplyCallback, uint64_t timeout, return_slot_t)=0
Calls method on the D-Bus object asynchronously, with custom timeout.
virtual const ObjectPath & getObjectPath() const =0
Returns object path of the underlying DBus object.
AsyncMethodInvoker callMethodAsync(const MethodName &methodName)
Calls method on the D-Bus object asynchronously.
Definition IProxy.h:759
SignalSubscriber uponSignal(const SignalName &signalName)
Registers signal handler for a given signal of the D-Bus object.
Definition IProxy.h:774
AllPropertiesGetter getAllProperties()
Gets values of all properties of the D-Bus object.
Definition IProxy.h:829
virtual PendingAsyncCall callMethodAsync(const MethodCall &message, async_reply_handler asyncReplyCallback)=0
Calls method on the D-Bus object asynchronously.
AsyncPropertySetter setPropertyAsync(const PropertyName &propertyName)
Sets value of a property of the D-Bus object asynchronously.
Definition IProxy.h:819
Definition ConvenienceApiClasses.h:94
void cancel()
Cancels the delivery of the pending asynchronous call result.
bool isPending() const
Answers whether the asynchronous call is still pending.
Definition ConvenienceApiClasses.h:175
Definition ConvenienceApiClasses.h:211
Definition ConvenienceApiClasses.h:154
Definition TypeTraits.h:101
Definition TypeTraits.h:88
Definition TypeTraits.h:104