11#include <QDBusMessage>
12#include <QDBusContext>
13#include <QDBusObjectPath>
15DNETWORKMANAGER_BEGIN_NAMESPACE
17class DSecretAgentPrivate;
19using DCORE_NAMESPACE::DExpected;
28 explicit DSecretAgent(
const QString &
id, QObject *parent =
nullptr);
29 explicit DSecretAgent(
const QString &
id, Capabilities caps, QObject *parent =
nullptr);
33 virtual DExpected<SettingDesc>
secrets(
const SettingDesc &conn,
35 const QString &settingName,
36 const QList<QString> &hints,
37 const GetSecretFlags &flags) = 0;
38 virtual DExpected<void>
cancelSecrets(
const quint64 connId,
const QString &settingName) = 0;
39 virtual DExpected<void>
saveSecret(
const SettingDesc &connSettigns,
const quint64 connId) = 0;
40 virtual DExpected<void>
deleteSecret(
const SettingDesc &connSettigns,
const quint64 connId) = 0;
44 Q_PRIVATE_SLOT(d_func(),
void registerAgent())
45 Q_PRIVATE_SLOT(d_func(),
void registerAgent(const
DSecretAgent::Capabilities capabilities))
46 Q_PRIVATE_SLOT(d_func(),
void dbusInterfacesAdded(const QDBusObjectPath &path, const QVariantMap &interfaces))
47 QScopedPointer<DSecretAgentPrivate> d_ptr;
50Q_DECLARE_OPERATORS_FOR_FLAGS(
DSecretAgent::GetSecretFlags)
53DNETWORKMANAGER_END_NAMESPACE
对于秘密代理的方法的封装
Definition: dsecretagent.h:22
virtual DExpected< void > cancelSecrets(const quint64 connId, const QString &settingName)=0
取消获取秘密
virtual DExpected< SettingDesc > secrets(const SettingDesc &conn, const quint64 connId, const QString &settingName, const QList< QString > &hints, const GetSecretFlags &flags)=0
获取对应连接的秘密
virtual DExpected< void > saveSecret(const SettingDesc &connSettigns, const quint64 connId)=0
保存秘密
virtual DExpected< void > deleteSecret(const SettingDesc &connSettigns, const quint64 connId)=0
删除秘密
NMSecretAgentGetSecretsFlags
这个值修改会GetSecrets请求的行为
Definition: dnetworkmanagertypes.h:235
NMSecretAgentCapabilities
指示代理的各种能力
Definition: dnetworkmanagertypes.h:233