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

Sqlite3ConsumerDb extends ConsumerDb to implement the storage of decryption keys for the consumer using SQLite3. More...

#include <sqlite3-consumer-db.hpp>

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

Public Member Functions

 Sqlite3ConsumerDb (const std::string &databaseFilePath)
 Create an Sqlite3ConsumerDb to use the given SQLite3 file. More...
 
virtual Blob getKey (const Name &keyName)
 Get the key with keyName from the database. More...
 
virtual void addKey (const Name &keyName, const Blob &keyBlob)
 Add the key with keyName and keyBlob to the database. More...
 
virtual void deleteKey (const Name &keyName)
 Delete the key with keyName from the database. More...
 
- Public Member Functions inherited from ndn::ConsumerDb
virtual ~ConsumerDb ()
 The virtual Destructor.
 

Detailed Description

Sqlite3ConsumerDb extends ConsumerDb to implement the storage of decryption keys for the consumer using SQLite3.

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

Constructor & Destructor Documentation

ndn::Sqlite3ConsumerDb::Sqlite3ConsumerDb ( const std::string &  databaseFilePath)

Create an Sqlite3ConsumerDb to use the given SQLite3 file.

Parameters
databaseFilePathThe path of the SQLite file.

Member Function Documentation

virtual void ndn::Sqlite3ConsumerDb::addKey ( const Name keyName,
const Blob keyBlob 
)
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.

Implements ndn::ConsumerDb.

virtual void ndn::Sqlite3ConsumerDb::deleteKey ( const Name keyName)
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.

Implements ndn::ConsumerDb.

virtual Blob ndn::Sqlite3ConsumerDb::getKey ( const Name keyName)
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.

Implements ndn::ConsumerDb.


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