GroupManagerDb is an abstract base class for the storage of data used by the GroupManager.
More...
#include <group-manager-db.hpp>
|
|
virtual | ~GroupManagerDb () |
| | The virtual Destructor.
|
| |
| virtual bool | hasSchedule (const std::string &name)=0 |
| | Check if there is a schedule with the given name. More...
|
| |
| virtual void | listAllScheduleNames (std::vector< std::string > &nameList)=0 |
| | Append all the names of the schedules to the nameList. More...
|
| |
| virtual ptr_lib::shared_ptr< Schedule > | getSchedule (const std::string &name)=0 |
| | Get a schedule with the given name. More...
|
| |
| virtual void | getScheduleMembers (const std::string &name, std::map< Name, Blob > &memberMap)=0 |
| | 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)=0 |
| | Add a schedule with the given name. More...
|
| |
| virtual void | deleteSchedule (const std::string &name)=0 |
| | Delete the schedule with the given name. More...
|
| |
| virtual void | renameSchedule (const std::string &oldName, const std::string &newName)=0 |
| | Rename a schedule with oldName to newName. More...
|
| |
| virtual void | updateSchedule (const std::string &name, const Schedule &schedule)=0 |
| | Update the schedule with name and replace the old object with the given schedule. More...
|
| |
| virtual bool | hasMember (const Name &identity)=0 |
| | Check if there is a member with the given identity name. More...
|
| |
| virtual void | listAllMembers (std::vector< Name > &nameList)=0 |
| | Append all the members to the nameList. More...
|
| |
| virtual std::string | getMemberSchedule (const Name &identity)=0 |
| | 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)=0 |
| | 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)=0 |
| | Change the name of the schedule for the given member's identity name. More...
|
| |
| virtual void | deleteMember (const Name &identity)=0 |
| | Delete a member with the given identity name. More...
|
| |
GroupManagerDb is an abstract base class for the storage of data used by the GroupManager.
It contains two tables to store Schedules and Members. This is an abstract base class. A subclass must implement the methods. For example, see Sqlite3GroupManagerDb.
- Note
- This class is an experimental feature. The API may change.
| virtual void ndn::GroupManagerDb::addMember |
( |
const std::string & |
scheduleName, |
|
|
const Name & |
keyName, |
|
|
const Blob & |
key |
|
) |
| |
|
pure 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).
- Parameters
-
| scheduleName | The schedule name. |
| keyName | The name of the key. |
| key | A Blob of the public key DER. |
- Exceptions
-
| GroupManagerDb::Error | If there's no schedule named scheduleName, if the member's identity name already exists, or other database error. |
Implemented in ndn::Sqlite3GroupManagerDb.
| virtual void ndn::GroupManagerDb::addSchedule |
( |
const std::string & |
name, |
|
|
const Schedule & |
schedule |
|
) |
| |
|
pure virtual |
Add a schedule with the given name.
- Parameters
-
| name | The name of the schedule. The name cannot be empty. |
| schedule | The Schedule to add. |
- Exceptions
-
| GroupManagerDb::Error | if a schedule with the same name already exists, if the name is empty, or other database error. |
Implemented in ndn::Sqlite3GroupManagerDb.
| virtual void ndn::GroupManagerDb::deleteMember |
( |
const Name & |
identity | ) |
|
|
pure virtual |
Delete a member with the given identity name.
If there is no member with the identity name, then do nothing.
- Parameters
-
| identity | The member's identity name. |
- Exceptions
-
Implemented in ndn::Sqlite3GroupManagerDb.
| virtual void ndn::GroupManagerDb::deleteSchedule |
( |
const std::string & |
name | ) |
|
|
pure 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.
- Parameters
-
| name | The name of the schedule. |
- Exceptions
-
Implemented in ndn::Sqlite3GroupManagerDb.
| virtual std::string ndn::GroupManagerDb::getMemberSchedule |
( |
const Name & |
identity | ) |
|
|
pure virtual |
Get the name of the schedule for the given member's identity name.
- Parameters
-
| identity | The member's identity name. |
- Returns
- The name of the schedule.
- Exceptions
-
| GroupManagerDb::Error | if there's no member with the given identity name in the database, or other database error. |
Implemented in ndn::Sqlite3GroupManagerDb.
| virtual ptr_lib::shared_ptr<Schedule> ndn::GroupManagerDb::getSchedule |
( |
const std::string & |
name | ) |
|
|
pure virtual |
| virtual void ndn::GroupManagerDb::getScheduleMembers |
( |
const std::string & |
name, |
|
|
std::map< Name, Blob > & |
memberMap |
|
) |
| |
|
pure virtual |
For each member using the given schedule, get the name and public key DER of the member's key.
- Parameters
-
| 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. |
- Exceptions
-
Implemented in ndn::Sqlite3GroupManagerDb.
| virtual bool ndn::GroupManagerDb::hasMember |
( |
const Name & |
identity | ) |
|
|
pure virtual |
Check if there is a member with the given identity name.
- Parameters
-
| identity | The member's identity name. |
- Returns
- True if there is a member.
- Exceptions
-
Implemented in ndn::Sqlite3GroupManagerDb.
| virtual bool ndn::GroupManagerDb::hasSchedule |
( |
const std::string & |
name | ) |
|
|
pure virtual |
Check if there is a schedule with the given name.
- Parameters
-
| name | The name of the schedule. |
- Returns
- True if there is a schedule.
- Exceptions
-
Implemented in ndn::Sqlite3GroupManagerDb.
| virtual void ndn::GroupManagerDb::listAllMembers |
( |
std::vector< Name > & |
nameList | ) |
|
|
pure virtual |
Append all the members to the nameList.
- Parameters
-
| nameList | Append result names to nameList. This first clears the list. |
- Exceptions
-
Implemented in ndn::Sqlite3GroupManagerDb.
| virtual void ndn::GroupManagerDb::listAllScheduleNames |
( |
std::vector< std::string > & |
nameList | ) |
|
|
pure virtual |
Append all the names of the schedules to the nameList.
- Parameters
-
| nameList | Append result names to nameList. This first clears the list. |
- Exceptions
-
Implemented in ndn::Sqlite3GroupManagerDb.
| virtual void ndn::GroupManagerDb::renameSchedule |
( |
const std::string & |
oldName, |
|
|
const std::string & |
newName |
|
) |
| |
|
pure virtual |
Rename a schedule with oldName to newName.
- Parameters
-
| oldName | The name of the schedule to be renamed. |
| newName | The new name of the schedule. The name cannot be empty. |
- Exceptions
-
| 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. |
Implemented in ndn::Sqlite3GroupManagerDb.
| virtual void ndn::GroupManagerDb::updateMemberSchedule |
( |
const Name & |
identity, |
|
|
const std::string & |
scheduleName |
|
) |
| |
|
pure virtual |
Change the name of the schedule for the given member's identity name.
- Parameters
-
| identity | The member's identity name. |
| scheduleName | The new schedule name. |
- Exceptions
-
| 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. |
Implemented in ndn::Sqlite3GroupManagerDb.
| virtual void ndn::GroupManagerDb::updateSchedule |
( |
const std::string & |
name, |
|
|
const Schedule & |
schedule |
|
) |
| |
|
pure 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.
- Parameters
-
| name | The name of the schedule. The name cannot be empty. |
| schedule | The Schedule to update or add. |
- Exceptions
-
Implemented in ndn::Sqlite3GroupManagerDb.
The documentation for this class was generated from the following files: