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_BASE_HANDLE_HPP |
| 8 | #define REPO_NDN_HANDLE_BASE_HANDLE_HPP |
| 9 | |
| 10 | #include "ndn-handle-common.hpp" |
| 11 | |
| 12 | namespace repo { |
| 13 | |
| 14 | class BaseHandle : noncopyable |
| 15 | { |
| 16 | |
| 17 | public: |
| 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 | |
| 39 | private: |
| 40 | Face* m_face; |
| 41 | StorageHandle* m_storageHandle; |
| 42 | }; |
| 43 | |
| 44 | } //namespace repo |
| 45 | |
| 46 | #endif // REPO_NDN_HANDLE_BASE_HANDLE_HPP |