23 #ifndef NDN_PRODUCER_DB_HPP
24 #define NDN_PRODUCER_DB_HPP
26 #include "../util/blob.hpp"
43 class Error :
public std::exception {
45 Error(
const std::string& errorMessage)
throw();
47 virtual ~
Error()
throw();
50 Msg()
const {
return errorMessage_; }
56 const std::string errorMessage_;
Copyright (C) 2013-2016 Regents of the University of California.
Definition: common.hpp:36
virtual void addContentKey(MillisecondsSince1970 timeSlot, const Blob &key)=0
Add key as the content key for the hour covering timeSlot.
virtual ~ProducerDb()
The virtual Destructor.
Definition: producer-db.cpp:43
virtual Blob getContentKey(MillisecondsSince1970 timeSlot)=0
Get the content key for the hour covering timeSlot.
A Blob holds a pointer to an immutable byte array implemented as const std::vector.
Definition: blob.hpp:42
virtual bool hasContentKey(MillisecondsSince1970 timeSlot)=0
Check if a content key exists for the hour covering timeSlot.
static int getFixedTimeSlot(MillisecondsSince1970 timeSlot)
Get the hour-based time slot.
Definition: producer-db.cpp:46
double MillisecondsSince1970
The calendar time represented as the number of milliseconds since 1/1/1970.
Definition: common.hpp:117
ProducerDb is an abstract base class for the storage of keys for the producer.
Definition: producer-db.hpp:37
virtual void deleteContentKey(MillisecondsSince1970 timeSlot)=0
Delete the content key for the hour covering timeSlot.
ProducerDb::Error extends std::exception for errors using ProducerDb methods.
Definition: producer-db.hpp:43