jni: Update NFD and ndn-cxx to the latest available versions

This commit also enables WebSocket faces

Change-Id: Ibb049fc690836dff4d16ef22bb51d765c745fc57
diff --git a/app/src/main/jni/NFD b/app/src/main/jni/NFD
index 90c20fa..ce81230 160000
--- a/app/src/main/jni/NFD
+++ b/app/src/main/jni/NFD
@@ -1 +1 @@
-Subproject commit 90c20face84003b5a646f130e35bd04d60d70fdb
+Subproject commit ce81230b09583f9aec98a97653a047aa54fa2bef
diff --git a/app/src/main/jni/ndn-cxx b/app/src/main/jni/ndn-cxx
index ea71967..f0da789 160000
--- a/app/src/main/jni/ndn-cxx
+++ b/app/src/main/jni/ndn-cxx
@@ -1 +1 @@
-Subproject commit ea71967f812be196a43c7704bf7fcf053f8533a7
+Subproject commit f0da789bd232d408da62ff6d30f4fcf24474bcf7
diff --git a/app/src/main/jni/ndn-cxx-android/ndn-cxx-config.hpp b/app/src/main/jni/ndn-cxx-android/ndn-cxx-config.hpp
index fe8e99b..019d1bc 100644
--- a/app/src/main/jni/ndn-cxx-android/ndn-cxx-config.hpp
+++ b/app/src/main/jni/ndn-cxx-android/ndn-cxx-config.hpp
@@ -5,6 +5,7 @@
 #define NDN_CXX_HAVE_IS_MOVE_CONSTRUCTIBLE 1
 #define NDN_CXX_HAVE_IS_MOVE_ASSIGNABLE 1
 #define NDN_CXX_HAVE_CXX_FRIEND_TYPENAME 1
+#define NDN_CXX_HAVE_CXX_OVERRIDE_FINAL 1
 #define NDN_CXX_HAVE_PTHREAD 1
 #define NDN_CXX_HAVE_RT
 #define NDN_CXX_HAVE_SQLITE3 1
diff --git a/app/src/main/jni/nfd-android/config.hpp b/app/src/main/jni/nfd-android/config.hpp
index f26c0f6..bcbd6a6 100644
--- a/app/src/main/jni/nfd-android/config.hpp
+++ b/app/src/main/jni/nfd-android/config.hpp
@@ -4,10 +4,14 @@
 #define HAVE_IS_DEFAULT_CONSTRUCTIBLE 1
 #define HAVE_IS_MOVE_CONSTRUCTIBLE 1
 #define HAVE_CXX_OVERRIDE 1
+#define HAVE_STD_TO_STRING 1
 #define HAVE_LIBRT
 #define HAVE_LIBRESOLV
 /*#undef HAVE_UNIX_SOCKETS*/
+#define HAVE_WEBSOCKET 1
+#define _WEBSOCKETPP_CPP11_STL_ 1
 #define DEFAULT_CONFIG_FILE "./nfd.conf"
 #define HAVE_CUSTOM_LOGGER 1
+#define NDEBUG 1
 
 #endif /* W_CONFIG_HPP_WAF */
diff --git a/app/src/main/jni/nfd-android/version.hpp b/app/src/main/jni/nfd-android/version.hpp
index c945a45..e1c35fd 100644
--- a/app/src/main/jni/nfd-android/version.hpp
+++ b/app/src/main/jni/nfd-android/version.hpp
@@ -38,13 +38,13 @@
  *
  *  MAJOR*1000000 + MINOR*1000 + PATCH
  */
-#define NFD_VERSION 3000
+#define NFD_VERSION 3001
 
 /** \brief NFD version represented as a string
  *
  *  MAJOR.MINOR.PATCH
  */
-#define NFD_VERSION_STRING "0.3.0"
+#define NFD_VERSION_STRING "0.3.1"
 
 /** \brief NFD version string, including git commit information, if NFD is build from
  *         specific git commit
@@ -60,14 +60,14 @@
  *
  * Example, 0.1.0-rc1-1-g5c86570
  */
-#define NFD_VERSION_BUILD_STRING "0.3.0-18-g9a36c76"
+#define NFD_VERSION_BUILD_STRING "0.3.1-14-gce81230"
 
 /// MAJOR version
 #define NFD_VERSION_MAJOR 0
 /// MINOR version
 #define NFD_VERSION_MINOR 3
 /// PATCH version
