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 | |
| 11 | #include "profile-data.h" |
| 12 | |
| 13 | using namespace std; |
| 14 | using namespace ndn; |
| 15 | |
| 16 | ProfileData::ProfileData (const Name& identityName, |
| 17 | const string& profileType, |
| 18 | const Blob& profileValue) |
| 19 | : Data() |
| 20 | , m_identityName(identityName) |
| 21 | , m_profileType(profileType) |
| 22 | { |
| 23 | Name tmpName = identityName; |
| 24 | setName(tmpName.append(profileType)); |
| 25 | setContent(Content(profileValue.buf(), profileValue.size())); |
| 26 | } |
| 27 | |
| 28 | |
| 29 | ProfileData::ProfileData (const ProfileData& profile) |
| 30 | : Data() |
| 31 | , m_identityName(profile.m_identityName) |
| 32 | , m_profileType(profile.m_profileType) |
| 33 | { |
| 34 | setName(profile.getName()); |
| 35 | setContent(profile.getContent()); |
| 36 | } |
| 37 | |
| 38 | Ptr<ProfileData> |
| 39 | ProfileData::fromData (const Data& data) |
| 40 | { |
| 41 | //TODO: |
| 42 | return NULL; |
| 43 | } |
| 44 | |