blob: 92353a1185d35c1199a5ee6750c8aceb9f8b31b0 [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 Yub4be64a2013-10-13 17:24:50 -070011#ifndef LINKNDN_PROFILE_DATA_H
12#define LINKNDN_PROFILE_DATA_H
Yingdi Yu4390ce52013-10-10 17:27:54 -070013
Yingdi Yu76dd8002013-12-24 11:16:32 +080014#include <ndn-cpp/data.hpp>
Yingdi Yub4be64a2013-10-13 17:24:50 -070015#include "profile.h"
Yingdi Yu4390ce52013-10-10 17:27:54 -070016
17class ProfileData : public ndn::Data
18{
19public:
Yingdi Yuf8f572d2014-01-13 11:19:47 -080020 struct Error : public ndn::Data::Error { Error(const std::string &what) : ndn::Data::Error(what) {} };
21
Yingdi Yu76dd8002013-12-24 11:16:32 +080022 ProfileData();
23
Yingdi Yu2e3199c2013-11-06 18:42:34 -080024 ProfileData(const Profile& profile);
Yingdi Yu4390ce52013-10-10 17:27:54 -070025
Yingdi Yu6eabbd72013-12-27 08:44:12 +080026 // ProfileData(const ProfileData& profileData);
Yingdi Yu4390ce52013-10-10 17:27:54 -070027
Yingdi Yub4be64a2013-10-13 17:24:50 -070028 ProfileData(const ndn::Data& data);
Yingdi Yu4390ce52013-10-10 17:27:54 -070029
Yingdi Yub4be64a2013-10-13 17:24:50 -070030 ~ProfileData() {}
31
Yingdi Yu76dd8002013-12-24 11:16:32 +080032 const ndn::Name&
Yingdi Yu4390ce52013-10-10 17:27:54 -070033 getIdentityName() const
Yingdi Yub4be64a2013-10-13 17:24:50 -070034 { return m_identity; }
Yingdi Yu4390ce52013-10-10 17:27:54 -070035
Yingdi Yu76dd8002013-12-24 11:16:32 +080036 const Profile&
Yingdi Yub4be64a2013-10-13 17:24:50 -070037 getProfile() const
38 { return m_profile; }
Yingdi Yu4390ce52013-10-10 17:27:54 -070039
40private:
Yingdi Yub4be64a2013-10-13 17:24:50 -070041 ndn::Name m_identity;
42 Profile m_profile;
Yingdi Yu4390ce52013-10-10 17:27:54 -070043};
44
45#endif