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_Zhashx.h"
12 
13 JNIEXPORT jlong JNICALL
Java_org_zeromq_czmq_Zhashx__1_1new(JNIEnv * env,jclass c)14 Java_org_zeromq_czmq_Zhashx__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) zhashx_new ();
19     return new_;
20 }
21 
22 JNIEXPORT jlong JNICALL
Java_org_zeromq_czmq_Zhashx__1_1unpack(JNIEnv * env,jclass c,jlong frame)23 Java_org_zeromq_czmq_Zhashx__1_1unpack (JNIEnv *env, jclass c, jlong frame)
24 {
25     jlong unpack_ = (jlong) (intptr_t) zhashx_unpack ((zframe_t *) (intptr_t) frame);
26     return unpack_;
27 }
28 
29 JNIEXPORT void JNICALL
Java_org_zeromq_czmq_Zhashx__1_1destroy(JNIEnv * env,jclass c,jlong self)30 Java_org_zeromq_czmq_Zhashx__1_1destroy (JNIEnv *env, jclass c, jlong self)
31 {
32     zhashx_destroy ((zhashx_t **) &self);
33 }
34 
35 JNIEXPORT jint JNICALL
Java_org_zeromq_czmq_Zhashx__1_1insert(JNIEnv * env,jclass c,jlong self,jlong key,jlong item)36 Java_org_zeromq_czmq_Zhashx__1_1insert (JNIEnv *env, jclass c, jlong self, jlong key, jlong item)
37 {
38     jint insert_ = (jint) zhashx_insert ((zhashx_t *) (intptr_t) self, (const void *) (intptr_t) key, (void *) (intptr_t) item);
39     return insert_;
40 }
41 
42 JNIEXPORT void JNICALL
Java_org_zeromq_czmq_Zhashx__1_1update(JNIEnv * env,jclass c,jlong self,jlong key,jlong item)43 Java_org_zeromq_czmq_Zhashx__1_1update (JNIEnv *env, jclass c, jlong self, jlong key, jlong item)
44 {
45     zhashx_update ((zhashx_t *) (intptr_t) self, (const void *) (intptr_t) key, (void *) (intptr_t) item);
46 }
47 
48 JNIEXPORT void JNICALL
Java_org_zeromq_czmq_Zhashx__1_1delete(JNIEnv * env,jclass c,jlong self,jlong key)49 Java_org_zeromq_czmq_Zhashx__1_1delete (JNIEnv *env, jclass c, jlong self, jlong key)
50 {
51     zhashx_delete ((zhashx_t *) (intptr_t) self, (const void *) (intptr_t) key);
52 }
53 
54 JNIEXPORT void JNICALL
Java_org_zeromq_czmq_Zhashx__1_1purge(JNIEnv * env,jclass c,jlong self)55 Java_org_zeromq_czmq_Zhashx__1_1purge (JNIEnv *env, jclass c, jlong self)
56 {
57     zhashx_purge ((zhashx_t *) (intptr_t) self);
58 }
59 
60 JNIEXPORT jlong JNICALL
Java_org_zeromq_czmq_Zhashx__1_1lookup(JNIEnv * env,jclass c,jlong self,jlong key)61 Java_org_zeromq_czmq_Zhashx__1_1lookup (JNIEnv *env, jclass c, jlong self, jlong key)
62 {
63     jlong lookup_ = (jlong) (intptr_t) zhashx_lookup ((zhashx_t *) (intptr_t) self, (const void *) (intptr_t) key);
64     return lookup_;
65 }
66 
67 JNIEXPORT jint JNICALL
Java_org_zeromq_czmq_Zhashx__1_1rename(JNIEnv * env,jclass c,jlong self,jlong old_key,jlong new_key)68 Java_org_zeromq_czmq_Zhashx__1_1rename (JNIEnv *env, jclass c, jlong self, jlong old_key, jlong new_key)
69 {
70     jint rename_ = (jint) zhashx_rename ((zhashx_t *) (intptr_t) self, (const void *) (intptr_t) old_key, (const void *) (intptr_t) new_key);
71     return rename_;
72 }
73 
74 JNIEXPORT jlong JNICALL
Java_org_zeromq_czmq_Zhashx__1_1size(JNIEnv * env,jclass c,jlong self)75 Java_org_zeromq_czmq_Zhashx__1_1size (JNIEnv *env, jclass c, jlong self)
76 {
77     jlong size_ = (jlong) zhashx_size ((zhashx_t *) (intptr_t) self);
78     return size_;
79 }
80 
81 JNIEXPORT jlong JNICALL
Java_org_zeromq_czmq_Zhashx__1_1keys(JNIEnv * env,jclass c,jlong self)82 Java_org_zeromq_czmq_Zhashx__1_1keys (JNIEnv *env, jclass c, jlong self)
83 {
84     jlong keys_ = (jlong) (intptr_t) zhashx_keys ((zhashx_t *) (intptr_t) self);
85     return keys_;
86 }
87 
88 JNIEXPORT jlong JNICALL
Java_org_zeromq_czmq_Zhashx__1_1values(JNIEnv * env,jclass c,jlong self)89 Java_org_zeromq_czmq_Zhashx__1_1values (JNIEnv *env, jclass c, jlong self)
90 {
91     jlong values_ = (jlong) (intptr_t) zhashx_values ((zhashx_t *) (intptr_t) self);
92     return values_;
93 }
94 
95 JNIEXPORT jlong JNICALL
Java_org_zeromq_czmq_Zhashx__1_1first(JNIEnv * env,jclass c,jlong self)96 Java_org_zeromq_czmq_Zhashx__1_1first (JNIEnv *env, jclass c, jlong self)
97 {
98     jlong first_ = (jlong) (intptr_t) zhashx_first ((zhashx_t *) (intptr_t) self);
99     return first_;
100 }
101 
102 JNIEXPORT jlong JNICALL
Java_org_zeromq_czmq_Zhashx__1_1next(JNIEnv * env,jclass c,jlong self)103 Java_org_zeromq_czmq_Zhashx__1_1next (JNIEnv *env, jclass c, jlong self)
104 {
105     jlong next_ = (jlong) (intptr_t) zhashx_next ((zhashx_t *) (intptr_t) self);
106     return next_;
107 }
108 
109 JNIEXPORT jlong JNICALL
Java_org_zeromq_czmq_Zhashx__1_1cursor(JNIEnv * env,jclass c,jlong self)110 Java_org_zeromq_czmq_Zhashx__1_1cursor (JNIEnv *env, jclass c, jlong self)
111 {
112     jlong cursor_ = (jlong) (intptr_t) zhashx_cursor ((zhashx_t *) (intptr_t) self);
113     return cursor_;
114 }
115 
116 JNIEXPORT void JNICALL
Java_org_zeromq_czmq_Zhashx__1_1comment(JNIEnv * env,jclass c,jlong self,jstring format)117 Java_org_zeromq_czmq_Zhashx__1_1comment (JNIEnv *env, jclass c, jlong self, jstring format)
118 {
119     char *format_ = (char *) (*env)->GetStringUTFChars (env, format, NULL);
120     zhashx_comment ((zhashx_t *) (intptr_t) self, "%s", format_);
121     (*env)->ReleaseStringUTFChars (env, format, format_);
122 }
123 
124 JNIEXPORT jint JNICALL
Java_org_zeromq_czmq_Zhashx__1_1save(JNIEnv * env,jclass c,jlong self,jstring filename)125 Java_org_zeromq_czmq_Zhashx__1_1save (JNIEnv *env, jclass c, jlong self, jstring filename)
126 {
127     char *filename_ = (char *) (*env)->GetStringUTFChars (env, filename, NULL);
128     jint save_ = (jint) zhashx_save ((zhashx_t *) (intptr_t) self, filename_);
129     (*env)->ReleaseStringUTFChars (env, filename, filename_);
130     return save_;
131 }
132 
133 JNIEXPORT jint JNICALL
Java_org_zeromq_czmq_Zhashx__1_1load(JNIEnv * env,jclass c,jlong self,jstring filename)134 Java_org_zeromq_czmq_Zhashx__1_1load (JNIEnv *env, jclass c, jlong self, jstring filename)
135 {
136     char *filename_ = (char *) (*env)->GetStringUTFChars (env, filename, NULL);
137     jint load_ = (jint) zhashx_load ((zhashx_t *) (intptr_t) self, filename_);
138     (*env)->ReleaseStringUTFChars (env, filename, filename_);
139     return load_;
140 }
141 
142 JNIEXPORT jint JNICALL
Java_org_zeromq_czmq_Zhashx__1_1refresh(JNIEnv * env,jclass c,jlong self)143 Java_org_zeromq_czmq_Zhashx__1_1refresh (JNIEnv *env, jclass c, jlong self)
144 {
145     jint refresh_ = (jint) zhashx_refresh ((zhashx_t *) (intptr_t) self);
146     return refresh_;
147 }
148 
149 JNIEXPORT jlong JNICALL
Java_org_zeromq_czmq_Zhashx__1_1pack(JNIEnv * env,jclass c,jlong self)150 Java_org_zeromq_czmq_Zhashx__1_1pack (JNIEnv *env, jclass c, jlong self)
151 {
152     jlong pack_ = (jlong) (intptr_t) zhashx_pack ((zhashx_t *) (intptr_t) self);
153     return pack_;
154 }
155 
156 JNIEXPORT jlong JNICALL
Java_org_zeromq_czmq_Zhashx__1_1dup(JNIEnv * env,jclass c,jlong self)157 Java_org_zeromq_czmq_Zhashx__1_1dup (JNIEnv *env, jclass c, jlong self)
158 {
159     jlong dup_ = (jlong) (intptr_t) zhashx_dup ((zhashx_t *) (intptr_t) self);
160     return dup_;
161 }
162 
163 JNIEXPORT jlong JNICALL
Java_org_zeromq_czmq_Zhashx__1_1dupV2(JNIEnv * env,jclass c,jlong self)164 Java_org_zeromq_czmq_Zhashx__1_1dupV2 (JNIEnv *env, jclass c, jlong self)
165 {
166     jlong dup_v2_ = (jlong) (intptr_t) zhashx_dup_v2 ((zhashx_t *) (intptr_t) self);
167     return dup_v2_;
168 }
169 
170 JNIEXPORT void JNICALL
Java_org_zeromq_czmq_Zhashx__1_1test(JNIEnv * env,jclass c,jboolean verbose)171 Java_org_zeromq_czmq_Zhashx__1_1test (JNIEnv *env, jclass c, jboolean verbose)
172 {
173     zhashx_test ((bool) verbose);
174 }
175 
176