blob: 97df13750b16bc483b5513daefd965c3bada265f [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_BASE_HANDLE_HPP
8#define REPO_NDN_HANDLE_BASE_HANDLE_HPP
9
10#include "ndn-handle-common.hpp"
11
12namespace repo {
13
14class BaseHandle : noncopyable
15{
16
17public:
18 BaseHandle(Face* face, StorageHandle* storageHandle)
19 : m_face(face)
20 , m_storageHandle(storageHandle)
21 {
22 }
23
24 virtual void
25 listen(const Name& prefix) = 0;
26
27 inline Face*
28 getFace()
29 {
30 return m_face;
31 }
32
33 inline StorageHandle*
34 getStorageHandle()
35 {
36 return m_storageHandle;
37 }
38
39private:
40 Face* m_face;
41 StorageHandle* m_storageHandle;
42};
43
44} //namespace repo
45
46#endif // REPO_NDN_HANDLE_BASE_HANDLE_HPP