Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

PkgPubkeyCache Class Reference

Manage gpg-pubkeys (package singning keys). More...

#include <PkgPubkeyCache.h>

List of all members.

Public Types

typedef InstSrcError Error

Public Member Functions

 PkgPubkeyCache ()
 PkgPubkeyCache (const Pathname &cachedir_r)
 ~PkgPubkeyCache ()
const Pathnamecachedir () const
bool cacheDisabled () const
bool hasKey (const std::string &keyname_r) const
bool hasKey (const Pathname &keyfile_r) const
PMError setCachedir (const Pathname &cachedir_r)
PMError storeKey (const Pathname &keyfile_r)
PMError sync ()
PMError cacheCopyTo (const Pathname &newcachedir_r)

Static Public Member Functions

bool isKey (const std::string &keyname_r)
bool isKey (const Pathname &keyfile_r)
std::string keyEdition (const std::string &keyname_r)
std::string keyEdition (const Pathname &keyfile_r)

Private Member Functions

PkgPubkeyCacheoperator= (const PkgPubkeyCache &)
 PkgPubkeyCache (const PkgPubkeyCache &)

Private Attributes

Pathname _cachedir

Static Private Attributes

const std::string _prefix
const std::string _ext

Friends

std::ostream & operator<< (std::ostream &str, const PkgPubkeyCache &obj)


Detailed Description

Manage gpg-pubkeys (package singning keys).

Store ascii armored package singning keys and import then into the RPM database on sync.

The name of a keyfile must match gpg-pubkey--.asc, with - as it will appear in the RPM database after import.


Member Typedef Documentation

typedef InstSrcError PkgPubkeyCache::Error
 

default error class


Constructor & Destructor Documentation

PkgPubkeyCache::PkgPubkeyCache const PkgPubkeyCache  )  [private]
 

PkgPubkeyCache::PkgPubkeyCache  )  [inline]
 

Constructor (no chache)

PkgPubkeyCache::PkgPubkeyCache const Pathname cachedir_r  ) 
 

Constructor (use cachedir_r)

PkgPubkeyCache::~PkgPubkeyCache  ) 
 

Destructor


Member Function Documentation

PMError PkgPubkeyCache::cacheCopyTo const Pathname newcachedir_r  ) 
 

Copy cache content into newcachedir_r.

const Pathname& PkgPubkeyCache::cachedir  )  const [inline]
 

Returns:
The cache dir, or an empty path if disabled.

bool PkgPubkeyCache::cacheDisabled  )  const [inline]
 

Returns:
Whether the cache is disabled (no cachedir set).

bool PkgPubkeyCache::hasKey const Pathname keyfile_r  )  const [inline]
 

Returns:
True if the key denoted by keyfile_r is in the cache.

bool PkgPubkeyCache::hasKey const std::string &  keyname_r  )  const
 

Returns:
True if the key denoted by keyname_r is in the cache. keyname_r must match eiter 'gpg-pubkey--.asc' or '-'.

bool PkgPubkeyCache::isKey const Pathname keyfile_r  )  [inline, static]
 

Returns:
True if basename of keyfile_r matches 'gpg-pubkey--.asc'

bool PkgPubkeyCache::isKey const std::string &  keyname_r  )  [static]
 

Returns:
True if keyname_r matches 'gpg-pubkey--.asc'

std::string PkgPubkeyCache::keyEdition const Pathname keyfile_r  )  [inline, static]
 

Returns:
The '-' part of the key denoted by keyfile_r, or an empty string if it's no keyname.

std::string PkgPubkeyCache::keyEdition const std::string &  keyname_r  )  [static]
 

Returns:
The '-' part of keyname_r, or an empty string if it's no keyname.

PkgPubkeyCache& PkgPubkeyCache::operator= const PkgPubkeyCache  )  [private]
 

PMError PkgPubkeyCache::setCachedir const Pathname cachedir_r  ) 
 

Set the cachedir to use. It will be created if necessary.

PMError PkgPubkeyCache::storeKey const Pathname keyfile_r  ) 
 

Store the key denoted by keyfile_r in the cache.

PMError PkgPubkeyCache::sync  ) 
 

Take care that all stored keys are imported into the targets rpm database.


Friends And Related Function Documentation

std::ostream& operator<< std::ostream &  str,
const PkgPubkeyCache obj
[friend]
 


Member Data Documentation

Pathname PkgPubkeyCache::_cachedir [private]
 

const string PkgPubkeyCache::_ext [static, private]
 

const string PkgPubkeyCache::_prefix [static, private]
 


The documentation for this class was generated from the following files:
Generated on Fri Nov 9 14:30:32 2007 for yast2-packagemanager by doxygen 1.3.6