Yingdi Yu | 4390ce5 | 2013-10-10 17:27:54 -0700 | [diff] [blame] | 1 | /* -*- 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 Yu | fa4ce79 | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 11 | #ifndef CHRONOS_PROFILE_DATA_H |
12 | #define CHRONOS_PROFILE_DATA_H | ||||
Yingdi Yu | 4390ce5 | 2013-10-10 17:27:54 -0700 | [diff] [blame] | 13 | |
Yingdi Yu | b4be64a | 2013-10-13 17:24:50 -0700 | [diff] [blame] | 14 | #include "profile.h" |
Yingdi Yu | fa4ce79 | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 15 | #include <ndn-cpp-dev/data.hpp> |
16 | |||||
17 | |||||
18 | namespace chronos{ | ||||
Yingdi Yu | 4390ce5 | 2013-10-10 17:27:54 -0700 | [diff] [blame] | 19 | |
20 | class ProfileData : public ndn::Data | ||||
21 | { | ||||
22 | public: | ||||
Yingdi Yu | f8f572d | 2014-01-13 11:19:47 -0800 | [diff] [blame] | 23 | struct Error : public ndn::Data::Error { Error(const std::string &what) : ndn::Data::Error(what) {} }; |
24 | |||||
Yingdi Yu | 76dd800 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 25 | ProfileData(); |
26 | |||||
Yingdi Yu | 2e3199c | 2013-11-06 18:42:34 -0800 | [diff] [blame] | 27 | ProfileData(const Profile& profile); |
Yingdi Yu | 4390ce5 | 2013-10-10 17:27:54 -0700 | [diff] [blame] | 28 | |
Yingdi Yu | b4be64a | 2013-10-13 17:24:50 -0700 | [diff] [blame] | 29 | ProfileData(const ndn::Data& data); |
Yingdi Yu | 4390ce5 | 2013-10-10 17:27:54 -0700 | [diff] [blame] | 30 | |
Yingdi Yu | b4be64a | 2013-10-13 17:24:50 -0700 | [diff] [blame] | 31 | ~ProfileData() {} |
32 | |||||
Yingdi Yu | 76dd800 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 33 | const ndn::Name& |
Yingdi Yu | 4390ce5 | 2013-10-10 17:27:54 -0700 | [diff] [blame] | 34 | getIdentityName() const |
Yingdi Yu | b4be64a | 2013-10-13 17:24:50 -0700 | [diff] [blame] | 35 | { return m_identity; } |
Yingdi Yu | 4390ce5 | 2013-10-10 17:27:54 -0700 | [diff] [blame] | 36 | |
Yingdi Yu | 76dd800 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 37 | const Profile& |
Yingdi Yu | b4be64a | 2013-10-13 17:24:50 -0700 | [diff] [blame] | 38 | getProfile() const |
39 | { return m_profile; } | ||||
Yingdi Yu | 4390ce5 | 2013-10-10 17:27:54 -0700 | [diff] [blame] | 40 | |
41 | private: | ||||
Yingdi Yu | b4be64a | 2013-10-13 17:24:50 -0700 | [diff] [blame] | 42 | ndn::Name m_identity; |
43 | Profile m_profile; | ||||
Yingdi Yu | 4390ce5 | 2013-10-10 17:27:54 -0700 | [diff] [blame] | 44 | }; |
45 | |||||
Yingdi Yu | fa4ce79 | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 46 | }//chronos |
47 | |||||
Yingdi Yu | 4390ce5 | 2013-10-10 17:27:54 -0700 | [diff] [blame] | 48 | #endif |