Sqlite3GroupManagerDb extends GroupManagerDb to implement the storage of data used by the GroupManager using SQLite3. More...
#include <sqlite3-group-manager-db.hpp>
Public Member Functions | |
| Sqlite3GroupManagerDb (const std::string &databaseFilePath) | |
| Create an Sqlite3GroupManagerDb to use the given SQLite3 file. More... | |
| virtual bool | hasSchedule (const std::string &name) |
| Check if there is a schedule with the given name. More... | |
| virtual void | listAllScheduleNames (std::vector< std::string > &nameList) |
| Append all the names of the schedules to the nameList. More... | |
| virtual ptr_lib::shared_ptr< Schedule > | getSchedule (const std::string &name) |
| Get a schedule with the given name. More... | |
| virtual void | getScheduleMembers (const std::string &name, std::map< Name, Blob > &memberMap) |
| For each member using the given schedule, get the name and public key DER of the member's key. More... | |
| virtual void | addSchedule (const std::string &name, const Schedule &schedule) |
| Add a schedule with the given name. More... | |
| virtual void | deleteSchedule (const std::string &name) |
| Delete the schedule with the given name. More... | |
| virtual void | renameSchedule (const std::string &oldName, const std::string &newName) |
| Rename a schedule with oldName to newName. More... | |
| virtual void | updateSchedule (const std::string &name, const Schedule &schedule) |
| Update the schedule with name and replace the old object with the given schedule. More... | |
| virtual bool | hasMember (const Name &identity) |
| Check if there is a member with the given identity name. More... | |
| virtual void | listAllMembers (std::vector< Name > &nameList) |
| Append all the members to the nameList. More... | |
| virtual std::string | getMemberSchedule (const Name &identity) |
| Get the name of the schedule for the given member's identity name. More... | |
| virtual void | addMember (const std::string &scheduleName, const Name &keyName, const Blob &key) |
| Add a new member with the given key named keyName into a schedule named scheduleName. More... | |
| virtual void | updateMemberSchedule (const Name &identity, const std::string &scheduleName) |
| Change the name of the schedule for the given member's identity name. More... | |
| virtual void | deleteMember (const Name &identity) |
| Delete a member with the given identity name. More... | |
Public Member Functions inherited from ndn::GroupManagerDb | |
| virtual | ~GroupManagerDb () |
| The virtual Destructor. | |
Sqlite3GroupManagerDb extends GroupManagerDb to implement the storage of data used by the GroupManager using SQLite3.
| ndn::Sqlite3GroupManagerDb::Sqlite3GroupManagerDb | ( | const std::string & | databaseFilePath | ) |
Create an Sqlite3GroupManagerDb to use the given SQLite3 file.
| databaseFilePath | The path of the SQLite file. |
|
virtual |
Add a new member with the given key named keyName into a schedule named scheduleName.
The member's identity name is keyName.getPrefix(-1).
| scheduleName | The schedule name. |
| keyName | The name of the key. |
| key | A Blob of the public key DER. |
| GroupManagerDb::Error | If there's no schedule named scheduleName, if the member's identity name already exists, or other database error. |
Implements ndn::GroupManagerDb.
|
virtual |
Add a schedule with the given name.
| name | The name of the schedule. The name cannot be empty. |
| schedule | The Schedule to add. |
| GroupManagerDb::Error | if a schedule with the same name already exists, if the name is empty, or other database error. |
Implements ndn::GroupManagerDb.
|
virtual |
Delete a member with the given identity name.
If there is no member with the identity name, then do nothing.
| identity | The member's identity name. |
| GroupManagerDb::Error | for a database error. |
Implements ndn::GroupManagerDb.
|
virtual |
Delete the schedule with the given name.
Also delete members which use this schedule. If there is no schedule with the name, then do nothing.
| name | The name of the schedule. |
| GroupManagerDb::Error | for a database error. |
Implements ndn::GroupManagerDb.
|
virtual |
Get the name of the schedule for the given member's identity name.
| identity | The member's identity name. |
| GroupManagerDb::Error | if there's no member with the given identity name in the database, or other database error. |
Implements ndn::GroupManagerDb.
|
virtual |
Get a schedule with the given name.
| name | The name of the schedule. |
| GroupManagerDb::Error | if the schedule does not exist or other database error. |
Implements ndn::GroupManagerDb.
|
virtual |
For each member using the given schedule, get the name and public key DER of the member's key.
| name | The name of the schedule. |
| memberMap | Put results in this map where the map's key is the Name of the public key and the value is the Blob of the public key DER. This first clears the map. Note that the member's identity name is keyName.getPrefix(-1). If the schedule name is not found, the map is empty. |
| GroupManagerDb::Error | for a database error. |
Implements ndn::GroupManagerDb.
|
virtual |
Check if there is a member with the given identity name.
| identity | The member's identity name. |
| GroupManagerDb::Error | for a database error. |
Implements ndn::GroupManagerDb.
|
virtual |
Check if there is a schedule with the given name.
| name | The name of the schedule. |
| GroupManagerDb::Error | for a database error. |
Implements ndn::GroupManagerDb.
|
virtual |
Append all the members to the nameList.
| nameList | Append result names to nameList. This first clears the list. |
| GroupManagerDb::Error | for a database error. |
Implements ndn::GroupManagerDb.
|
virtual |
Append all the names of the schedules to the nameList.
| nameList | Append result names to nameList. This first clears the list. |
| GroupManagerDb::Error | for a database error. |
Implements ndn::GroupManagerDb.
|
virtual |
Rename a schedule with oldName to newName.
| oldName | The name of the schedule to be renamed. |
| newName | The new name of the schedule. The name cannot be empty. |
| GroupManagerDb::Error | If a schedule with newName already exists, if the schedule with oldName does not exist, if newName is empty, or other database error. |
Implements ndn::GroupManagerDb.
|
virtual |
Change the name of the schedule for the given member's identity name.
| identity | The member's identity name. |
| scheduleName | The new schedule name. |
| GroupManagerDb::Error | if there's no member with the given identity name in the database, or there's no schedule named scheduleName, or other database error. |
Implements ndn::GroupManagerDb.
|
virtual |
Update the schedule with name and replace the old object with the given schedule.
Otherwise, if no schedule with name exists, a new schedule with name and the given schedule will be added to database.
| name | The name of the schedule. The name cannot be empty. |
| schedule | The Schedule to update or add. |
| GroupManagerDb::Error | if the name is empty, or other database error. |
Implements ndn::GroupManagerDb.
1.8.9.1