blob: e111e54ded05449f8cc3b90c00d44cd5beeab665 [file] [log] [blame]
Yingdi Yuad56f1c2013-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
11#include "profile-data.h"
12
13using namespace std;
14using namespace ndn;
15
16ProfileData::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
29ProfileData::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
38Ptr<ProfileData>
39ProfileData::fromData (const Data& data)
40{
41 //TODO:
42 return NULL;
43}
44