Chengyu Fan | b25835b | 2015-04-28 17:09:35 -0600 | [diff] [blame^] | 1 | /** NDN-Atmos: Cataloging Service for distributed data originally developed |
| 2 | * for atmospheric science data |
| 3 | * Copyright (C) 2015 Colorado State University |
| 4 | * |
| 5 | * NDN-Atmos is free software: you can redistribute it and/or modify |
| 6 | * it under the terms of the GNU General Public License as published by |
| 7 | * the Free Software Foundation, either version 3 of the License, or |
| 8 | * (at your option) any later version. |
| 9 | * |
| 10 | * NDN-Atmos is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | * GNU General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with NDN-Atmos. If not, see <http://www.gnu.org/licenses/>. |
| 17 | **/ |
| 18 | |
| 19 | #include "catalog-adapter.hpp" |
| 20 | |
| 21 | namespace atmos { |
| 22 | namespace util { |
| 23 | |
| 24 | CatalogAdapter::CatalogAdapter(const std::shared_ptr<ndn::Face>& face, |
| 25 | const std::shared_ptr<ndn::KeyChain>& keyChain) |
| 26 | : m_face(face) |
| 27 | , m_keyChain(keyChain) |
| 28 | { |
| 29 | // empty |
| 30 | } |
| 31 | |
| 32 | CatalogAdapter::~CatalogAdapter() |
| 33 | { |
| 34 | // empty |
| 35 | } |
| 36 | |
| 37 | void |
| 38 | CatalogAdapter::onRegisterSuccess(const ndn::Name& prefix) |
| 39 | { |
| 40 | // std::cout << "Successfully registered " << prefix << std::endl; |
| 41 | } |
| 42 | |
| 43 | void |
| 44 | CatalogAdapter::onRegisterFailure(const ndn::Name& prefix, const std::string& reason) |
| 45 | { |
| 46 | throw Error("Failed to register prefix " + prefix.toUri() + " : " + reason); |
| 47 | } |
| 48 | |
| 49 | void |
| 50 | CatalogAdapter::onTimeout(const ndn::Interest& interest) |
| 51 | { |
| 52 | // At this point, probably should do a retry |
| 53 | } |
| 54 | |
| 55 | } // namespace util |
| 56 | } // namespace atmos |
| 57 | |