| 1 |
/* |
| 2 |
################################################################################ |
| 3 |
# THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY # |
| 4 |
# Read the zproject/README.md for information about making permanent changes. # |
| 5 |
################################################################################ |
| 6 |
*/ |
| 7 |
#include <stdio.h> |
| 8 |
#include <stdlib.h> |
| 9 |
#include <jni.h> |
| 10 |
#include "czmq.h" |
| 11 |
#include "org_zeromq_czmq_Zcertstore.h" |
| 12 |
|
| 13 |
JNIEXPORT jlong JNICALL |
| 14 |
Java_org_zeromq_czmq_Zcertstore__1_1new (JNIEnv *env, jclass c, jstring location) |
| 15 |
{ |
| 16 |
char *location_ = (char *) (*env)->GetStringUTFChars (env, location, NULL); |
| 17 |
// Disable CZMQ signal handling; allow Java to deal with it |
| 18 |
zsys_handler_set (NULL); |
| 19 |
jlong new_ = (jlong) (intptr_t) zcertstore_new (location_); |
| 20 |
(*env)->ReleaseStringUTFChars (env, location, location_); |
| 21 |
return new_; |
| 22 |
} |
| 23 |
|
| 24 |
JNIEXPORT void JNICALL |
| 25 |
Java_org_zeromq_czmq_Zcertstore__1_1destroy (JNIEnv *env, jclass c, jlong self) |
| 26 |
{ |
| 27 |
zcertstore_destroy ((zcertstore_t **) &self); |
| 28 |
} |
| 29 |
|
| 30 |
JNIEXPORT jlong JNICALL |
| 31 |
Java_org_zeromq_czmq_Zcertstore__1_1lookup (JNIEnv *env, jclass c, jlong self, jstring public_key) |
| 32 |
{ |
| 33 |
char *public_key_ = (char *) (*env)->GetStringUTFChars (env, public_key, NULL); |
| 34 |
jlong lookup_ = (jlong) (intptr_t) zcertstore_lookup ((zcertstore_t *) (intptr_t) self, public_key_); |
| 35 |
(*env)->ReleaseStringUTFChars (env, public_key, public_key_); |
| 36 |
return lookup_; |
| 37 |
} |
| 38 |
|
| 39 |
JNIEXPORT void JNICALL |
| 40 |
Java_org_zeromq_czmq_Zcertstore__1_1insert (JNIEnv *env, jclass c, jlong self, jlong cert_p) |
| 41 |
{ |
| 42 |
zcertstore_insert ((zcertstore_t *) (intptr_t) self, (zcert_t **) (intptr_t) &cert_p); |
| 43 |
} |
| 44 |
|
| 45 |
JNIEXPORT void JNICALL |
| 46 |
Java_org_zeromq_czmq_Zcertstore__1_1empty (JNIEnv *env, jclass c, jlong self) |
| 47 |
{ |
| 48 |
zcertstore_empty ((zcertstore_t *) (intptr_t) self); |
| 49 |
} |
| 50 |
|
| 51 |
JNIEXPORT void JNICALL |
| 52 |
Java_org_zeromq_czmq_Zcertstore__1_1print (JNIEnv *env, jclass c, jlong self) |
| 53 |
{ |
| 54 |
zcertstore_print ((zcertstore_t *) (intptr_t) self); |
| 55 |
} |
| 56 |
|
| 57 |
JNIEXPORT jlong JNICALL |
| 58 |
Java_org_zeromq_czmq_Zcertstore__1_1certs (JNIEnv *env, jclass c, jlong self) |
| 59 |
{ |
| 60 |
jlong certs_ = (jlong) (intptr_t) zcertstore_certs ((zcertstore_t *) (intptr_t) self); |
| 61 |
return certs_; |
| 62 |
} |
| 63 |
|
| 64 |
JNIEXPORT jlong JNICALL |
| 65 |
Java_org_zeromq_czmq_Zcertstore__1_1state (JNIEnv *env, jclass c, jlong self) |
| 66 |
{ |
| 67 |
jlong state_ = (jlong) (intptr_t) zcertstore_state ((zcertstore_t *) (intptr_t) self); |
| 68 |
return state_; |
| 69 |
} |
| 70 |
|
| 71 |
JNIEXPORT void JNICALL |
| 72 |
Java_org_zeromq_czmq_Zcertstore__1_1test (JNIEnv *env, jclass c, jboolean verbose) |
| 73 |
{ |
| 74 |
zcertstore_test ((bool) verbose); |
| 75 |
} |
| 76 |
|