signature.hpp
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
22 #ifndef NDN_SIGNATURE_HPP
23 #define NDN_SIGNATURE_HPP
24 
25 #include "common.hpp"
26 #include "util/blob.hpp"
27 
28 struct ndn_Signature;
29 
30 namespace ndn {
31 
36 class Signature {
37 public:
41  virtual
42  ~Signature();
43 
48  virtual ptr_lib::shared_ptr<Signature>
49  clone() const = 0;
50 
55  virtual const Blob&
56  getSignature() const = 0;
57 
62  virtual void
63  setSignature(const Blob& signature) = 0;
64 
71  virtual void
72  get(struct ndn_Signature& signatureStruct) const = 0;
73 
79  virtual void
80  set(const struct ndn_Signature& signatureStruct) = 0;
81 
86  virtual uint64_t
87  getChangeCount() const = 0;
88 };
89 
90 }
91 
92 #endif
Copyright (C) 2013-2015 Regents of the University of California.
Definition: common.hpp:35
virtual const Blob & getSignature() const =0
Get the signature bytes.
virtual void setSignature(const Blob &signature)=0
Set the signature bytes to the given value.
virtual uint64_t getChangeCount() const =0
Get the change count, which is incremented each time this object (or a child object) is changed...
A Signature is an abstract base class providing methods to work with the signature information in a D...
Definition: signature.hpp:36
A Blob holds a pointer to an immutable byte array implemented as const std::vector.
Definition: blob.hpp:42
virtual ~Signature()
The virtual destructor.
Definition: signature.cpp:28
virtual ptr_lib::shared_ptr< Signature > clone() const =0
Return a pointer to a new Signature which is a copy of this signature.
virtual void set(const struct ndn_Signature &signatureStruct)=0
Clear this signature, and set the values by copying from the ndn_Signature struct.
An ndn_Signature struct holds the signature bits and other info representing the signature in a data ...
Definition: data-types.h:64