Shuo Chen | 9c2477f | 2014-03-13 15:01:06 -0700 | [diff] [blame^] | 1 | /* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */ |
| 2 | /** |
| 3 | * Copyright (C) 2014 Regents of the University of California. |
| 4 | * See COPYING for copyright and distribution information. |
| 5 | */ |
| 6 | |
| 7 | #ifndef REPO_NDN_HANDLE_READ_HANDLE_HPP |
| 8 | #define REPO_NDN_HANDLE_READ_HANDLE_HPP |
| 9 | |
| 10 | #include "base-handle.hpp" |
| 11 | |
| 12 | namespace repo { |
| 13 | |
| 14 | class ReadHandle : BaseHandle |
| 15 | { |
| 16 | |
| 17 | public: |
| 18 | ReadHandle(Face* face, StorageHandle* storageHandle) |
| 19 | : BaseHandle(face, storageHandle) |
| 20 | { |
| 21 | } |
| 22 | |
| 23 | virtual void |
| 24 | listen(const Name& prefix); |
| 25 | |
| 26 | private: |
| 27 | /** |
| 28 | * @brief Read the name from backend storage |
| 29 | */ |
| 30 | void |
| 31 | onInterest(const Name& prefix, const Interest& interest); |
| 32 | |
| 33 | void |
| 34 | onRegisterFailed(const Name& prefix, const std::string& reason); |
| 35 | }; |
| 36 | |
| 37 | } //namespace repo |
| 38 | |
| 39 | #endif // REPO_NDN_HANDLE_READ_HANDLE_HPP |