added a few missing function calls in the ZT1 Node API

Signed-off-by: Grant Limberg <glimberg@gmail.com>
This commit is contained in:
Grant Limberg 2015-04-22 19:36:46 -07:00
parent 6187a91f4c
commit 9c038d3ecd
2 changed files with 52 additions and 0 deletions

View File

@ -87,6 +87,30 @@ JNIEXPORT jobject JNICALL Java_com_zerotierone_sdk_Node_multicastUnsubscribe
JNIEXPORT jlong JNICALL Java_com_zerotierone_sdk_Node_address
(JNIEnv *, jobject, jlong);
/*
* Class: com_zerotierone_sdk_Node
* Method: status
* Signature: (J)Lcom/zerotierone/sdk/NodeStatus;
*/
JNIEXPORT jobject JNICALL Java_com_zerotierone_sdk_Node_status
(JNIEnv *, jobject, jlong);
/*
* Class: com_zerotierone_sdk_Node
* Method: networkConfig
* Signature: (J)Lcom/zerotierone/sdk/VirtualNetworkConfig;
*/
JNIEXPORT jobject JNICALL Java_com_zerotierone_sdk_Node_networkConfig
(JNIEnv *, jobject, jlong);
/*
* Class: com_zerotierone_sdk_Node
* Method: version
* Signature: (J)Lcom/zerotierone/sdk/Version;
*/
JNIEXPORT jobject JNICALL Java_com_zerotierone_sdk_Node_version
(JNIEnv *, jobject, jlong);
#ifdef __cplusplus
}
#endif

View File

@ -153,6 +153,22 @@ public class Node {
return address(nodeId);
}
public NodeStatus status() {
return status(nodeId);
}
// TODO: ZT1_Node_peers
public VirtualNetworkConfig networkConfig() {
return networkConfig(nodeId);
}
// TODO: ZT1_Node_networks
public Version version() {
return version(nodeId);
}
/**
* function declarations for JNI
*/
@ -201,4 +217,16 @@ public class Node {
long multicastAdi);
private native long address(long nodeId);
private native NodeStatus status(long nodeId);
// TODO: ZT1_Node_peers
private native VirtualNetworkConfig networkConfig(long nodeId);
// TODO: ZT1_Node_networks
private native Version version(long nodeId);
}