blob: 61404adc0d65ac19d66ee4e785ab905056310bd0 [file] [log] [blame]
Chengyu Fanb25835b2015-04-28 17:09:35 -06001/** 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
21namespace atmos {
22namespace util {
23
24CatalogAdapter::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
32CatalogAdapter::~CatalogAdapter()
33{
34 // empty
35}
36
37void
38CatalogAdapter::onRegisterSuccess(const ndn::Name& prefix)
39{
40 // std::cout << "Successfully registered " << prefix << std::endl;
41}
42
43void
44CatalogAdapter::onRegisterFailure(const ndn::Name& prefix, const std::string& reason)
45{
46 throw Error("Failed to register prefix " + prefix.toUri() + " : " + reason);
47}
48
49void
50CatalogAdapter::onTimeout(const ndn::Interest& interest)
51{
52 // At this point, probably should do a retry
53}
54
55} // namespace util
56} // namespace atmos
57