build: Finalizing waf building system (removing legacy code)
Change-Id: Ie7e7cc84e19551e3dd5dd0405b14f289ea54e7cd
diff --git a/include/ndn-cpp-dev/c/common.h b/include/ndn-cpp-dev/c/common.h
deleted file mode 100644
index 42edcef..0000000
--- a/include/ndn-cpp-dev/c/common.h
+++ /dev/null
@@ -1,33 +0,0 @@
-/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Jeff Thompson <jefft0@remap.ucla.edu>
- * See COPYING for copyright and distribution information.
- */
-
-#ifndef NDN_COMMON_H
-#define NDN_COMMON_H
-
-#include <ndn-cpp-dev/ndn-cpp-config.h>
-#include <stdint.h>
-// TODO: Is stddef.h portable?
-#include <stddef.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * A time interval represented as the number of milliseconds.
- */
-typedef int64_t ndn_Milliseconds;
-
-/**
- * The calendar time represented as the number of milliseconds since 1/1/1970.
- */
-typedef int64_t ndn_MillisecondsSince1970;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/ndn-cpp-dev/c/data-types.h b/include/ndn-cpp-dev/c/data-types.h
deleted file mode 100644
index 668786b..0000000
--- a/include/ndn-cpp-dev/c/data-types.h
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Jeff Thompson <jefft0@remap.ucla.edu>
- * See COPYING for copyright and distribution information.
- */
-
-#ifndef NDN_DATA_TYPES_H
-#define NDN_DATA_TYPES_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum {
- ndn_ContentType_DATA = 0,
- ndn_ContentType_ENCR = 1,
- ndn_ContentType_GONE = 2,
- ndn_ContentType_KEY = 3,
- ndn_ContentType_LINK = 4,
- ndn_ContentType_NACK = 5
-} ndn_ContentType;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/ndn-cpp-dev/c/encoding/element-listener.h b/include/ndn-cpp-dev/c/encoding/element-listener.h
deleted file mode 100644
index af88a85..0000000
--- a/include/ndn-cpp-dev/c/encoding/element-listener.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Jeff Thompson <jefft0@remap.ucla.edu>
- * See COPYING for copyright and distribution information.
- */
-
-#ifndef NDN_ELEMENT_LISTENER_H
-#define NDN_ELEMENT_LISTENER_H
-
-#include "../common.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/** An ndn_ElementListener struct holds a function pointer onReceivedElement. You can extend this struct with data that
- * will be passed to onReceivedElement.
- */
-struct ndn_ElementListener {
- void (*onReceivedElement)(struct ndn_ElementListener *self, uint8_t *element, size_t elementLength); /**< see ndn_ElementListener_initialize */
-};
-
-/**
- * Initialize an ndn_ElementListener struct to use the onReceivedElement function pointer.
- * @param self pointer to the ndn_ElementListener struct
- * @param onReceivedElement pointer to a function which is called when an entire binary XML element is received.
- * self is the pointer to this ndn_ElementListener struct. See ndn_BinaryXmlElementReader_onReceivedData.
- */
-static inline void ndn_ElementListener_initialize
- (struct ndn_ElementListener *self, void (*onReceivedElement)(struct ndn_ElementListener *self, uint8_t *element, size_t elementLength))
-{
- self->onReceivedElement = onReceivedElement;
-}
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/ndn-cpp-dev/c/forwarding-flags.h b/include/ndn-cpp-dev/c/forwarding-flags.h
deleted file mode 100644
index 863bf04..0000000
--- a/include/ndn-cpp-dev/c/forwarding-flags.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Jeff Thompson <jefft0@remap.ucla.edu>
- * See COPYING for copyright and distribution information.
- */
-
-#ifndef NDN_FORWARDING_FLAGS_H
-#define NDN_FORWARDING_FLAGS_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * An ndn_ForwardingFlags object holds the flags which specify how the forwarding daemon should forward an interest for
- * a registered prefix. We use a separate ForwardingFlags object to retain future compatibility if the daemon forwarding
- * bits are changed, amended or deprecated.
- */
-struct ndn_ForwardingFlags {
- int active; /**< 1 if the flag is set, 0 if cleared. */
- int childInherit;
- int advertise;
- int last;
- int capture;
- int local;
- int tap;
- int captureOk;
-};
-
-/**
- * Initialize an ndn_ForwardingFlags struct with the default with "active" and "childInherit" set and all other flags cleared.
- * @param self A pointer to the ndn_ForwardingFlags struct.
- */
-void ndn_ForwardingFlags_initialize(struct ndn_ForwardingFlags *self);
-
-/**
- * Get an integer with the bits set according to the flags as used by the ForwardingEntry message.
- * @param self A pointer to the ndn_ForwardingFlags struct.
- * @return An integer with the bits set.
- */
-int ndn_ForwardingFlags_getForwardingEntryFlags(struct ndn_ForwardingFlags *self);
-
-/**
- * Set the flags according to the bits in forwardingEntryFlags as used by the ForwardingEntry message.
- * @param self A pointer to the ndn_ForwardingFlags struct.
- * @param flags An integer with the bits set.
- */
-void ndn_ForwardingFlags_setForwardingEntryFlags(struct ndn_ForwardingFlags *self, int forwardingEntryFlags);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/ndn-cpp-dev/c/interest-types.h b/include/ndn-cpp-dev/c/interest-types.h
deleted file mode 100644
index a464e17..0000000
--- a/include/ndn-cpp-dev/c/interest-types.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Jeff Thompson <jefft0@remap.ucla.edu>
- * See COPYING for copyright and distribution information.
- */
-
-#ifndef NDN_INTEREST_TYPES_H
-#define NDN_INTEREST_TYPES_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum {
- ndn_Exclude_COMPONENT = 0,
- ndn_Exclude_ANY = 1
-} ndn_ExcludeType;
-
-enum {
- ndn_Interest_CHILD_SELECTOR_LEFT = 0,
- ndn_Interest_CHILD_SELECTOR_RIGHT = 1,
-
- ndn_Interest_ANSWER_NO_CONTENT_STORE = 0,
- ndn_Interest_ANSWER_CONTENT_STORE = 1,
- ndn_Interest_ANSWER_GENERATED = 2,
- ndn_Interest_ANSWER_STALE = 4, // Stale answer OK
- ndn_Interest_MARK_STALE = 16, // Must have scope 0. Michael calls this a "hack"
-
- ndn_Interest_DEFAULT_ANSWER_ORIGIN_KIND = ndn_Interest_ANSWER_CONTENT_STORE | ndn_Interest_ANSWER_GENERATED
-};
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/ndn-cpp-dev/c/key-types.h b/include/ndn-cpp-dev/c/key-types.h
deleted file mode 100644
index 712aee8..0000000
--- a/include/ndn-cpp-dev/c/key-types.h
+++ /dev/null
@@ -1,31 +0,0 @@
-/**
- * Copyright (C) 2013 Regents of the University of California.
- * @author: Jeff Thompson <jefft0@remap.ucla.edu>
- * See COPYING for copyright and distribution information.
- */
-
-#ifndef NDN_KEY_TYPES_H
-#define NDN_KEY_TYPES_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef enum {
- ndn_KeyLocatorType_KEY = 1,
- ndn_KeyLocatorType_CERTIFICATE = 2,
- ndn_KeyLocatorType_KEYNAME = 3
-} ndn_KeyLocatorType;
-
-typedef enum {
- ndn_KeyNameType_PUBLISHER_PUBLIC_KEY_DIGEST = 1,
- ndn_KeyNameType_PUBLISHER_CERTIFICATE_DIGEST = 2,
- ndn_KeyNameType_PUBLISHER_ISSUER_KEY_DIGEST = 3,
- ndn_KeyNameType_PUBLISHER_ISSUER_CERTIFICATE_DIGEST = 4
-} ndn_KeyNameType;
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif
diff --git a/include/ndn-cpp-dev/common.hpp b/include/ndn-cpp-dev/common.hpp
index 5efd3a0..95772b6 100644
--- a/include/ndn-cpp-dev/common.hpp
+++ b/include/ndn-cpp-dev/common.hpp
@@ -8,9 +8,12 @@
#ifndef NDN_COMMON_HPP
#define NDN_COMMON_HPP
+#include <ndn-cpp-dev/ndn-cpp-config.h>
+#include <stdint.h>
+// TODO: Is stddef.h portable?
+#include <stddef.h>
+
#include <vector>
-// common.h include ndn-cpp-config.h.
-#include "c/common.h"
#if NDN_CPP_HAVE_CXX11
@@ -18,9 +21,6 @@
#error "NDN-CPP-DEV library is configured and compiled in C++11 mode, but the current compiler is not C++11 enabled"
#endif
-// Depending on where ./configure found shared_ptr, define the ptr_lib namespace.
-// We always use ndn::ptr_lib.
-// #if NDN_CPP_HAVE_STD_SHARED_PTR
#include <memory>
namespace ndn { namespace ptr_lib = std; }
@@ -28,7 +28,7 @@
#include <functional>
namespace ndn { namespace func_lib = std; }
-#elif NDN_CPP_USE_SYSTEM_BOOST
+#else
// #if NDN_CPP_HAVE_BOOST_SHARED_PTR
#include <boost/shared_ptr.hpp>
@@ -41,37 +41,6 @@
#include <boost/bind.hpp>
namespace ndn { namespace func_lib = boost; }
-#else // use embedded boost headers
-/* Use the boost header files in this distribution that were extracted with:
-cd <BOOST DEVELOPMENT DIRECTORY WITH boost SUBDIRECTORY>
-dist/bin/bcp --namespace=ndnboost shared_ptr make_shared weak_ptr function bind any iostreams <NDN-CPP-DEV ROOT>/include
-cd <NDN-CPP-DEV ROOT>/include
-rm -rf boost.css boost.png Jamroot libs
-mv boost ndnboost
-cd ndnboost
-# Replace when including files.
-(unset LANG; find . -type f -exec sed -i '' 's/\<boost\//\<ndnboost\//g' {} +)
-(unset LANG; find . -type f -exec sed -i '' 's/\"boost\//\"ndnboost\//g' {} +)
-(unset LANG; find . -type f -exec sed -i '' 's/ boost\// ndnboost\//g' {} +)
-(unset LANG; find . -type f -exec sed -i '' 's/(boost\//(ndnboost\//g' {} +)
-# Replace macro definitions.
-(unset LANG; find . -type f -exec sed -i '' 's/BOOST_/NDNBOOST_/g' {} +)
-# Replace header include guards which don't start with BOOST_ . This may result in some with NDNBOOST twice, but that is OK.
-(unset LANG; find . -type f -exec sed -i '' 's/_DWA/_NDNBOOST_DWA/g' {} +)
-(unset LANG; find . -type f -exec sed -i '' 's/ UUID_/ NDNBOOST_UUID_/g' {} +)
-(unset LANG; find . -type f -exec sed -i '' 's/ FILE_boost/ FILE_ndnboost/g' {} +)
-# Replace the mpl_ barrier namespace. This should only change file adl_barrier.hpp.
-(unset LANG; find . -type f -exec sed -i '' 's/ mpl_/ ndnboost_mpl_/g' {} +)
- */
-#include <ndnboost/shared_ptr.hpp>
-#include <ndnboost/make_shared.hpp>
-namespace ndn { namespace ptr_lib = ndnboost; }
-
-// Use the boost header files in this distribution that were extracted as above:
-#include <ndnboost/function.hpp>
-#include <ndnboost/bind.hpp>
-namespace ndn { namespace func_lib = ndnboost; }
-
#endif
namespace ndn {
diff --git a/include/ndn-cpp-dev/c/util/crypto.h b/include/ndn-cpp-dev/util/crypto.hpp
similarity index 77%
rename from include/ndn-cpp-dev/c/util/crypto.h
rename to include/ndn-cpp-dev/util/crypto.hpp
index 43d47eb..8908a76 100644
--- a/include/ndn-cpp-dev/c/util/crypto.h
+++ b/include/ndn-cpp-dev/util/crypto.hpp
@@ -4,16 +4,15 @@
* See COPYING for copyright and distribution information.
*/
-#ifndef NDN_CRYPTO_H
-#define NDN_CRYPTO_H
+#ifndef NDN_UTIL_CRYPTO_HPP
+#define NDN_UTIL_CRYPTO_HPP
+
+#include "ndn-cpp-dev/common.hpp"
#include <openssl/ssl.h>
#include <openssl/rsa.h>
-#include <ndn-cpp-dev/c/common.h>
-#ifdef __cplusplus
-extern "C" {
-#endif
+namespace ndn {
/**
* Compute the sha-256 digest of data.
@@ -23,8 +22,6 @@
*/
void ndn_digestSha256(const uint8_t *data, size_t dataLength, uint8_t *digest);
-#ifdef __cplusplus
-}
-#endif
+} // namespace ndn
-#endif
+#endif // NDN_UTIL_CRYPTO_HPP