This repository has been archived on 2025-09-14. You can view files and clone it, but cannot push or open issues or pull requests.
Files
zhangyang-zerotierone/java/jni/ZT1_jniutils.h
Grant Limberg 99af0f3a88 moved creation of VirtualNetworkConfig objects to ZT1_jniutils
added implementation of networks() method
2015-04-24 18:20:10 -07:00

32 lines
949 B
C

#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 createPeerRole(JNIEnv *env, ZT1_PeerRole role);
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);
jobject newPeer(JNIEnv *env, const ZT1_Peer &peer);
jobject newPeerPhysicalPath(JNIEnv *env, const ZT1_PeerPhysicalPath &ppp);
jobject newNetworkConfig(JNIEnv *env, const ZT1_VirtualNetworkConfig &config);
#ifdef __cplusplus
}
#endif
#endif