LeechCraft Azoth
0.6.70-18450-gabe19ee3b0
Modular multiprotocol IM plugin for LeechCraft
Toggle main menu visibility
Loading...
Searching...
No Matches
isupportpgp.h
Go to the documentation of this file.
1
/**********************************************************************
2
* LeechCraft - modular cross-platform feature rich internet client.
3
* Copyright (C) 2006-2014 Georg Rudoy
4
*
5
* Distributed under the Boost Software License, Version 1.0.
6
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7
**********************************************************************/
8
9
#pragma once
10
11
#include <QtGlobal>
12
#include <QtCrypto>
13
#include "
gpgexceptions.h
"
14
15
namespace
LC
16
{
17
namespace
Azoth
18
{
27
class
ISupportPGP
28
{
29
protected
:
30
virtual
~ISupportPGP
() =
default
;
31
public
:
36
virtual
void
SetPrivateKey
(
const
QCA::PGPKey& key) = 0;
37
43
virtual
QCA::PGPKey
GetPrivateKey
()
const
= 0;
44
50
virtual
void
SetEntryKey
(QObject *entry,
const
QCA::PGPKey& pubKey) = 0;
51
60
virtual
QCA::PGPKey
GetEntryKey
(QObject *entry)
const
= 0;
61
72
virtual
GPGExceptions::MaybeException_t
SetEncryptionEnabled
(QObject *entry,
bool
enabled) = 0;
73
84
virtual
bool
IsEncryptionEnabled
(QObject *entry)
const
= 0;
85
protected
:
101
virtual
void
signatureVerified
(QObject *entry,
bool
successful) = 0;
102
118
virtual
void
encryptionStateChanged
(QObject *entry,
bool
enabled) = 0;
119
};
120
}
121
}
122
123
Q_DECLARE_INTERFACE (
LC::Azoth::ISupportPGP
,
124
"org.Deviant.LeechCraft.Azoth.ISupportPGP/1.0"
)
LC::Azoth::ISupportPGP
Interface for accounts supporting PGP encryption.
Definition
isupportpgp.h:28
LC::Azoth::ISupportPGP::GetEntryKey
virtual QCA::PGPKey GetEntryKey(QObject *entry) const =0
Returns the public key for the given entry, if any.
LC::Azoth::ISupportPGP::encryptionStateChanged
virtual void encryptionStateChanged(QObject *entry, bool enabled)=0
Notifies that encryption state has changed for the given entry.
LC::Azoth::ISupportPGP::GetPrivateKey
virtual QCA::PGPKey GetPrivateKey() const =0
Returns the private key for the account, if any.
LC::Azoth::ISupportPGP::~ISupportPGP
virtual ~ISupportPGP()=default
LC::Azoth::ISupportPGP::SetEncryptionEnabled
virtual GPGExceptions::MaybeException_t SetEncryptionEnabled(QObject *entry, bool enabled)=0
Enables or disables encryption for the entry.
LC::Azoth::ISupportPGP::IsEncryptionEnabled
virtual bool IsEncryptionEnabled(QObject *entry) const =0
Checks if the encryption is enabled for the entry.
LC::Azoth::ISupportPGP::SetEntryKey
virtual void SetEntryKey(QObject *entry, const QCA::PGPKey &pubKey)=0
Sets the public key for the given entry.
LC::Azoth::ISupportPGP::signatureVerified
virtual void signatureVerified(QObject *entry, bool successful)=0
Notifies whether signature has been verified for the given entry.
LC::Azoth::ISupportPGP::SetPrivateKey
virtual void SetPrivateKey(const QCA::PGPKey &key)=0
Sets the private key for the account.
gpgexceptions.h
LC::Azoth::GPGExceptions::MaybeException_t
std::optional< AnyException_t > MaybeException_t
A type representing a possibility of a GPG-related error.
Definition
gpgexceptions.h:148
LC::Azoth
Definition
activityinfo.h:16
LC
Definition
activityinfo.h:14
src
plugins
azoth
interfaces
azoth
isupportpgp.h
Generated by
1.17.0