Jeff Thompson | f309aa6 | 2013-10-31 17:03:54 -0700 | [diff] [blame] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */ |
| 2 | /** |
| 3 | * Copyright (C) 2013 Regents of the University of California. |
| 4 | * @author: Yingdi Yu <yingdi@cs.ucla.edu> |
| 5 | * @author: Jeff Thompson <jefft0@remap.ucla.edu> |
| 6 | * See COPYING for copyright and distribution information. |
| 7 | */ |
| 8 | |
| 9 | #ifndef NDN_VALIDATION_REQUEST_HPP |
| 10 | #define NDN_VALIDATION_REQUEST_HPP |
| 11 | |
| 12 | #include <ndn-cpp/security/key-chain.hpp> |
| 13 | |
| 14 | namespace ndn { |
| 15 | |
| 16 | class ValidationRequest { |
| 17 | public: |
| 18 | ValidationRequest |
| 19 | (const ptr_lib::shared_ptr<Interest> &interest, const OnVerified& onVerified, const OnVerifyFailed& onVerifyFailed, |
| 20 | const int& retry, const int& stepCount) |
| 21 | : interest_(interest), onVerified_(onVerified), onVerifyFailed_(onVerifyFailed), retry_(retry), stepCount_(stepCount) |
| 22 | { |
| 23 | } |
| 24 | |
| 25 | virtual |
| 26 | ~ValidationRequest() {} |
| 27 | |
| 28 | ptr_lib::shared_ptr<Interest> interest_; // An interest packet to fetch the requested data. |
| 29 | OnVerified onVerified_; // A callback function if the requested certificate has been validated. |
| 30 | OnVerifyFailed onVerifyFailed_; // A callback function if the requested certificate cannot be validated. |
| 31 | int retry_; // The number of retrials when there is an interest timeout. |
| 32 | int stepCount_; |
| 33 | }; |
| 34 | |
| 35 | } |
| 36 | |
| 37 | #endif |