blob: 5af1fb3a91b3ea0932bc0dc1600b04c33a9cc768 [file] [log] [blame]
Shuo Chen9c2477f2014-03-13 15:01:06 -07001/* -*- 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
12namespace repo {
13
14class ReadHandle : BaseHandle
15{
16
17public:
18 ReadHandle(Face* face, StorageHandle* storageHandle)
19 : BaseHandle(face, storageHandle)
20 {
21 }
22
23 virtual void
24 listen(const Name& prefix);
25
26private:
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