blob: 1f5af8600c1dd3bd4d4bafab7863966d3c1bd354 [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
Shuo Chen29c77fe2014-03-18 11:29:41 -070014class ReadHandle : public BaseHandle
Shuo Chen9c2477f2014-03-13 15:01:06 -070015{
16
17public:
Shuo Chen29c77fe2014-03-18 11:29:41 -070018 ReadHandle(Face& face, StorageHandle& storageHandle, KeyChain keyChain, Scheduler& scheduler)
19 : BaseHandle(face, storageHandle, keyChain, scheduler)
Shuo Chen9c2477f2014-03-13 15:01:06 -070020 {
21 }
22
23 virtual void
24 listen(const Name& prefix);
25
26private:
27 /**
Shuo Chen29c77fe2014-03-18 11:29:41 -070028 * @brief Read data from backend storage
Shuo Chen9c2477f2014-03-13 15:01:06 -070029 */
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