-#define NFD_VERSION_PATCH 0
+#define NFD_VERSION_PATCH 1
 
 } // namespace nfd
 
diff --git a/app/src/main/jni/nfd-wrapper.cpp b/app/src/main/jni/nfd-wrapper.cpp
index c0508ba..d16049d 100644
--- a/app/src/main/jni/nfd-wrapper.cpp
+++ b/app/src/main/jni/nfd-wrapper.cpp
@@ -97,6 +97,13 @@
       "    keep_alive_interval 25\n"
       "    mcast no\n"
       "  }\n"
+      "  websocket\n"
+      "  {\n"
+      "    listen yes\n"
+      "    port 9696\n"
+      "    enable_v4 yes\n"
+      "    enable_v6 yes\n"
+      "  }\n"
       "}\n"
       "\n"
       "authorizations\n"
diff --git a/app/src/main/jni/nfd.mk b/app/src/main/jni/nfd.mk
index ad7d0f2..0240882 100644
--- a/app/src/main/jni/nfd.mk
+++ b/app/src/main/jni/nfd.mk
@@ -32,7 +32,7 @@
     daemon/face/channel.cpp \
     daemon/face/face.cpp \
     daemon/face/multicast-udp-face.cpp \
-    daemon/face/ndnlp-parse.cpp \
+    daemon/face/ndnlp-data.cpp \
     daemon/face/ndnlp-partial-message-store.cpp \
     daemon/face/ndnlp-sequence-generator.cpp \
     daemon/face/ndnlp-slicer.cpp \
@@ -43,8 +43,10 @@
     daemon/face/udp-channel.cpp \
     daemon/face/udp-face.cpp \
     daemon/face/udp-factory.cpp \
+    daemon/face/websocket-channel.cpp \
+    daemon/face/websocket-face.cpp \
+    daemon/face/websocket-factory.cpp \
     daemon/fw/access-strategy.cpp \
-    daemon/fw/available-strategies.cpp \
     daemon/fw/best-route-strategy.cpp \
     daemon/fw/best-route-strategy2.cpp \
     daemon/fw/broadcast-strategy.cpp \
@@ -53,8 +55,11 @@
     daemon/fw/forwarder.cpp \
     daemon/fw/ncc-strategy.cpp \
     daemon/fw/retx-suppression-fixed.cpp \
+    daemon/fw/retx-suppression-exponential.cpp \
+    daemon/fw/retx-suppression.cpp \
     daemon/fw/rtt-estimator.cpp \
     daemon/fw/strategy.cpp \
+    daemon/fw/strategy-registry.cpp \
     daemon/nfd.cpp \
     daemon/mgmt/channel-status-publisher.cpp \
     daemon/mgmt/command-validator.cpp \
@@ -72,7 +77,6 @@
     daemon/mgmt/tables-config-section.cpp \
     daemon/table/cs-entry-impl.cpp \
     daemon/table/cs-entry.cpp \
-    daemon/table/cs-skip-list-entry.cpp \
     daemon/table/cs.cpp \
     daemon/table/dead-nonce-list.cpp \
     daemon/table/fib-entry.cpp \
@@ -93,13 +97,17 @@
     daemon/table/strategy-info-host.cpp \
     \
     rib/fib-update.cpp \
+    rib/fib-updater.cpp \
     rib/nrd.cpp \
     rib/remote-registrator.cpp \
     rib/rib-entry.cpp \
     rib/rib-manager.cpp \
     rib/rib-status-publisher.cpp \
-    rib/rib.cpp
+    rib/rib-update-batch.cpp \
+    rib/rib-update.cpp \
+    rib/rib.cpp \
+    rib/route.cpp
 LOCAL_SRC_FILES := $(addprefix NFD/,$(NFD_DAEMON_SRC_FILES))
-LOCAL_CPPFLAGS := -I$(LOCAL_PATH)/NFD/daemon -I$(LOCAL_PATH)/NFD/rib
+LOCAL_CPPFLAGS := -I$(LOCAL_PATH)/NFD/daemon -I$(LOCAL_PATH)/NFD/rib -I$(LOCAL_PATH)/NFD/websocketpp
 LOCAL_LDLIBS := -llog
 include $(BUILD_SHARED_LIBRARY)