Debian Codegraph @

bindings/jni/czmq-jni/src/main/c/org_zeromq_czmq_Zproc.c

raw
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_Zproc.h"
12
13 JNIEXPORT jlong JNICALL
14 Java_org_zeromq_czmq_Zproc__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) zproc_new ();
19 return new_;
20 }
21
22 JNIEXPORT void JNICALL
23 Java_org_zeromq_czmq_Zproc__1_1destroy (JNIEnv *env, jclass c, jlong self)
24 {
25 zproc_destroy ((zproc_t **) &self);
26 }
27
28 JNIEXPORT jlong JNICALL
29 Java_org_zeromq_czmq_Zproc__1_1args (JNIEnv *env, jclass c, jlong self)
30 {
31 jlong args_ = (jlong) (intptr_t) zproc_args ((zproc_t *) (intptr_t) self);
32 return args_;
33 }
34
35 JNIEXPORT void JNICALL
36 Java_org_zeromq_czmq_Zproc__1_1setArgs (JNIEnv *env, jclass c, jlong self, jlong arguments)
37 {
38 zproc_set_args ((zproc_t *) (intptr_t) self, (zlist_t **) (intptr_t) &arguments);
39 }
40
41 JNIEXPORT void JNICALL
42 Java_org_zeromq_czmq_Zproc__1_1setArgsx (JNIEnv *env, jclass c, jlong self, jstring arguments)
43 {
44 char *arguments_ = (char *) (*env)->GetStringUTFChars (env, arguments, NULL);
45 zproc_set_argsx ((zproc_t *) (intptr_t) self, arguments_, NULL);
46 (*env)->ReleaseStringUTFChars (env, arguments, arguments_);
47 }
48
49 JNIEXPORT void JNICALL
50 Java_org_zeromq_czmq_Zproc__1_1setEnv (JNIEnv *env, jclass c, jlong self, jlong arguments)
51 {
52 zproc_set_env ((zproc_t *) (intptr_t) self, (zhash_t **) (intptr_t) &arguments);
53 }
54
55 JNIEXPORT void JNICALL
56 Java_org_zeromq_czmq_Zproc__1_1setStdin (JNIEnv *env, jclass c, jlong self, jlong socket)
57 {
58 zproc_set_stdin ((zproc_t *) (intptr_t) self, (void *) (intptr_t) socket);
59 }
60
61 JNIEXPORT void JNICALL
62 Java_org_zeromq_czmq_Zproc__1_1setStdout (JNIEnv *env, jclass c, jlong self, jlong socket)
63 {
64 zproc_set_stdout ((zproc_t *) (intptr_t) self, (void *) (intptr_t) socket);
65 }
66
67 JNIEXPORT void JNICALL
68 Java_org_zeromq_czmq_Zproc__1_1setStderr (JNIEnv *env, jclass c, jlong self, jlong socket)
69 {
70 zproc_set_stderr ((zproc_t *) (intptr_t) self, (void *) (intptr_t) socket);
71 }
72
73 JNIEXPORT jlong JNICALL
74 Java_org_zeromq_czmq_Zproc__1_1stdin (JNIEnv *env, jclass c, jlong self)
75 {
76 jlong stdin_ = (jlong) (intptr_t) zproc_stdin ((zproc_t *) (intptr_t) self);
77 return stdin_;
78 }
79
80 JNIEXPORT jlong JNICALL
81 Java_org_zeromq_czmq_Zproc__1_1stdout (JNIEnv *env, jclass c, jlong self)
82 {
83 jlong stdout_ = (jlong) (intptr_t) zproc_stdout ((zproc_t *) (intptr_t) self);
84 return stdout_;
85 }
86
87 JNIEXPORT jlong JNICALL
88 Java_org_zeromq_czmq_Zproc__1_1stderr (JNIEnv *env, jclass c, jlong self)
89 {
90 jlong stderr_ = (jlong) (intptr_t) zproc_stderr ((zproc_t *) (intptr_t) self);
91 return stderr_;
92 }
93
94 JNIEXPORT jint JNICALL
95 Java_org_zeromq_czmq_Zproc__1_1run (JNIEnv *env, jclass c, jlong self)
96 {
97 jint run_ = (jint) zproc_run ((zproc_t *) (intptr_t) self);
98 return run_;
99 }
100
101 JNIEXPORT jint JNICALL
102 Java_org_zeromq_czmq_Zproc__1_1returncode (JNIEnv *env, jclass c, jlong self)
103 {
104 jint returncode_ = (jint) zproc_returncode ((zproc_t *) (intptr_t) self);
105 return returncode_;
106 }
107
108 JNIEXPORT jint JNICALL
109 Java_org_zeromq_czmq_Zproc__1_1pid (JNIEnv *env, jclass c, jlong self)
110 {
111 jint pid_ = (jint) zproc_pid ((zproc_t *) (intptr_t) self);
112 return pid_;
113 }
114
115 JNIEXPORT jboolean JNICALL
116 Java_org_zeromq_czmq_Zproc__1_1running (JNIEnv *env, jclass c, jlong self)
117 {
118 jboolean running_ = (jboolean) zproc_running ((zproc_t *) (intptr_t) self);
119 return running_;
120 }
121
122 JNIEXPORT jint JNICALL
123 Java_org_zeromq_czmq_Zproc__1_1wait (JNIEnv *env, jclass c, jlong self, jint timeout)
124 {
125 jint wait_ = (jint) zproc_wait ((zproc_t *) (intptr_t) self, (int) timeout);
126 return wait_;
127 }
128
129 JNIEXPORT void JNICALL
130 Java_org_zeromq_czmq_Zproc__1_1shutdown (JNIEnv *env, jclass c, jlong self, jint timeout)
131 {
132 zproc_shutdown ((zproc_t *) (intptr_t) self, (int) timeout);
133 }
134
135 JNIEXPORT jlong JNICALL
136 Java_org_zeromq_czmq_Zproc__1_1actor (JNIEnv *env, jclass c, jlong self)
137 {
138 jlong actor_ = (jlong) (intptr_t) zproc_actor ((zproc_t *) (intptr_t) self);
139 return actor_;
140 }
141
142 JNIEXPORT void JNICALL
143 Java_org_zeromq_czmq_Zproc__1_1kill (JNIEnv *env, jclass c, jlong self, jint signal)
144 {
145 zproc_kill ((zproc_t *) (intptr_t) self, (int) signal);
146 }
147
148 JNIEXPORT void JNICALL
149 Java_org_zeromq_czmq_Zproc__1_1setVerbose (JNIEnv *env, jclass c, jlong self, jboolean verbose)
150 {
151 zproc_set_verbose ((zproc_t *) (intptr_t) self, (bool) verbose);
152 }
153
154 JNIEXPORT void JNICALL
155 Java_org_zeromq_czmq_Zproc__1_1test (JNIEnv *env, jclass c, jboolean verbose)
156 {
157 zproc_test ((bool) verbose);
158 }
159