diff options
Diffstat (limited to 'src/sshagent/KeeAgentSettings.h')
-rw-r--r-- | src/sshagent/KeeAgentSettings.h | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/src/sshagent/KeeAgentSettings.h b/src/sshagent/KeeAgentSettings.h index 484dee88d..3cc701666 100644 --- a/src/sshagent/KeeAgentSettings.h +++ b/src/sshagent/KeeAgentSettings.h @@ -19,6 +19,9 @@ #ifndef KEEAGENTSETTINGS_H #define KEEAGENTSETTINGS_H +#include "core/Entry.h" +#include "core/EntryAttachments.h" +#include "crypto/ssh/OpenSSHKey.h" #include <QXmlStreamReader> #include <QtCore> @@ -26,13 +29,26 @@ class KeeAgentSettings { public: KeeAgentSettings(); - - bool operator==(KeeAgentSettings& other); - bool operator!=(KeeAgentSettings& other); - bool isDefault(); + bool operator==(const KeeAgentSettings& other) const; + bool operator!=(const KeeAgentSettings& other) const; + bool isDefault() const; + void reset(); bool fromXml(const QByteArray& ba); - QByteArray toXml(); + QByteArray toXml() const; + + static bool inEntryAttachments(const EntryAttachments* attachments); + bool fromEntry(const Entry* entry); + void toEntry(Entry* entry) const; + bool keyConfigured() const; + bool toOpenSSHKey(const Entry* entry, OpenSSHKey& key, bool decrypt); + bool toOpenSSHKey(const QString& username, + const QString& password, + const EntryAttachments* attachments, + OpenSSHKey& key, + bool decrypt); + + const QString errorString() const; bool allowUseOfSshKey() const; bool addAtDatabaseOpen() const; @@ -45,6 +61,7 @@ public: const QString attachmentName() const; bool saveAttachmentToTempFile() const; const QString fileName() const; + const QString fileNameEnvSubst(QProcessEnvironment environment = QProcessEnvironment::systemEnvironment()) const; void setAllowUseOfSshKey(bool allowUseOfSshKey); void setAddAtDatabaseOpen(bool addAtDatabaseOpen); @@ -74,6 +91,7 @@ private: QString m_attachmentName; bool m_saveAttachmentToTempFile; QString m_fileName; + QString m_error; }; #endif // KEEAGENTSETTINGS_H |