From bfb152f53f528934583ee76437453a005610a7ea Mon Sep 17 00:00:00 2001
From: Grant Limberg
Date: Wed, 24 Jun 2015 20:31:22 -0700
Subject: configure the NDK to build all supported ABIs and package them up in
the jar
---
java/jni/Application.mk | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
(limited to 'java/jni/Application.mk')
diff --git a/java/jni/Application.mk b/java/jni/Application.mk
index 3118ec2e..8b6c8020 100644
--- a/java/jni/Application.mk
+++ b/java/jni/Application.mk
@@ -1,4 +1,5 @@
APP_ABI := armeabi armeabi-v7a arm64-v8a x86
APP_STL := gnustl_static
-APP_CPPFLAGS += -Wall -fPIE -fstack-protector -fexceptions -DZT_TRACE
-
+APP_CPPFLAGS += -Wall -fPIE -fstack-protector -fexceptions
+APP_PLATFORM := android-14
+APP_ABI := all
--
cgit v1.2.3
From 0b7cd2f40a9502a797eff49db12f6f892e319f45 Mon Sep 17 00:00:00 2001
From: Grant Limberg
Date: Wed, 1 Jul 2015 20:26:14 -0700
Subject: change some build settings. add a lock
---
java/CMakeLists.txt | 1 +
java/jni/Android.mk | 1 +
java/jni/Application.mk | 6 +++---
java/jni/com_zerotierone_sdk_Node.cpp | 23 ++++++++++++++++++++---
4 files changed, 25 insertions(+), 6 deletions(-)
(limited to 'java/jni/Application.mk')
diff --git a/java/CMakeLists.txt b/java/CMakeLists.txt
index 382fd3cd..484517f8 100644
--- a/java/CMakeLists.txt
+++ b/java/CMakeLists.txt
@@ -59,6 +59,7 @@ set(src_files
set(include_dirs
${CMAKE_CURRENT_SOURCE_DIR}/../include/
+ ${CMAKE_CURRENT_SOURCE_DIR}/../node/
${Java_INCLUDE_DIRS})
if(WIN32)
diff --git a/java/jni/Android.mk b/java/jni/Android.mk
index 15ba3875..56e6fb80 100644
--- a/java/jni/Android.mk
+++ b/java/jni/Android.mk
@@ -4,6 +4,7 @@ include $(CLEAR_VARS)
LOCAL_MODULE := ZeroTierOneJNI
LOCAL_C_INCLUDES := $(ZT1)/include
+LOCAL_C_INCLUDES += $(ZT1)/node
LOCAL_LDLIBS := -llog
# LOCAL_CFLAGS := -g
diff --git a/java/jni/Application.mk b/java/jni/Application.mk
index 8b6c8020..0f369730 100644
--- a/java/jni/Application.mk
+++ b/java/jni/Application.mk
@@ -1,5 +1,5 @@
-APP_ABI := armeabi armeabi-v7a arm64-v8a x86
-APP_STL := gnustl_static
-APP_CPPFLAGS += -Wall -fPIE -fstack-protector -fexceptions
+NDK_TOOLCHAIN_VERSION := clang
+APP_STL := c++_static
+APP_CPPFLAGS := -O2 -fPIE -fvectorize -Wall -fstack-protector -fexceptions -fno-strict-aliasing
APP_PLATFORM := android-14
APP_ABI := all
diff --git a/java/jni/com_zerotierone_sdk_Node.cpp b/java/jni/com_zerotierone_sdk_Node.cpp
index e8f7272b..e98342e7 100644
--- a/java/jni/com_zerotierone_sdk_Node.cpp
+++ b/java/jni/com_zerotierone_sdk_Node.cpp
@@ -30,6 +30,7 @@
#include "ZT1_jnilookup.h"
#include
+#include "Mutex.hpp"
#include
*/
EVENT_FATAL_ERROR_IDENTITY_COLLISION,
-
- /**
- * A more recent version was observed on the network
- *
- * Right now this is only triggered if a hub or rootserver reports a
- * more recent version, and only once. It can be used to trigger a
- * software update check.
- *
- * Meta-data: {@link Version}, more recent version number
- */
- EVENT_SAW_MORE_RECENT_VERSION,
-
- /**
- * A packet failed authentication
- *
- * Meta-data: {@link InetSocketAddress} containing origin address of packet
- */
- EVENT_AUTHENTICATION_FAILURE,
-
- /**
- * A received packet was not valid
- *
- * Meta-data: {@link InetSocketAddress} containing origin address of packet
- */
- EVENT_INVALID_PACKET,
/**
* Trace (debugging) message
diff --git a/java/src/com/zerotier/sdk/EventListener.java b/java/src/com/zerotier/sdk/EventListener.java
index bb191c1d..91050aaa 100644
--- a/java/src/com/zerotier/sdk/EventListener.java
+++ b/java/src/com/zerotier/sdk/EventListener.java
@@ -41,21 +41,6 @@ public interface EventListener {
*/
public void onEvent(Event event);
- /**
- * Callback for network error events: {@link Event.EVENT_AUTHENTICATION_FAILURE}, {link Event.EVENT_INVALID_PACKET}
- *
- * @param event {@link Event} enum
- * @param source {@link InetSocketAddress} containing the origin address of the packet
- */
- public void onNetworkError(Event event, InetSocketAddress source);
-
- /**
- * Callback when the node detects that it's out of date.
- *
- * @param newVersion {@link Version} object with the latest version of ZeroTier One
- */
- public void onOutOfDate(Version newVersion);
-
/**
* Trace messages
*
--
cgit v1.2.3