validation-request.hpp
1 /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
23 #ifndef NDN_VALIDATION_REQUEST_HPP
24 #define NDN_VALIDATION_REQUEST_HPP
25 
26 #include "../key-chain.hpp"
27 
28 namespace ndn {
29 
33 typedef func_lib::function<void(const ptr_lib::shared_ptr<Data>& data)> OnVerified;
34 
38 typedef func_lib::function<void(const ptr_lib::shared_ptr<Data>& data)> OnVerifyFailed;
39 
44 typedef func_lib::function<void(const ptr_lib::shared_ptr<Interest>& interest)>
46 
51 typedef func_lib::function<void(const ptr_lib::shared_ptr<Interest>& interest)>
53 
55 public:
57  (const ptr_lib::shared_ptr<Interest> &interest, const OnVerified& onVerified, const OnVerifyFailed& onVerifyFailed,
58  int retry, int stepCount)
59  : interest_(interest), onVerified_(onVerified), onVerifyFailed_(onVerifyFailed), retry_(retry), stepCount_(stepCount)
60  {
61  }
62 
63  virtual
64  ~ValidationRequest() {}
65 
66  ptr_lib::shared_ptr<Interest> interest_; // An interest packet to fetch the requested data.
67  OnVerified onVerified_; // A callback function if the requested certificate has been validated.
68  OnVerifyFailed onVerifyFailed_; // A callback function if the requested certificate cannot be validated.
69  int retry_; // The number of retrials when there is an interest timeout.
70  int stepCount_;
71 };
72 
73 }
74 
75 #endif
func_lib::function< void(const ptr_lib::shared_ptr< Interest > &interest)> OnVerifyInterestFailed
An OnVerifyInterestFailed function object is used to pass a callback to verifyInterest to report a fa...
Definition: validation-request.hpp:52
Copyright (C) 2013-2016 Regents of the University of California.
Definition: common.hpp:35
func_lib::function< void(const ptr_lib::shared_ptr< Interest > &interest)> OnVerifiedInterest
An OnVerifiedInterest function object is used to pass a callback to verifyInterest to report a succes...
Definition: validation-request.hpp:45
func_lib::function< void(const ptr_lib::shared_ptr< Data > &data)> OnVerified
An OnVerified function object is used to pass a callback to verifyData to report a successful verific...
Definition: validation-request.hpp:33
func_lib::function< void(const ptr_lib::shared_ptr< Data > &data)> OnVerifyFailed
An OnVerifyFailed function object is used to pass a callback to verifyData to report a failed verific...
Definition: validation-request.hpp:38
Definition: validation-request.hpp:54