blob: 47fe910c410c5d0b1319728647e2cc2cac4685e0 [file] [log] [blame]
Yingdi Yu4390ce52013-10-10 17:27:54 -07001/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil -*- */
2/*
3 * Copyright (c) 2013, Regents of the University of California
4 * Yingdi Yu
5 *
6 * BSD license, See the LICENSE file for more information
7 *
8 * Author: Yingdi Yu <yingdi@cs.ucla.edu>
9 */
10
Yingdi Yufa4ce792014-02-06 18:09:22 -080011#ifndef CHRONOS_PROFILE_DATA_H
12#define CHRONOS_PROFILE_DATA_H
Yingdi Yu4390ce52013-10-10 17:27:54 -070013
Yingdi Yub4be64a2013-10-13 17:24:50 -070014#include "profile.h"
Yingdi Yufa4ce792014-02-06 18:09:22 -080015#include <ndn-cpp-dev/data.hpp>
16
17
18namespace chronos{
Yingdi Yu4390ce52013-10-10 17:27:54 -070019
20class ProfileData : public ndn::Data
21{
22public:
Yingdi Yuf8f572d2014-01-13 11:19:47 -080023 struct Error : public ndn::Data::Error { Error(const std::string &what) : ndn::Data::Error(what) {} };
24
Yingdi Yu76dd8002013-12-24 11:16:32 +080025 ProfileData();
26
Yingdi Yu2e3199c2013-11-06 18:42:34 -080027 ProfileData(const Profile& profile);
Yingdi Yu4390ce52013-10-10 17:27:54 -070028
Yingdi Yub4be64a2013-10-13 17:24:50 -070029 ProfileData(const ndn::Data& data);
Yingdi Yu4390ce52013-10-10 17:27:54 -070030
Yingdi Yub4be64a2013-10-13 17:24:50 -070031 ~ProfileData() {}
32
Yingdi Yu76dd8002013-12-24 11:16:32 +080033 const ndn::Name&
Yingdi Yu4390ce52013-10-10 17:27:54 -070034 getIdentityName() const
Yingdi Yub4be64a2013-10-13 17:24:50 -070035 { return m_identity; }
Yingdi Yu4390ce52013-10-10 17:27:54 -070036
Yingdi Yu76dd8002013-12-24 11:16:32 +080037 const Profile&
Yingdi Yub4be64a2013-10-13 17:24:50 -070038 getProfile() const
39 { return m_profile; }
Yingdi Yu4390ce52013-10-10 17:27:54 -070040
41private:
Yingdi Yub4be64a2013-10-13 17:24:50 -070042 ndn::Name m_identity;
43 Profile m_profile;
Yingdi Yu4390ce52013-10-10 17:27:54 -070044};
45
Yingdi Yufa4ce792014-02-06 18:09:22 -080046}//chronos
47
Yingdi Yu4390ce52013-10-10 17:27:54 -070048#endif