Added support for ContentObject
diff --git a/ndn-cpp/Key.cpp b/ndn-cpp/Key.cpp
new file mode 100644
index 0000000..45425f2
--- /dev/null
+++ b/ndn-cpp/Key.cpp
@@ -0,0 +1,34 @@
+/**
+ * @author: Jeff Thompson
+ * See COPYING for copyright and distribution information.
+ */
+
+#include "common.hpp"
+#include "Key.hpp"
+
+using namespace std;
+
+namespace ndn {
+
+void KeyLocator::get(struct ndn_KeyLocator &keyLocatorStruct) const
+{
+ keyLocatorStruct.type = type_;
+
+ keyLocatorStruct.keyOrCertificateLength = keyOrCertificate_.size();
+ if (keyOrCertificate_.size() > 0)
+ keyLocatorStruct.keyOrCertificate = (unsigned char *)&keyOrCertificate_[0];
+ else
+ keyLocatorStruct.keyOrCertificate = 0;
+
+ // TODO: Implement keyName.
+}
+
+void KeyLocator::set(const struct ndn_KeyLocator &keyLocatorStruct)
+{
+ type_ = keyLocatorStruct.type;
+ setVector(keyOrCertificate_, keyLocatorStruct.keyOrCertificate, keyLocatorStruct.keyOrCertificateLength);
+ // TODO: Implement keyName.
+}
+
+}
+