aboutsummaryrefslogtreecommitdiffstats
path: root/icnet/ccnx/icnet_ccnx_key_locator.cc
blob: 193573a916a2cf80c1066c8cb407ab11bbac2920 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// Created by msardara on 01/11/16.
//

#include "icnet_ccnx_key_locator.h"

namespace icnet {

namespace ccnx {

KeyLocator::KeyLocator() : type_(KeyLocatorType::UNKNOWN) {
}

KeyLocator::KeyLocator(KeyLocatorType type, Name &name) : type_(type), name_(name) {
}

Name &KeyLocator::getName() {
  return name_;
}

void KeyLocator::setName(Name &name) {
  name_ = name;
}

void KeyLocator::setType(KeyLocatorType type) {
  type_ = type;
}

KeyLocatorType KeyLocator::getType() {
  return type_;
}

void KeyLocator::clear() {
  type_ = KeyLocatorType::UNKNOWN;
  name_.clear();
}

} // end namespace ccnx

} // end namespace icnet