summaryrefslogtreecommitdiff
path: root/java/jni/ZT1_jniutils.h
blob: e881e394981065892a1ae869a12d5731d163516b (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
#ifndef ZT1_jniutils_h_
#define ZT1_jniutils_h_
#include <jni.h>
#include <ZeroTierOne.h>

#ifdef __cplusplus
extern "C" {
#endif

jobject createResultObject(JNIEnv *env, ZT1_ResultCode code);
jobject createVirtualNetworkStatus(JNIEnv *env, ZT1_VirtualNetworkStatus status);
jobject createVirtualNetworkType(JNIEnv *env, ZT1_VirtualNetworkType type);
jobject createEvent(JNIEnv *env, ZT1_Event event);

jobject newArrayList(JNIEnv *env);
bool appendItemToArrayList(JNIEnv *env, jobject array, jobject object);

jobject newInetAddress(JNIEnv *env, const sockaddr_storage &addr);

jobject newMulticastGroup(JNIEnv *env, const ZT1_MulticastGroup &mc);
#ifdef __cplusplus
}
#endif

#endif