| 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_ZhttpServerOptions.h" |
| 12 |
|
| 13 |
JNIEXPORT jlong JNICALL |
| 14 |
Java_org_zeromq_czmq_ZhttpServerOptions__1_1new (JNIEnv *env, jclass c) |
| 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_options_new (); |
| 19 |
return new_; |
| 20 |
} |
| 21 |
|
| 22 |
JNIEXPORT jlong JNICALL |
| 23 |
Java_org_zeromq_czmq_ZhttpServerOptions__1_1fromConfig (JNIEnv *env, jclass c, jlong config) |
| 24 |
{ |
| 25 |
jlong from_config_ = (jlong) (intptr_t) zhttp_server_options_from_config ((zconfig_t *) (intptr_t) config); |
| 26 |
return from_config_; |
| 27 |
} |
| 28 |
|
| 29 |
JNIEXPORT void JNICALL |
| 30 |
Java_org_zeromq_czmq_ZhttpServerOptions__1_1destroy (JNIEnv *env, jclass c, jlong self) |
| 31 |
{ |
| 32 |
zhttp_server_options_destroy ((zhttp_server_options_t **) &self); |
| 33 |
} |
| 34 |
|
| 35 |
JNIEXPORT jint JNICALL |
| 36 |
Java_org_zeromq_czmq_ZhttpServerOptions__1_1port (JNIEnv *env, jclass c, jlong self) |
| 37 |
{ |
| 38 |
jint port_ = (jint) zhttp_server_options_port ((zhttp_server_options_t *) (intptr_t) self); |
| 39 |
return port_; |
| 40 |
} |
| 41 |
|
| 42 |
JNIEXPORT void JNICALL |
| 43 |
Java_org_zeromq_czmq_ZhttpServerOptions__1_1setPort (JNIEnv *env, jclass c, jlong self, jint port) |
| 44 |
{ |
| 45 |
zhttp_server_options_set_port ((zhttp_server_options_t *) (intptr_t) self, (int) port); |
| 46 |
} |
| 47 |
|
| 48 |
JNIEXPORT jstring JNICALL |
| 49 |
Java_org_zeromq_czmq_ZhttpServerOptions__1_1backendAddress (JNIEnv *env, jclass c, jlong self) |
| 50 |
{ |
| 51 |
char *backend_address_ = (char *) zhttp_server_options_backend_address ((zhttp_server_options_t *) (intptr_t) self); |
| 52 |
jstring return_string_ = (*env)->NewStringUTF (env, backend_address_); |
| 53 |
return return_string_; |
| 54 |
} |
| 55 |
|
| 56 |
JNIEXPORT void JNICALL |
| 57 |
Java_org_zeromq_czmq_ZhttpServerOptions__1_1setBackendAddress (JNIEnv *env, jclass c, jlong self, jstring address) |
| 58 |
{ |
| 59 |
char *address_ = (char *) (*env)->GetStringUTFChars (env, address, NULL); |
| 60 |
zhttp_server_options_set_backend_address ((zhttp_server_options_t *) (intptr_t) self, address_); |
| 61 |
(*env)->ReleaseStringUTFChars (env, address, address_); |
| 62 |
} |
| 63 |
|
| 64 |
JNIEXPORT void JNICALL |
| 65 |
Java_org_zeromq_czmq_ZhttpServerOptions__1_1test (JNIEnv *env, jclass c, jboolean verbose) |
| 66 |
{ |
| 67 |
zhttp_server_options_test ((bool) verbose); |
| 68 |
} |
| 69 |
|