All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Pages
Classes | Public Member Functions | List of all members
ndn::ConsumerDb Class Referenceabstract

ConsumerDb is an abstract base class the storage of decryption keys for the consumer. More...

#include <consumer-db.hpp>

Inheritance diagram for ndn::ConsumerDb:
ndn::Sqlite3ConsumerDb

Classes

class  Error
 ConsumerDb::Error extends std::exception for errors using ConsumerDb methods. More...
 

Public Member Functions

virtual ~ConsumerDb ()
 The virtual Destructor.
 
virtual Blob getKey (const Name &keyName)=0
 Get the key with keyName from the database. More...
 
virtual void addKey (const Name &keyName, const Blob &keyBlob)=0
 Add the key with keyName and keyBlob to the database. More...
 
virtual void deleteKey (const Name &keyName)=0
 Delete the key with keyName from the database. More...
 

Detailed Description

ConsumerDb is an abstract base class the storage of decryption keys for the consumer.

A subclass must implement the methods. For example, see Sqlite3ConsumerDb.

Note
This class is an experimental feature. The API may change.

Member Function Documentation

virtual void ndn::ConsumerDb::addKey ( const Name keyName,
const Blob keyBlob 
)
pure virtual

Add the key with keyName and keyBlob to the database.

Parameters
keyNameThe key name.
keyBlobThe encoded key.
Exceptions
ConsumerDb::Errorif a key with the same keyName already exists in the database, or other database error.

Implemented in ndn::Sqlite3ConsumerDb.

virtual void ndn::ConsumerDb::deleteKey ( const Name keyName)
pure virtual

Delete the key with keyName from the database.

If there is no key with keyName, do nothing.

Parameters
keyNameThe key name.
Exceptions
ConsumerDb::Errorfor a database error.

Implemented in ndn::Sqlite3ConsumerDb.

virtual Blob ndn::ConsumerDb::getKey ( const Name keyName)
pure virtual

Get the key with keyName from the database.

Parameters
keyNameThe key name.
Returns
A Blob with the encoded key, or an isNull Blob if cannot find the key with keyName.
Exceptions
ConsumerDb::Errorfor a database error.

Implemented in ndn::Sqlite3ConsumerDb.


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