kabc Library API Documentation

KABC::Key Class Reference

A class to store an encryption key. More...

#include <key.h>

List of all members.

Public Types

enum  Types
 Key types. More...


Public Methods

 Key (const QString &text=QString::null, int type=PGP)
 Constructor.

 ~Key ()
 Destructor.

void setId (const QString &id)
 Sets the unique identifier.

QString id () const
 Returns the unique identifier.

void setBinaryData (const QByteArray &binary)
 Sets binary data.

QByteArray binaryData () const
 Returns the binary data.

void setTextData (const QString &text)
 Sets text data.

QString textData () const
 Returns the text data.

bool isBinary () const
 Returns whether the key contains binary or text data.

void setType (int type)
 Sets the type,.

void setCustomTypeString (const QString &custom)
 Sets custom type string.

int type () const
 Returns the type,.

QString customTypeString () const
 Returns the custom type string.


Static Public Methods

TypeList typeList ()
 Returns a list of all available key types.

QString typeLabel (int type)
 Returns a translated label for a given key type.


Detailed Description

A class to store an encryption key.

Definition at line 31 of file key.h.


Member Enumeration Documentation

enum KABC::Key::Types
 

Key types.

  • X509 - X509 key
  • PGP - Pretty Good Privacy key
  • Custom - Custom or IANA conform key

Definition at line 47 of file key.h.


Constructor & Destructor Documentation

Key::Key const QString   text = QString::null,
int    type = PGP
 

Constructor.

Parameters:
text  The text data.
type  The key type,
See also:
Types.

Definition at line 28 of file key.cpp.

References KApplication::randomString().

Key::~Key  
 

Destructor.

Definition at line 34 of file key.cpp.


Member Function Documentation

void Key::setId const QString   id
 

Sets the unique identifier.

Definition at line 56 of file key.cpp.

QString Key::id  
 

Returns the unique identifier.

Definition at line 61 of file key.cpp.

Referenced by KABC::Addressee::insertKey(), and KABC::Addressee::removeKey().

void Key::setBinaryData const QByteArray   binary
 

Sets binary data.

Definition at line 66 of file key.cpp.

QByteArray Key::binaryData  
 

Returns the binary data.

Definition at line 72 of file key.cpp.

void Key::setTextData const QString   text
 

Sets text data.

Definition at line 77 of file key.cpp.

QString Key::textData  
 

Returns the text data.

Definition at line 83 of file key.cpp.

bool Key::isBinary  
 

Returns whether the key contains binary or text data.

Definition at line 88 of file key.cpp.

void Key::setType int    type
 

Sets the type,.

See also:
Type.

Definition at line 93 of file key.cpp.

References type().

void Key::setCustomTypeString const QString   custom
 

Sets custom type string.

Definition at line 98 of file key.cpp.

int Key::type  
 

Returns the type,.

See also:
Type.

Definition at line 103 of file key.cpp.

Referenced by setType().

QString Key::customTypeString  
 

Returns the custom type string.

Definition at line 108 of file key.cpp.

Key::TypeList Key::typeList   [static]
 

Returns a list of all available key types.

Definition at line 113 of file key.cpp.

QString Key::typeLabel int    type [static]
 

Returns a translated label for a given key type.

Definition at line 123 of file key.cpp.


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kdelibs Version 3.1.0.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Oct 8 12:22:09 2003 by doxygen 1.2.18 written by Dimitri van Heesch, © 1997-2001