blob: 9f9121cff6b60826ad69728eab84d691a3b1c39f [file] [log] [blame]
Yingdi Yuede8eaf2013-10-14 14:07:03 -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#ifndef LINKNDN_TRUSTED_CONTACT_H
12#define LINKNDN_TRUSTED_CONTACT_H
13
14#include "contact-item.h"
15#include <ndn.cxx/regex/regex.h>
16
17class TrustedContact : public ContactItem
18{
19public:
20 TrustedContact(const EndorseCertificate& selfEndorseCertificate,
21 const std::string& trustScope,
22 const std::string& alias = std::string());
23
24 ~TrustedContact() {}
25
26 void
27 addTrustScope(ndn::Ptr<ndn::Regex> nameSpace)
28 { m_trustScope.push_back(nameSpace); }
29
30 bool
31 canBeTrustedFor(const ndn::Name& name);
32
33 ndn::Ptr<ndn::Blob>
34 getTrustScopeBlob() const;
35
36private:
37 std::vector<ndn::Ptr<ndn::Regex> > m_trustScope;
38};
39
40#endif