| 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_ZhttpServer.h" |
| 12 |
|
| 13 |
JNIEXPORT jlong JNICALL |
| 14 |
Java_org_zeromq_czmq_ZhttpServer__1_1new (JNIEnv *env, jclass c, jlong options) |
| 15 |
{ |
| 16 |
// Disable CZMQ signal handling; allow Java to deal with it |
| 17 |
zsys_handler_set (NULL); |
| 18 |
jlong new_ = (jlong) (intptr_t) zhttp_server_new ((zhttp_server_options_t *) (intptr_t) options); |
| 19 |
return new_; |
| 20 |
} |
| 21 |
|
| 22 |
JNIEXPORT void JNICALL |
| 23 |
Java_org_zeromq_czmq_ZhttpServer__1_1destroy (JNIEnv *env, jclass c, jlong self) |
| 24 |
{ |
| 25 |
zhttp_server_destroy ((zhttp_server_t **) &self); |
| 26 |
} |
| 27 |
|
| 28 |
JNIEXPORT jint JNICALL |
| 29 |
Java_org_zeromq_czmq_ZhttpServer__1_1port (JNIEnv *env, jclass c, jlong self) |
| 30 |
{ |
| 31 |
jint port_ = (jint) zhttp_server_port ((zhttp_server_t *) (intptr_t) self); |
| 32 |
return port_; |
| 33 |
} |
| 34 |
|
| 35 |
JNIEXPORT void JNICALL |
| 36 |
Java_org_zeromq_czmq_ZhttpServer__1_1test (JNIEnv *env, jclass c, jboolean verbose) |
| 37 |
{ |
| 38 |
zhttp_server_test ((bool) verbose); |
| 39 |
} |
| 40 |
|