Base class for all proxy(remote) methods.
More...
#include <methodproxybase.h>
Base class for all proxy(remote) methods.
This class allows remote methods to be used in a generic manner, as the MethodProxy class is templated and thus cannot be used in a generic manner(e.g. stored in a vector).
- Author
- Rick L Vinyard Jr rviny.nosp@m.ard@.nosp@m.cs.nm.nosp@m.su.e.nosp@m.du
◆ MethodProxyBase() [1/2]
DBus::MethodProxyBase::MethodProxyBase |
( |
const std::string & |
name | ) |
|
|
protected |
◆ MethodProxyBase() [2/2]
◆ ~MethodProxyBase()
DBus::MethodProxyBase::~MethodProxyBase |
( |
| ) |
|
◆ call()
std::shared_ptr< const ReturnMessage > DBus::MethodProxyBase::call |
( |
std::shared_ptr< const CallMessage > |
call_message, |
|
|
int |
timeout_milliseconds = -1 |
|
) |
| const |
◆ create()
std::shared_ptr< MethodProxyBase > DBus::MethodProxyBase::create |
( |
const std::string & |
name | ) |
|
|
static |
◆ create_call_message()
std::shared_ptr< CallMessage > DBus::MethodProxyBase::create_call_message |
( |
| ) |
const |
◆ DBUS_CXX_PROPAGATE_CONST()
DBus::MethodProxyBase::DBUS_CXX_PROPAGATE_CONST |
( |
std::unique_ptr< priv_data > |
| ) |
|
|
private |
◆ disable_interactive_authorization()
void DBus::MethodProxyBase::disable_interactive_authorization |
( |
| ) |
|
◆ enable_interactive_authorization()
void DBus::MethodProxyBase::enable_interactive_authorization |
( |
unsigned int |
timeout_milliseconds = 0 | ) |
|
Enable interactive authorization for method call.
To quote the D-Bus specification:
This flag may be set on a method call message to inform the receiving side that the caller is prepared to wait for interactive authorization, which might take a considerable time to complete. For instance, if this flag is set, it would be appropriate to query the user for passwords or confirmation via Polkit or a similar framework.
This flag is only useful when unprivileged code calls a more privileged method call, and an authorization framework is deployed that allows possibly interactive authorization. If no such framework is deployed it has no effect. This flag should not be set by default by client implementations. If it is set, the caller should also set a suitably long timeout on the method call to make sure the user interaction may complete. This flag is only valid for method call messages, and shall be ignored otherwise.
If a this flag is not set on a method call, and a service determines that the requested operation is not allowed without interactive authorization, but could be allowed after successful interactive authorization, it may return the DBus::ErrorInteractiveAuthorizationRequired error.
The absence of this flag does not guarantee that interactive authorization will not be applied, since existing services that pre-date this flag might already use interactive authorization. However, existing D-Bus APIs that will use interactive authorization should document that the call may take longer than usual, and new D-Bus APIs should avoid interactive authorization in the absence of this flag.
Disabled by default.
- Note
- Any call messages created by create_call_message() before this function is called will retain the old behavior. If that is not desirable, call create_call_message() again after this function is called and use the new return value.
- Parameters
-
timeout | Timeout of the request in milliseconds. If set to zero, no timeout is imposed. This timeout overrides the timeout_milliseconds argument of call() (used in MethodProxy). |
- Exceptions
-
std::invalid_argument | If timeout_milliseconds doesn't fit into a signed int . |
◆ interface_name()
◆ name()
const std::string & DBus::MethodProxyBase::name |
( |
| ) |
const |
◆ set_interface()
◆ InterfaceProxy
The documentation for this class was generated from the following files: