27 #ifndef SDBUS_CXX_IPROXY_H_ 28 #define SDBUS_CXX_IPROXY_H_ 41 class PendingAsyncCall;
66 virtual ~
IProxy() =
default;
106 template <
typename _Rep,
typename _Period>
130 template <
typename _Rep,
typename _Period>
143 ,
const std::string& signalName
144 , signal_handler signalHandler ) = 0;
334 friend internal::Proxy;
338 std::weak_ptr<void> callData_;
343 template <
typename _Rep,
typename _Period>
346 auto microsecs = std::chrono::duration_cast<std::chrono::microseconds>(timeout);
347 return callMethod(message, microsecs.count());
350 template <
typename _Rep,
typename _Period>
353 auto microsecs = std::chrono::duration_cast<std::chrono::microseconds>(timeout);
354 return callMethod(message, std::move(asyncReplyCallback), microsecs.count());
402 , std::string destination
403 , std::string objectPath );
424 [[nodiscard]] std::unique_ptr<sdbus::IProxy>
createProxy( std::unique_ptr<sdbus::IConnection>&& connection
425 , std::string destination
426 , std::string objectPath );
445 [[nodiscard]] std::unique_ptr<sdbus::IProxy>
createProxy( std::string destination
446 , std::string objectPath );
Definition: Message.h:203
virtual MethodCall createMethodCall(const std::string &interfaceName, const std::string &methodName)=0
Creates a method call message.
Definition: ConvenienceApiClasses.h:188
virtual sdbus::IConnection & getConnection() const =0
Provides D-Bus connection used by the proxy.
virtual void registerSignalHandler(const std::string &interfaceName, const std::string &signalName, signal_handler signalHandler)=0
Registers a handler for the desired signal emitted by the proxied D-Bus object.
bool isPending() const
Answers whether the asynchronous call is still pending.
SignalSubscriber uponSignal(const std::string &signalName)
Registers signal handler for a given signal of the proxied D-Bus object.
Definition: IProxy.h:367
virtual const Message * getCurrentlyProcessedMessage() const =0
Provides currently processed D-Bus message.
AsyncMethodInvoker callMethodAsync(const std::string &methodName)
Calls method on the proxied D-Bus object asynchronously.
Definition: IProxy.h:362
Definition: ConvenienceApiClasses.h:163
virtual void finishRegistration()=0
Finishes the registration of signal handlers.
std::unique_ptr< sdbus::IProxy > createProxy(sdbus::IConnection &connection, std::string destination, std::string objectPath)
Creates a proxy object for a specific remote D-Bus object.
void cancel()
Cancels the delivery of the pending asynchronous call result.
Definition: ConvenienceApiClasses.h:219
virtual void unregister()=0
Unregisters proxy's signal handlers and stops receving replies to pending async calls.
Definition: ConvenienceApiClasses.h:230
PropertySetter setProperty(const std::string &propertyName)
Sets value of a property of the proxied D-Bus object.
Definition: IProxy.h:377
PropertyGetter getProperty(const std::string &propertyName)
Gets value of a property of the proxied D-Bus object.
Definition: IProxy.h:372
virtual const std::string & getObjectPath() const =0
Returns object path of the underlying DBus object.
virtual MethodReply callMethod(const MethodCall &message, uint64_t timeout=0)=0
Calls method on the proxied D-Bus object.
Definition: AdaptorInterfaces.h:36
Definition: IConnection.h:47
Definition: ConvenienceApiClasses.h:206
Definition: Message.h:178