Yingdi Yu | 0b82a4e | 2013-10-18 11:29:25 -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 | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 11 | #ifndef CHRONOS_CONTACT_MANAGER_H |
| 12 | #define CHRONOS_CONTACT_MANAGER_H |
Yingdi Yu | 0b82a4e | 2013-10-18 11:29:25 -0700 | [diff] [blame] | 13 | |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 14 | #include <QObject> |
Yingdi Yu | 0b82a4e | 2013-10-18 11:29:25 -0700 | [diff] [blame] | 15 | |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 16 | #ifndef Q_MOC_RUN |
| 17 | #include "contact-storage.h" |
| 18 | #include "dns-storage.h" |
| 19 | #include "endorse-certificate.h" |
Yingdi Yu | 79c25a2 | 2013-10-21 13:38:38 -0700 | [diff] [blame] | 20 | #include "profile.h" |
Yingdi Yu | 6df6125 | 2014-01-21 11:05:11 -0800 | [diff] [blame] | 21 | #include <ndn-cpp-dev/face.hpp> |
| 22 | #include <ndn-cpp-dev/security/key-chain.hpp> |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 23 | #include <ndn-cpp-dev/security/validator.hpp> |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 24 | #endif |
| 25 | |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 26 | namespace chronos{ |
| 27 | |
| 28 | typedef ndn::function<void()> TimeoutNotify; |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 29 | |
| 30 | class ContactManager : public QObject |
Yingdi Yu | 0b82a4e | 2013-10-18 11:29:25 -0700 | [diff] [blame] | 31 | { |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 32 | Q_OBJECT |
| 33 | |
Yingdi Yu | 0b82a4e | 2013-10-18 11:29:25 -0700 | [diff] [blame] | 34 | public: |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 35 | ContactManager(ndn::shared_ptr<ndn::Face> m_face, |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 36 | QObject* parent = 0); |
Yingdi Yu | 0b82a4e | 2013-10-18 11:29:25 -0700 | [diff] [blame] | 37 | |
| 38 | ~ContactManager(); |
| 39 | |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 40 | void |
| 41 | fetchSelfEndorseCertificate(const ndn::Name& identity); |
| 42 | |
| 43 | void |
Yingdi Yu | 8dacdf2 | 2013-11-05 23:06:43 -0800 | [diff] [blame] | 44 | fetchKey(const ndn::Name& identity); |
| 45 | |
| 46 | void |
| 47 | fetchCollectEndorse(const ndn::Name& identity); |
| 48 | |
| 49 | void |
Yingdi Yu | 908f841 | 2013-11-09 00:03:26 -0800 | [diff] [blame] | 50 | fetchIdCertificate(const ndn::Name& certName); |
| 51 | |
| 52 | void |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 53 | updateProfileData(const ndn::Name& identity); |
| 54 | |
Yingdi Yu | 8dacdf2 | 2013-11-05 23:06:43 -0800 | [diff] [blame] | 55 | void |
| 56 | updateEndorseCertificate(const ndn::Name& identity, const ndn::Name& signerIdentity); |
| 57 | |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 58 | inline void |
| 59 | getContactItemList(std::vector<ndn::shared_ptr<ContactItem> >& contacts); |
Yingdi Yu | 79c25a2 | 2013-10-21 13:38:38 -0700 | [diff] [blame] | 60 | |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 61 | ndn::shared_ptr<ContactStorage> |
Yingdi Yu | 0b82a4e | 2013-10-18 11:29:25 -0700 | [diff] [blame] | 62 | getContactStorage() |
| 63 | { return m_contactStorage; } |
| 64 | |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 65 | inline ndn::shared_ptr<ContactItem> |
Yingdi Yu | d40226b | 2013-10-23 14:05:12 -0700 | [diff] [blame] | 66 | getContact(const ndn::Name& contactNamespace); |
| 67 | |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 68 | ndn::shared_ptr<DnsStorage> |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 69 | getDnsStorage() |
| 70 | { return m_dnsStorage; } |
| 71 | |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 72 | ndn::Name |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 73 | getDefaultIdentity() |
Yingdi Yu | c9ffa9f | 2014-01-13 11:19:47 -0800 | [diff] [blame] | 74 | { return m_keyChain->getDefaultIdentity(); } |
Yingdi Yu | 0b82a4e | 2013-10-18 11:29:25 -0700 | [diff] [blame] | 75 | |
Yingdi Yu | 8dacdf2 | 2013-11-05 23:06:43 -0800 | [diff] [blame] | 76 | void |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 77 | publishCollectEndorsedDataInDNS(const ndn::Name& identity); |
Yingdi Yu | 8dacdf2 | 2013-11-05 23:06:43 -0800 | [diff] [blame] | 78 | |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 79 | void |
Yingdi Yu | 908f841 | 2013-11-09 00:03:26 -0800 | [diff] [blame] | 80 | setDefaultIdentity(const ndn::Name& identity) |
| 81 | { m_defaultIdentity = identity; } |
| 82 | |
| 83 | void |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 84 | addContact(const ndn::IdentityCertificate& idCert, const Profile& profile); |
Yingdi Yu | 908f841 | 2013-11-09 00:03:26 -0800 | [diff] [blame] | 85 | |
Yingdi Yu | 6ea54e4 | 2013-11-12 17:50:21 -0800 | [diff] [blame] | 86 | void |
| 87 | removeContact(const ndn::Name& contactNameSpace); |
| 88 | |
Yingdi Yu | c9ffa9f | 2014-01-13 11:19:47 -0800 | [diff] [blame] | 89 | private: |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 90 | void |
| 91 | initializeSecurity(); |
| 92 | |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 93 | ndn::shared_ptr<EndorseCertificate> |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 94 | getSignedSelfEndorseCertificate(const ndn::Name& identity, const Profile& profile); |
| 95 | |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 96 | ndn::shared_ptr<EndorseCertificate> |
Yingdi Yu | 8dacdf2 | 2013-11-05 23:06:43 -0800 | [diff] [blame] | 97 | generateEndorseCertificate(const ndn::Name& identity, const ndn::Name& signerIdentity); |
| 98 | |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 99 | void |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 100 | publishSelfEndorseCertificateInDNS(const EndorseCertificate& selfEndorseCertificate); |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 101 | |
Yingdi Yu | 8dacdf2 | 2013-11-05 23:06:43 -0800 | [diff] [blame] | 102 | void |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 103 | publishEndorseCertificateInDNS(const EndorseCertificate& endorseCertificate, const ndn::Name& signerIdentity); |
| 104 | |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 105 | inline void |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 106 | sendInterest(const ndn::Interest& interest, |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 107 | const ndn::OnDataValidated& onValidated, |
| 108 | const ndn::OnDataValidationFailed& onValidationFailed, |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 109 | const TimeoutNotify& timeoutNotify, |
Yingdi Yu | 7630f64 | 2014-01-16 19:13:03 -0800 | [diff] [blame] | 110 | int retry = 1); |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 111 | |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 112 | inline void |
| 113 | onTargetData(const ndn::Interest& interest, |
| 114 | const ndn::Data& data, |
| 115 | const ndn::OnDataValidated& onValidated, |
| 116 | const ndn::OnDataValidationFailed& onValidationFailed); |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 117 | |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 118 | inline void |
| 119 | onTargetTimeout(const ndn::Interest& interest, |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 120 | int retry, |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 121 | const ndn::OnDataValidated& onValidated, |
| 122 | const ndn::OnDataValidationFailed& onValidationFailed, |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 123 | const TimeoutNotify& timeoutNotify); |
| 124 | |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 125 | void |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 126 | onDnsSelfEndorseCertValidated(const ndn::shared_ptr<const ndn::Data>& selfEndorseCertificate, const ndn::Name& identity); |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 127 | |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 128 | inline void |
| 129 | onDnsSelfEndorseCertValidationFailed(const ndn::shared_ptr<const ndn::Data>& selfEndorseCertificate, const ndn::Name& identity); |
| 130 | |
| 131 | inline void |
| 132 | onDnsSelfEndorseCertTimeoutNotify(const ndn::Name& identity); |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 133 | |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 134 | |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 135 | inline void |
| 136 | onDnsCollectEndorseValidated(const ndn::shared_ptr<const ndn::Data>& data, const ndn::Name& identity); |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 137 | |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 138 | inline void |
| 139 | onDnsCollectEndorseValidationFailed(const ndn::shared_ptr<const ndn::Data>& data, const ndn::Name& identity); |
Yingdi Yu | 8dacdf2 | 2013-11-05 23:06:43 -0800 | [diff] [blame] | 140 | |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 141 | inline void |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 142 | onDnsCollectEndorseTimeoutNotify(const ndn::Name& identity); |
| 143 | |
Yingdi Yu | 8dacdf2 | 2013-11-05 23:06:43 -0800 | [diff] [blame] | 144 | |
| 145 | void |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 146 | onKeyValidated(const ndn::shared_ptr<const ndn::Data>& data, const ndn::Name& identity); |
Yingdi Yu | 8dacdf2 | 2013-11-05 23:06:43 -0800 | [diff] [blame] | 147 | |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 148 | inline void |
| 149 | onKeyValidationFailed(const ndn::shared_ptr<const ndn::Data>& data, const ndn::Name& identity); |
Yingdi Yu | 8dacdf2 | 2013-11-05 23:06:43 -0800 | [diff] [blame] | 150 | |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 151 | inline void |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 152 | onKeyTimeoutNotify(const ndn::Name& identity); |
| 153 | |
Yingdi Yu | 8dacdf2 | 2013-11-05 23:06:43 -0800 | [diff] [blame] | 154 | |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 155 | inline void |
| 156 | onIdCertValidated(const ndn::shared_ptr<const ndn::Data>& data, const ndn::Name& identity); |
Yingdi Yu | 8dacdf2 | 2013-11-05 23:06:43 -0800 | [diff] [blame] | 157 | |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 158 | inline void |
| 159 | onIdCertValidationFailed(const ndn::shared_ptr<const ndn::Data>& data, const ndn::Name& identity); |
Yingdi Yu | 908f841 | 2013-11-09 00:03:26 -0800 | [diff] [blame] | 160 | |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 161 | inline void |
| 162 | onIdCertTimeoutNotify(const ndn::Name& identity); |
Yingdi Yu | 8dacdf2 | 2013-11-05 23:06:43 -0800 | [diff] [blame] | 163 | |
| 164 | |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 165 | signals: |
Yingdi Yu | b29f78c | 2013-11-09 20:12:31 -0800 | [diff] [blame] | 166 | void |
| 167 | noNdnConnection(const QString& msg); |
| 168 | |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 169 | void |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 170 | contactFetched(const chronos::EndorseCertificate& endorseCertificate); |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 171 | |
| 172 | void |
| 173 | contactFetchFailed(const ndn::Name& identity); |
| 174 | |
Yingdi Yu | 8dacdf2 | 2013-11-05 23:06:43 -0800 | [diff] [blame] | 175 | void |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 176 | contactKeyFetched(const chronos::EndorseCertificate& endorseCertificate); |
Yingdi Yu | 8dacdf2 | 2013-11-05 23:06:43 -0800 | [diff] [blame] | 177 | |
| 178 | void |
| 179 | contactKeyFetchFailed(const ndn::Name& identity); |
| 180 | |
| 181 | void |
Yingdi Yu | 6420611 | 2013-12-24 11:16:32 +0800 | [diff] [blame] | 182 | contactCertificateFetched(const ndn::IdentityCertificate& identityCertificate); |
Yingdi Yu | 908f841 | 2013-11-09 00:03:26 -0800 | [diff] [blame] | 183 | |
| 184 | void |
| 185 | contactCertificateFetchFailed(const ndn::Name& identity); |
| 186 | |
| 187 | void |
Yingdi Yu | 8dacdf2 | 2013-11-05 23:06:43 -0800 | [diff] [blame] | 188 | collectEndorseFetched(const ndn::Data& data); |
| 189 | |
| 190 | void |
| 191 | collectEndorseFetchFailed(const ndn::Name& identity); |
| 192 | |
Yingdi Yu | 908f841 | 2013-11-09 00:03:26 -0800 | [diff] [blame] | 193 | void |
| 194 | warning(QString msg); |
| 195 | |
Yingdi Yu | 6ea54e4 | 2013-11-12 17:50:21 -0800 | [diff] [blame] | 196 | void |
| 197 | contactRemoved(const ndn::Name& identity); |
| 198 | |
| 199 | void |
| 200 | contactAdded(const ndn::Name& identity); |
| 201 | |
Yingdi Yu | aa8d769 | 2013-10-18 17:05:02 -0700 | [diff] [blame] | 202 | private slots: |
| 203 | |
Yingdi Yu | 0b82a4e | 2013-10-18 11:29:25 -0700 | [diff] [blame] | 204 | |
| 205 | private: |
Yingdi Yu | eaa84e2 | 2014-01-16 10:30:26 -0800 | [diff] [blame] | 206 | |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 207 | ndn::shared_ptr<ContactStorage> m_contactStorage; |
| 208 | ndn::shared_ptr<DnsStorage> m_dnsStorage; |
| 209 | ndn::shared_ptr<ndn::Validator> m_validator; |
| 210 | ndn::shared_ptr<ndn::Face> m_face; |
| 211 | ndn::shared_ptr<ndn::KeyChain> m_keyChain; |
Yingdi Yu | 908f841 | 2013-11-09 00:03:26 -0800 | [diff] [blame] | 212 | ndn::Name m_defaultIdentity; |
Yingdi Yu | 0b82a4e | 2013-10-18 11:29:25 -0700 | [diff] [blame] | 213 | }; |
| 214 | |
Yingdi Yu | a1a688f | 2014-02-06 18:09:22 -0800 | [diff] [blame^] | 215 | void |
| 216 | ContactManager::sendInterest(const ndn::Interest& interest, |
| 217 | const ndn::OnDataValidated& onValidated, |
| 218 | const ndn::OnDataValidationFailed& onValidationFailed, |
| 219 | const TimeoutNotify& timeoutNotify, |
| 220 | int retry /* = 1 */) |
| 221 | { |
| 222 | m_face->expressInterest(interest, |
| 223 | bind(&ContactManager::onTargetData, |
| 224 | this, _1, _2, onValidated, onValidationFailed), |
| 225 | bind(&ContactManager::onTargetTimeout, |
| 226 | this, _1, retry, onValidated, onValidationFailed, timeoutNotify)); |
| 227 | } |
| 228 | |
| 229 | void |
| 230 | ContactManager::onTargetData(const ndn::Interest& interest, |
| 231 | const ndn::Data& data, |
| 232 | const ndn::OnDataValidated& onValidated, |
| 233 | const ndn::OnDataValidationFailed& onValidationFailed) |
| 234 | { m_validator->validate(data, onValidated, onValidationFailed); } |
| 235 | |
| 236 | void |
| 237 | ContactManager::onTargetTimeout(const ndn::Interest& interest, |
| 238 | int retry, |
| 239 | const ndn::OnDataValidated& onValidated, |
| 240 | const ndn::OnDataValidationFailed& onValidationFailed, |
| 241 | const TimeoutNotify& timeoutNotify) |
| 242 | { |
| 243 | if(retry > 0) |
| 244 | sendInterest(interest, onValidated, onValidationFailed, timeoutNotify, retry-1); |
| 245 | else |
| 246 | timeoutNotify(); |
| 247 | } |
| 248 | |
| 249 | |
| 250 | void |
| 251 | ContactManager::onDnsSelfEndorseCertValidationFailed(const ndn::shared_ptr<const ndn::Data>& data, |
| 252 | const ndn::Name& identity) |
| 253 | { emit contactFetchFailed (identity); } |
| 254 | |
| 255 | void |
| 256 | ContactManager::onDnsSelfEndorseCertTimeoutNotify(const ndn::Name& identity) |
| 257 | { emit contactFetchFailed(identity); } |
| 258 | |
| 259 | void |
| 260 | ContactManager::onDnsCollectEndorseValidated(const ndn::shared_ptr<const ndn::Data>& data, |
| 261 | const ndn::Name& identity) |
| 262 | { emit collectEndorseFetched (*data); } |
| 263 | |
| 264 | void |
| 265 | ContactManager::onDnsCollectEndorseValidationFailed(const ndn::shared_ptr<const ndn::Data>& data, |
| 266 | const ndn::Name& identity) |
| 267 | { emit collectEndorseFetchFailed (identity); } |
| 268 | |
| 269 | void |
| 270 | ContactManager::onDnsCollectEndorseTimeoutNotify(const ndn::Name& identity) |
| 271 | { emit collectEndorseFetchFailed (identity); } |
| 272 | |
| 273 | void |
| 274 | ContactManager::onKeyValidationFailed(const ndn::shared_ptr<const ndn::Data>& data, |
| 275 | const ndn::Name& identity) |
| 276 | { emit contactKeyFetchFailed (identity); } |
| 277 | |
| 278 | void |
| 279 | ContactManager::onKeyTimeoutNotify(const ndn::Name& identity) |
| 280 | { emit contactKeyFetchFailed(identity); } |
| 281 | |
| 282 | void |
| 283 | ContactManager::onIdCertValidated(const ndn::shared_ptr<const ndn::Data>& data, |
| 284 | const ndn::Name& identity) |
| 285 | { |
| 286 | ndn::IdentityCertificate identityCertificate(*data); |
| 287 | emit contactCertificateFetched(identityCertificate); |
| 288 | } |
| 289 | |
| 290 | void |
| 291 | ContactManager::onIdCertValidationFailed(const ndn::shared_ptr<const ndn::Data>& data, |
| 292 | const ndn::Name& identity) |
| 293 | { emit contactCertificateFetchFailed (identity); } |
| 294 | |
| 295 | void |
| 296 | ContactManager::onIdCertTimeoutNotify(const ndn::Name& identity) |
| 297 | { emit contactCertificateFetchFailed (identity); } |
| 298 | |
| 299 | ndn::shared_ptr<ContactItem> |
| 300 | ContactManager::getContact(const ndn::Name& contactNamespace) |
| 301 | { return m_contactStorage->getContact(contactNamespace); } |
| 302 | |
| 303 | void |
| 304 | ContactManager::getContactItemList(std::vector<ndn::shared_ptr<ContactItem> >& contacts) |
| 305 | { return m_contactStorage->getAllContacts(contacts); } |
| 306 | |
| 307 | }//chronos |
| 308 | |
Yingdi Yu | 0b82a4e | 2013-10-18 11:29:25 -0700 | [diff] [blame] | 309 | #endif |