blob: e681ba7bf6539ed76d0487d0f7f7b281961d8fba [file] [log] [blame]
Yingdi Yu53b8a9c2013-10-14 09:36:31 -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 Yuede8eaf2013-10-14 14:07:03 -070011#ifndef LINKNDN_CONTACT_ITEM_H
12#define LINKNDN_CONTACT_ITEM_H
Yingdi Yu53b8a9c2013-10-14 09:36:31 -070013
14#include <ndn.cxx/data.h>
15#include <vector>
16#include "endorse-certificate.h"
17
18class ContactItem
19{
Yingdi Yuede8eaf2013-10-14 14:07:03 -070020 typedef std::vector<ndn::Ptr<EndorseCertificate> > EndorseCertificateList;
Yingdi Yu53b8a9c2013-10-14 09:36:31 -070021
22public:
23 ContactItem(const EndorseCertificate& selfEndorseCertificate,
24 const std::string& alias = std::string());
25
26 ~ContactItem() {}
27
Yingdi Yuede8eaf2013-10-14 14:07:03 -070028 inline const EndorseCertificate&
29 getSelfEndorseCertificate() const
30 { return m_selfEndorseCertificate; }
31
32 inline const ndn::Name&
Yingdi Yu53b8a9c2013-10-14 09:36:31 -070033 getNameSpace() const
34 { return m_namespace; }
35
Yingdi Yuede8eaf2013-10-14 14:07:03 -070036 inline const std::string&
Yingdi Yu53b8a9c2013-10-14 09:36:31 -070037 getAlias() const
38 { return m_alias; }
39
Yingdi Yuede8eaf2013-10-14 14:07:03 -070040 inline const std::string&
Yingdi Yu53b8a9c2013-10-14 09:36:31 -070041 getName() const
42 { return m_name; }
43
Yingdi Yuede8eaf2013-10-14 14:07:03 -070044 inline const std::string&
Yingdi Yu53b8a9c2013-10-14 09:36:31 -070045 getInstitution() const
46 { return m_institution; }
47
Yingdi Yuede8eaf2013-10-14 14:07:03 -070048 inline const ndn::Name
49 getPublicKeyName() const
50 { return m_selfEndorseCertificate.getPublicKeyName(); }
51
52protected:
Yingdi Yu53b8a9c2013-10-14 09:36:31 -070053 EndorseCertificate m_selfEndorseCertificate;
54
55 ndn::Name m_namespace;
56 std::string m_alias;
57
58 std::string m_name;
59 std::string m_institution;
60};
61
62#endif