LeechCraft Azoth  0.6.70-3565-g2d86529
Modular multiprotocol IM plugin for LeechCraft
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator
LeechCraft::Azoth::ISupportPGP Class Referenceabstract

Interface for accounts supporting PGP encryption. More...

#include "isupportpgp.h"

Public Member Functions

virtual ~ISupportPGP ()
 
virtual void SetPrivateKey (const QCA::PGPKey &key)=0
 Sets the private key for the account. More...
 
virtual QCA::PGPKey GetPrivateKey () const =0
 Returns the private key for the account, if any. More...
 
virtual void SetEntryKey (QObject *entry, const QCA::PGPKey &pubKey)=0
 Sets the public key for the given entry. More...
 
virtual QCA::PGPKey GetEntryKey (QObject *entry) const =0
 Returns the public key for the given entry, if any. More...
 
virtual void SetEncryptionEnabled (QObject *entry, bool enabled)=0
 Enables or disables encryption for the given entry. More...
 
virtual void signatureVerified (QObject *entry, bool successful)=0
 Notifies whether signature has been verified for the given entry. More...
 
virtual void encryptionStateChanged (QObject *entry, bool enabled)=0
 Notifies that encryption state has changed for the given entry. More...
 

Detailed Description

Interface for accounts supporting PGP encryption.

This interface should be implemented by accounts which support PGP encryption, only if ENABLE_CRYPT compile-time option is enabled.

See Also
IAccount

Definition at line 47 of file isupportpgp.h.

Constructor & Destructor Documentation

virtual LeechCraft::Azoth::ISupportPGP::~ISupportPGP ( )
inlinevirtual

Definition at line 50 of file isupportpgp.h.

Member Function Documentation

virtual void LeechCraft::Azoth::ISupportPGP::encryptionStateChanged ( QObject *  entry,
bool  enabled 
)
pure virtual

Notifies that encryption state has changed for the given entry.

This signal should be emitted whenever encryption state changes for the given entry, even as the result of SetEncryptionEnabled() call.

Parameters
[out]entryThe entry for which encryption state has changed.
[out]enabledWhether encryption has been enabled or disabled.
virtual QCA::PGPKey LeechCraft::Azoth::ISupportPGP::GetEntryKey ( QObject *  entry) const
pure virtual

Returns the public key for the given entry, if any.

If there is no public key for the entry, an empty key should be returned.

Parameters
[in]entryThe entry for which to return the public key.
Returns
The public key for the given entry, if any.
virtual QCA::PGPKey LeechCraft::Azoth::ISupportPGP::GetPrivateKey ( ) const
pure virtual

Returns the private key for the account, if any.

Returns
Private key for the account, or an empty key if no key has been set.
virtual void LeechCraft::Azoth::ISupportPGP::SetEncryptionEnabled ( QObject *  entry,
bool  enabled 
)
pure virtual

Enables or disables encryption for the given entry.

If the encryption has been enabled successfully, the encryptionStateChanged() should be emitted afterwards.

Parameters
[in]entryThe entry for which to toggle the encryption.
[in]enabledWhether encryption should be enabled.
virtual void LeechCraft::Azoth::ISupportPGP::SetEntryKey ( QObject *  entry,
const QCA::PGPKey &  pubKey 
)
pure virtual

Sets the public key for the given entry.

Parameters
[in]entryThe entry for which to set the public key.
[in]pubKeyThe public key to set.
virtual void LeechCraft::Azoth::ISupportPGP::SetPrivateKey ( const QCA::PGPKey &  key)
pure virtual

Sets the private key for the account.

Parameters
[in]keyThe private key for the account.
virtual void LeechCraft::Azoth::ISupportPGP::signatureVerified ( QObject *  entry,
bool  successful 
)
pure virtual

Notifies whether signature has been verified for the given entry.

This signal should be emitted whenever protocol receives a PGP signature from the given entry, no matter if that signature is valid or not. If the signature is valid, successful should be set to true, otherwise it should be false, but the signal still has to be emitted.

Note
This function is expected to be a signal.
Parameters
[out]entryThe entry for which signature has been attempted to be verified.
[out]successfulWhether verification was successful.

The documentation for this class was generated from the following file: