23 #ifndef NDN_GROUP_MANAGER_DB_HPP
24 #define NDN_GROUP_MANAGER_DB_HPP
27 #include "../name.hpp"
28 #include "schedule.hpp"
45 class Error :
public std::exception {
47 Error(
const std::string& errorMessage)
throw();
49 virtual ~
Error()
throw();
52 Msg()
const {
return errorMessage_; }
58 const std::string errorMessage_;
93 virtual ptr_lib::shared_ptr<Schedule>
108 (
const std::string& name, std::map<Name, Blob>& memberMap) = 0;
138 renameSchedule(
const std::string& oldName,
const std::string& newName) = 0;
191 (
const std::string& scheduleName,
const Name& keyName,
const Blob& key) = 0;
virtual std::string getMemberSchedule(const Name &identity)=0
Get the name of the schedule for the given member's identity name.
virtual bool hasMember(const Name &identity)=0
Check if there is a member with the given identity name.
Copyright (C) 2013-2016 Regents of the University of California.
Definition: common.hpp:36
virtual void updateMemberSchedule(const Name &identity, const std::string &scheduleName)=0
Change the name of the schedule for the given member's identity name.
virtual void deleteMember(const Name &identity)=0
Delete a member with the given identity name.
GroupManagerDb is an abstract base class for the storage of data used by the GroupManager.
Definition: group-manager-db.hpp:39
Schedule is used to manage the times when a member can access data using two sets of RepetitiveInterv...
Definition: schedule.hpp:43
virtual void renameSchedule(const std::string &oldName, const std::string &newName)=0
Rename a schedule with oldName to newName.
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. ...
virtual void addSchedule(const std::string &name, const Schedule &schedule)=0
Add a schedule with the given name.
GroupManagerDb::Error extends std::exception for errors using GroupManagerDb methods.
Definition: group-manager-db.hpp:45
A Name holds an array of Name::Component and represents an NDN name.
Definition: name.hpp:40
A Blob holds a pointer to an immutable byte array implemented as const std::vector.
Definition: blob.hpp:42
virtual ptr_lib::shared_ptr< Schedule > getSchedule(const std::string &name)=0
Get a schedule with the given name.
virtual void deleteSchedule(const std::string &name)=0
Delete the schedule with the given name.
virtual ~GroupManagerDb()
The virtual Destructor.
Definition: group-manager-db.cpp:41
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...
virtual void listAllScheduleNames(std::vector< std::string > &nameList)=0
Append all the names of the schedules to the nameList.
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.
virtual void listAllMembers(std::vector< Name > &nameList)=0
Append all the members to the nameList.
virtual bool hasSchedule(const std::string &name)=0
Check if there is a schedule with the given name.