czmq-ffi-gen 0.8.3 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGES.md +10 -0
  3. data/README.md +1 -1
  4. data/lib/czmq-ffi-gen/czmq/ffi/version.rb +2 -2
  5. data/lib/czmq-ffi-gen/czmq/ffi/zactor.rb +2 -2
  6. data/lib/czmq-ffi-gen/czmq/ffi/zarmour.rb +4 -4
  7. data/lib/czmq-ffi-gen/czmq/ffi/zcert.rb +5 -5
  8. data/lib/czmq-ffi-gen/czmq/ffi/zcertstore.rb +59 -2
  9. data/lib/czmq-ffi-gen/czmq/ffi/zchunk.rb +2 -2
  10. data/lib/czmq-ffi-gen/czmq/ffi/zclock.rb +2 -2
  11. data/lib/czmq-ffi-gen/czmq/ffi/zconfig.rb +3 -3
  12. data/lib/czmq-ffi-gen/czmq/ffi/zdigest.rb +5 -5
  13. data/lib/czmq-ffi-gen/czmq/ffi/zdir.rb +2 -2
  14. data/lib/czmq-ffi-gen/czmq/ffi/zdir_patch.rb +2 -2
  15. data/lib/czmq-ffi-gen/czmq/ffi/zfile.rb +2 -2
  16. data/lib/czmq-ffi-gen/czmq/ffi/zframe.rb +14 -2
  17. data/lib/czmq-ffi-gen/czmq/ffi/zhash.rb +2 -2
  18. data/lib/czmq-ffi-gen/czmq/ffi/zhashx.rb +60 -2
  19. data/lib/czmq-ffi-gen/czmq/ffi/ziflist.rb +2 -2
  20. data/lib/czmq-ffi-gen/czmq/ffi/zlist.rb +2 -2
  21. data/lib/czmq-ffi-gen/czmq/ffi/zlistx.rb +2 -2
  22. data/lib/czmq-ffi-gen/czmq/ffi/zloop.rb +2 -2
  23. data/lib/czmq-ffi-gen/czmq/ffi/zmsg.rb +8 -8
  24. data/lib/czmq-ffi-gen/czmq/ffi/zpoller.rb +2 -2
  25. data/lib/czmq-ffi-gen/czmq/ffi/zproc.rb +2 -2
  26. data/lib/czmq-ffi-gen/czmq/ffi/zsock.rb +18 -2
  27. data/lib/czmq-ffi-gen/czmq/ffi/zstr.rb +2 -2
  28. data/lib/czmq-ffi-gen/czmq/ffi/ztimerset.rb +203 -0
  29. data/lib/czmq-ffi-gen/czmq/ffi/ztrie.rb +2 -2
  30. data/lib/czmq-ffi-gen/czmq/ffi/zuuid.rb +2 -2
  31. data/lib/czmq-ffi-gen/czmq/ffi.rb +129 -5
  32. data/lib/czmq-ffi-gen/gem_version.rb +1 -1
  33. data/lib/czmq-ffi-gen/vendor.rb +5 -0
  34. data/lib/czmq-ffi-gen.rb +1 -0
  35. metadata +4 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: cafd1209718d54ece7de5498fe207fc3a17319df
4
- data.tar.gz: fbc29bb11ca9df0c65cc360606e534d64bfa2613
3
+ metadata.gz: 80a165be906eb0fef02b337b7cbffda7deef7ef5
4
+ data.tar.gz: 9cc1ec6897138c275bcb2b34fbbe186179784e5a
5
5
  SHA512:
6
- metadata.gz: bb2add857b69273fc09efa70f1c273ee827ecc27ac348c405792ba16ee25af79895feebf044e387285afe06c0146219350c3616982e46907454d99e1d8e16190
7
- data.tar.gz: 8dd4819ec3036e9b08cbc8b0cf47ead0c07c122cced0f1d50b0f3dc43d5089d2f2ae8d8f1c699b9d2cd396bd07e41b0bef683dd14f2e8413ab99abb050b0d18c
6
+ metadata.gz: 156f3890c0a6e250e3f70c0527390fa92c1966336b0c2ee8f4a65a16b88584855c7e707830e564440da052a434e19fee04968670a1290cd20a6c082973aaa385
7
+ data.tar.gz: 41e3e5097d1503eba99ed272c4247ab8fa91ebe7fbbaa39bf2cce2e88370809db957d6ac2709b433e8650938809b6989562676e2a04b2c9d75c943196b27cccf
data/CHANGES.md CHANGED
@@ -1,3 +1,13 @@
1
+ 0.9.1 (09/19/2016)
2
+ -----
3
+ * no changes, just second try at publishing (publishing of version 0.9.0 failed
4
+ due to human error)
5
+
6
+ 0.9.0 (09/18/2016)
7
+ -----
8
+ * support building and pushing fat gems for Windows x86 and x64
9
+ * upgrade CZMQ low-level binding to fix cross compile errors
10
+
1
11
  0.8.3 (03/29/2016)
2
12
  -----
3
13
  * avoid extra call to wrapper method CZMQ::FFI::Errors.errno (CZTop's test
data/README.md CHANGED
@@ -44,7 +44,7 @@ for the API documentation **for the released gem**.
44
44
 
45
45
  ## Requirements
46
46
 
47
- * CZMQ > 3.0 (master)
47
+ * CZMQ > 3.0 (you **need to** build from master)
48
48
  * ZMQ >= 4.0
49
49
 
50
50
  For security mechanisms like CURVE, you'll need:
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -11,5 +11,5 @@ end
11
11
 
12
12
  ################################################################################
13
13
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
14
- # Please refer to the README for information about making permanent changes. #
14
+ # Read the zproject/README.md for information about making permanent changes. #
15
15
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -182,5 +182,5 @@ end
182
182
 
183
183
  ################################################################################
184
184
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
185
- # Please refer to the README for information about making permanent changes. #
185
+ # Read the zproject/README.md for information about making permanent changes. #
186
186
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -91,14 +91,14 @@ module CZMQ
91
91
  @finalizer = nil
92
92
  end
93
93
 
94
- # Create a new zarmour.
94
+ # Create a new zarmour
95
95
  # @return [CZMQ::Zarmour]
96
96
  def self.new()
97
97
  ptr = ::CZMQ::FFI.zarmour_new()
98
98
  __new ptr
99
99
  end
100
100
 
101
- # Destroy the zarmour.
101
+ # Destroy the zarmour
102
102
  #
103
103
  # @return [void]
104
104
  def destroy()
@@ -282,5 +282,5 @@ end
282
282
 
283
283
  ################################################################################
284
284
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
285
- # Please refer to the README for information about making permanent changes. #
285
+ # Read the zproject/README.md for information about making permanent changes. #
286
286
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -129,7 +129,7 @@ module CZMQ
129
129
 
130
130
  # Return public part of key pair as Z85 armored string
131
131
  #
132
- # @return [::FFI::Pointer]
132
+ # @return [String]
133
133
  def public_txt()
134
134
  raise DestroyedError unless @ptr
135
135
  self_p = @ptr
@@ -139,7 +139,7 @@ module CZMQ
139
139
 
140
140
  # Return secret part of key pair as Z85 armored string
141
141
  #
142
- # @return [::FFI::Pointer]
142
+ # @return [String]
143
143
  def secret_txt()
144
144
  raise DestroyedError unless @ptr
145
145
  self_p = @ptr
@@ -175,7 +175,7 @@ module CZMQ
175
175
  # exist, returns NULL.
176
176
  #
177
177
  # @param name [String, #to_s, nil]
178
- # @return [::FFI::Pointer]
178
+ # @return [String]
179
179
  def meta(name)
180
180
  raise DestroyedError unless @ptr
181
181
  self_p = @ptr
@@ -303,5 +303,5 @@ end
303
303
 
304
304
  ################################################################################
305
305
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
306
- # Please refer to the README for information about making permanent changes. #
306
+ # Read the zproject/README.md for information about making permanent changes. #
307
307
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -73,6 +73,39 @@ module CZMQ
73
73
  @finalizer = nil
74
74
  end
75
75
 
76
+ # Create a new callback of the following type:
77
+ # Loaders retrieve certificates from an arbitrary source.
78
+ # typedef void (zcertstore_loader) (
79
+ # zcertstore_t *self);
80
+ #
81
+ # @note WARNING: If your Ruby code doesn't retain a reference to the
82
+ # FFI::Function object after passing it to a C function call,
83
+ # it may be garbage collected while C still holds the pointer,
84
+ # potentially resulting in a segmentation fault.
85
+ def self.loader
86
+ ::FFI::Function.new :void, [:pointer], blocking: true do |self_|
87
+ self_ = Zcertstore.__new self_, false
88
+ result = yield self_
89
+ result
90
+ end
91
+ end
92
+
93
+ # Create a new callback of the following type:
94
+ # Destructor for loader state.
95
+ # typedef void (zcertstore_destructor) (
96
+ # void **self_p);
97
+ #
98
+ # @note WARNING: If your Ruby code doesn't retain a reference to the
99
+ # FFI::Function object after passing it to a C function call,
100
+ # it may be garbage collected while C still holds the pointer,
101
+ # potentially resulting in a segmentation fault.
102
+ def self.destructor
103
+ ::FFI::Function.new :void, [:pointer], blocking: true do |self_p|
104
+ result = yield self_p
105
+ result
106
+ end
107
+ end
108
+
76
109
  # Create a new certificate store from a disk directory, loading and
77
110
  # indexing all certificates in that location. The directory itself may be
78
111
  # absent, and created later, or modified at any time. The certificate store
@@ -97,6 +130,19 @@ module CZMQ
97
130
  result
98
131
  end
99
132
 
133
+ # Override the default disk loader with a custom loader fn.
134
+ #
135
+ # @param loader [::FFI::Pointer, #to_ptr]
136
+ # @param destructor [::FFI::Pointer, #to_ptr]
137
+ # @param state [::FFI::Pointer, #to_ptr]
138
+ # @return [void]
139
+ def set_loader(loader, destructor, state)
140
+ raise DestroyedError unless @ptr
141
+ self_p = @ptr
142
+ result = ::CZMQ::FFI.zcertstore_set_loader(self_p, loader, destructor, state)
143
+ result
144
+ end
145
+
100
146
  # Look up certificate by public key, returns zcert_t object if found,
101
147
  # else returns NULL. The public key is provided in Z85 text format.
102
148
  #
@@ -124,6 +170,17 @@ module CZMQ
124
170
  result
125
171
  end
126
172
 
173
+ # Empty certificate hashtable. This wrapper exists to be friendly to bindings,
174
+ # which don't usually have access to struct internals.
175
+ #
176
+ # @return [void]
177
+ def empty()
178
+ raise DestroyedError unless @ptr
179
+ self_p = @ptr
180
+ result = ::CZMQ::FFI.zcertstore_empty(self_p)
181
+ result
182
+ end
183
+
127
184
  # Print list of certificates in store to logging facility
128
185
  #
129
186
  # @return [void]
@@ -161,5 +218,5 @@ end
161
218
 
162
219
  ################################################################################
163
220
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
164
- # Please refer to the README for information about making permanent changes. #
221
+ # Read the zproject/README.md for information about making permanent changes. #
165
222
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -384,5 +384,5 @@ end
384
384
 
385
385
  ################################################################################
386
386
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
387
- # Please refer to the README for information about making permanent changes. #
387
+ # Read the zproject/README.md for information about making permanent changes. #
388
388
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -136,5 +136,5 @@ end
136
136
 
137
137
  ################################################################################
138
138
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
139
- # Please refer to the README for information about making permanent changes. #
139
+ # Read the zproject/README.md for information about making permanent changes. #
140
140
  ################################################################################
@@ -1,12 +1,12 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
7
7
  module FFI
8
8
 
9
- # zconfig - work with config files written in rfc.zeromq.org/spec:4/ZPL.
9
+ # work with config files written in rfc.zeromq.org/spec:4/ZPL.
10
10
  # @note This class is 100% generated using zproject.
11
11
  class Zconfig
12
12
  # Raised when one tries to use an instance of {Zconfig} after
@@ -438,5 +438,5 @@ end
438
438
 
439
439
  ################################################################################
440
440
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
441
- # Please refer to the README for information about making permanent changes. #
441
+ # Read the zproject/README.md for information about making permanent changes. #
442
442
  ################################################################################
@@ -1,12 +1,12 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
7
7
  module FFI
8
8
 
9
- # zdigest - provides hashing functions (SHA-1 at present)
9
+ # provides hashing functions (SHA-1 at present)
10
10
  # @note This class is 100% generated using zproject.
11
11
  class Zdigest
12
12
  # Raised when one tries to use an instance of {Zdigest} after
@@ -104,8 +104,8 @@ module CZMQ
104
104
  result
105
105
  end
106
106
 
107
- # Return final digest hash data. If built without crypto support, returns
108
- # NULL.
107
+ # Return final digest hash data. If built without crypto support,
108
+ # returns NULL.
109
109
  #
110
110
  # @return [::FFI::Pointer]
111
111
  def data()
@@ -152,5 +152,5 @@ end
152
152
 
153
153
  ################################################################################
154
154
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
155
- # Please refer to the README for information about making permanent changes. #
155
+ # Read the zproject/README.md for information about making permanent changes. #
156
156
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -279,5 +279,5 @@ end
279
279
 
280
280
  ################################################################################
281
281
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
282
- # Please refer to the README for information about making permanent changes. #
282
+ # Read the zproject/README.md for information about making permanent changes. #
283
283
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -190,5 +190,5 @@ end
190
190
 
191
191
  ################################################################################
192
192
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
193
- # Please refer to the README for information about making permanent changes. #
193
+ # Read the zproject/README.md for information about making permanent changes. #
194
194
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -349,5 +349,5 @@ end
349
349
 
350
350
  ################################################################################
351
351
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
352
- # Please refer to the README for information about making permanent changes. #
352
+ # Read the zproject/README.md for information about making permanent changes. #
353
353
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -163,6 +163,18 @@ module CZMQ
163
163
  result
164
164
  end
165
165
 
166
+ # Return meta data property for frame
167
+ # Caller must free string when finished with it.
168
+ #
169
+ # @param property [String, #to_s, nil]
170
+ # @return [String]
171
+ def meta(property)
172
+ raise DestroyedError unless @ptr
173
+ self_p = @ptr
174
+ result = ::CZMQ::FFI.zframe_meta(self_p, property)
175
+ result
176
+ end
177
+
166
178
  # Create a new frame that duplicates an existing frame. If frame is null,
167
179
  # or memory was exhausted, returns null.
168
180
  #
@@ -343,5 +355,5 @@ end
343
355
 
344
356
  ################################################################################
345
357
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
346
- # Please refer to the README for information about making permanent changes. #
358
+ # Read the zproject/README.md for information about making permanent changes. #
347
359
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -412,5 +412,5 @@ end
412
412
 
413
413
  ################################################################################
414
414
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
415
- # Please refer to the README for information about making permanent changes. #
415
+ # Read the zproject/README.md for information about making permanent changes. #
416
416
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -155,6 +155,40 @@ module CZMQ
155
155
  end
156
156
  end
157
157
 
158
+ # Create a new callback of the following type:
159
+ # Serializes an item to a longstr.
160
+ # The caller takes ownership of the newly created object.
161
+ # typedef char * (zhashx_serializer_fn) (
162
+ # const void *item);
163
+ #
164
+ # @note WARNING: If your Ruby code doesn't retain a reference to the
165
+ # FFI::Function object after passing it to a C function call,
166
+ # it may be garbage collected while C still holds the pointer,
167
+ # potentially resulting in a segmentation fault.
168
+ def self.serializer_fn
169
+ ::FFI::Function.new :pointer, [:pointer], blocking: true do |item|
170
+ result = yield item
171
+ result
172
+ end
173
+ end
174
+
175
+ # Create a new callback of the following type:
176
+ # Deserializes a longstr into an item.
177
+ # The caller takes ownership of the newly created object.
178
+ # typedef void * (zhashx_deserializer_fn) (
179
+ # const char *item_str);
180
+ #
181
+ # @note WARNING: If your Ruby code doesn't retain a reference to the
182
+ # FFI::Function object after passing it to a C function call,
183
+ # it may be garbage collected while C still holds the pointer,
184
+ # potentially resulting in a segmentation fault.
185
+ def self.deserializer_fn
186
+ ::FFI::Function.new :pointer, [:string], blocking: true do |item_str|
187
+ result = yield item_str
188
+ result
189
+ end
190
+ end
191
+
158
192
  # Create a new callback of the following type:
159
193
  # Callback function for zhashx_foreach method.
160
194
  # This callback is deprecated and you should use zhashx_first/_next instead.
@@ -191,6 +225,17 @@ module CZMQ
191
225
  __new ptr
192
226
  end
193
227
 
228
+ # Same as unpack but uses a user-defined deserializer function to convert
229
+ # a longstr back into item format.
230
+ # @param frame [Zframe, #__ptr]
231
+ # @param deserializer [::FFI::Pointer, #to_ptr]
232
+ # @return [CZMQ::Zhashx]
233
+ def self.unpack_own(frame, deserializer)
234
+ frame = frame.__ptr if frame
235
+ ptr = ::CZMQ::FFI.zhashx_unpack_own(frame, deserializer)
236
+ __new ptr
237
+ end
238
+
194
239
  # Destroy a hash container and all items in it
195
240
  #
196
241
  # @return [void]
@@ -455,6 +500,19 @@ module CZMQ
455
500
  result
456
501
  end
457
502
 
503
+ # Same as pack but uses a user-defined serializer function to convert items
504
+ # into longstr.
505
+ #
506
+ # @param serializer [::FFI::Pointer, #to_ptr]
507
+ # @return [Zframe]
508
+ def pack_own(serializer)
509
+ raise DestroyedError unless @ptr
510
+ self_p = @ptr
511
+ result = ::CZMQ::FFI.zhashx_pack_own(self_p, serializer)
512
+ result = Zframe.__new result, true
513
+ result
514
+ end
515
+
458
516
  # Make a copy of the list; items are duplicated if you set a duplicator
459
517
  # for the list, otherwise not. Copying a null reference returns a null
460
518
  # reference. Note that this method's behavior changed slightly for CZMQ
@@ -597,5 +655,5 @@ end
597
655
 
598
656
  ################################################################################
599
657
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
600
- # Please refer to the README for information about making permanent changes. #
658
+ # Read the zproject/README.md for information about making permanent changes. #
601
659
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -185,5 +185,5 @@ end
185
185
 
186
186
  ################################################################################
187
187
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
188
- # Please refer to the README for information about making permanent changes. #
188
+ # Read the zproject/README.md for information about making permanent changes. #
189
189
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -361,5 +361,5 @@ end
361
361
 
362
362
  ################################################################################
363
363
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
364
- # Please refer to the README for information about making permanent changes. #
364
+ # Read the zproject/README.md for information about making permanent changes. #
365
365
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -474,5 +474,5 @@ end
474
474
 
475
475
  ################################################################################
476
476
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
477
- # Please refer to the README for information about making permanent changes. #
477
+ # Read the zproject/README.md for information about making permanent changes. #
478
478
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -392,5 +392,5 @@ end
392
392
 
393
393
  ################################################################################
394
394
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
395
- # Please refer to the README for information about making permanent changes. #
395
+ # Read the zproject/README.md for information about making permanent changes. #
396
396
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -250,28 +250,28 @@ module CZMQ
250
250
  # Push block of memory to front of message, as a new frame.
251
251
  # Returns 0 on success, -1 on error.
252
252
  #
253
- # @param src [::FFI::Pointer, #to_ptr]
253
+ # @param data [::FFI::Pointer, #to_ptr]
254
254
  # @param size [Integer, #to_int, #to_i]
255
255
  # @return [Integer]
256
- def pushmem(src, size)
256
+ def pushmem(data, size)
257
257
  raise DestroyedError unless @ptr
258
258
  self_p = @ptr
259
259
  size = Integer(size)
260
- result = ::CZMQ::FFI.zmsg_pushmem(self_p, src, size)
260
+ result = ::CZMQ::FFI.zmsg_pushmem(self_p, data, size)
261
261
  result
262
262
  end
263
263
 
264
264
  # Add block of memory to the end of the message, as a new frame.
265
265
  # Returns 0 on success, -1 on error.
266
266
  #
267
- # @param src [::FFI::Pointer, #to_ptr]
267
+ # @param data [::FFI::Pointer, #to_ptr]
268
268
  # @param size [Integer, #to_int, #to_i]
269
269
  # @return [Integer]
270
- def addmem(src, size)
270
+ def addmem(data, size)
271
271
  raise DestroyedError unless @ptr
272
272
  self_p = @ptr
273
273
  size = Integer(size)
274
- result = ::CZMQ::FFI.zmsg_addmem(self_p, src, size)
274
+ result = ::CZMQ::FFI.zmsg_addmem(self_p, data, size)
275
275
  result
276
276
  end
277
277
 
@@ -511,5 +511,5 @@ end
511
511
 
512
512
  ################################################################################
513
513
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
514
- # Please refer to the README for information about making permanent changes. #
514
+ # Read the zproject/README.md for information about making permanent changes. #
515
515
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -190,5 +190,5 @@ end
190
190
 
191
191
  ################################################################################
192
192
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
193
- # Please refer to the README for information about making permanent changes. #
193
+ # Read the zproject/README.md for information about making permanent changes. #
194
194
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -290,5 +290,5 @@ end
290
290
 
291
291
  ################################################################################
292
292
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
293
- # Please refer to the README for information about making permanent changes. #
293
+ # Read the zproject/README.md for information about making permanent changes. #
294
294
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -217,6 +217,22 @@ module CZMQ
217
217
  __new ptr
218
218
  end
219
219
 
220
+ # Create a GATHER socket. Default action is bind.
221
+ # @param endpoint [String, #to_s, nil]
222
+ # @return [CZMQ::Zsock]
223
+ def self.new_gather(endpoint)
224
+ ptr = ::CZMQ::FFI.zsock_new_gather(endpoint)
225
+ __new ptr
226
+ end
227
+
228
+ # Create a SCATTER socket. Default action is connect.
229
+ # @param endpoint [String, #to_s, nil]
230
+ # @return [CZMQ::Zsock]
231
+ def self.new_scatter(endpoint)
232
+ ptr = ::CZMQ::FFI.zsock_new_scatter(endpoint)
233
+ __new ptr
234
+ end
235
+
220
236
  # Destroy the socket. You must use this for any socket created via the
221
237
  # zsock_new method.
222
238
  #
@@ -3459,5 +3475,5 @@ end
3459
3475
 
3460
3476
  ################################################################################
3461
3477
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3462
- # Please refer to the README for information about making permanent changes. #
3478
+ # Read the zproject/README.md for information about making permanent changes. #
3463
3479
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -199,5 +199,5 @@ end
199
199
 
200
200
  ################################################################################
201
201
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
202
- # Please refer to the README for information about making permanent changes. #
202
+ # Read the zproject/README.md for information about making permanent changes. #
203
203
  ################################################################################
@@ -0,0 +1,203 @@
1
+ ################################################################################
2
+ # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
+ ################################################################################
5
+
6
+ module CZMQ
7
+ module FFI
8
+
9
+ # timer set
10
+ # @note This class is 100% generated using zproject.
11
+ class Ztimerset
12
+ # Raised when one tries to use an instance of {Ztimerset} after
13
+ # the internal pointer to the native object has been nullified.
14
+ class DestroyedError < RuntimeError; end
15
+
16
+ # Boilerplate for self pointer, initializer, and finalizer
17
+ class << self
18
+ alias :__new :new
19
+ end
20
+ # Attaches the pointer _ptr_ to this instance and defines a finalizer for
21
+ # it if necessary.
22
+ # @param ptr [::FFI::Pointer]
23
+ # @param finalize [Boolean]
24
+ def initialize(ptr, finalize = true)
25
+ @ptr = ptr
26
+ if @ptr.null?
27
+ @ptr = nil # Remove null pointers so we don't have to test for them.
28
+ elsif finalize
29
+ @finalizer = self.class.create_finalizer_for @ptr
30
+ ObjectSpace.define_finalizer self, @finalizer
31
+ end
32
+ end
33
+ # @param ptr [::FFI::Pointer]
34
+ # @return [Proc]
35
+ def self.create_finalizer_for(ptr)
36
+ Proc.new do
37
+ ptr_ptr = ::FFI::MemoryPointer.new :pointer
38
+ ptr_ptr.write_pointer ptr
39
+ ::CZMQ::FFI.ztimerset_destroy ptr_ptr
40
+ end
41
+ end
42
+ # @return [Boolean]
43
+ def null?
44
+ !@ptr or @ptr.null?
45
+ end
46
+ # Return internal pointer
47
+ # @return [::FFI::Pointer]
48
+ def __ptr
49
+ raise DestroyedError unless @ptr
50
+ @ptr
51
+ end
52
+ # So external Libraries can just pass the Object to a FFI function which expects a :pointer
53
+ alias_method :to_ptr, :__ptr
54
+ # Nullify internal pointer and return pointer pointer.
55
+ # @note This detaches the current instance from the native object
56
+ # and thus makes it unusable.
57
+ # @return [::FFI::MemoryPointer] the pointer pointing to a pointer
58
+ # pointing to the native object
59
+ def __ptr_give_ref
60
+ raise DestroyedError unless @ptr
61
+ ptr_ptr = ::FFI::MemoryPointer.new :pointer
62
+ ptr_ptr.write_pointer @ptr
63
+ __undef_finalizer if @finalizer
64
+ @ptr = nil
65
+ ptr_ptr
66
+ end
67
+ # Undefines the finalizer for this object.
68
+ # @note Only use this if you need to and can guarantee that the native
69
+ # object will be freed by other means.
70
+ # @return [void]
71
+ def __undef_finalizer
72
+ ObjectSpace.undefine_finalizer self
73
+ @finalizer = nil
74
+ end
75
+
76
+ # Create a new callback of the following type:
77
+ # Callback function for timer event.
78
+ # typedef void (ztimerset_fn) (
79
+ # int timer_id, void *arg);
80
+ #
81
+ # @note WARNING: If your Ruby code doesn't retain a reference to the
82
+ # FFI::Function object after passing it to a C function call,
83
+ # it may be garbage collected while C still holds the pointer,
84
+ # potentially resulting in a segmentation fault.
85
+ def self.fn
86
+ ::FFI::Function.new :void, [:int, :pointer], blocking: true do |timer_id, arg|
87
+ result = yield timer_id, arg
88
+ result
89
+ end
90
+ end
91
+
92
+ # Create new timer set.
93
+ # @return [CZMQ::Ztimerset]
94
+ def self.new()
95
+ ptr = ::CZMQ::FFI.ztimerset_new()
96
+ __new ptr
97
+ end
98
+
99
+ # Destroy a timer set
100
+ #
101
+ # @return [void]
102
+ def destroy()
103
+ return unless @ptr
104
+ self_p = __ptr_give_ref
105
+ result = ::CZMQ::FFI.ztimerset_destroy(self_p)
106
+ result
107
+ end
108
+
109
+ # Add a timer to the set. Returns timer id if OK, -1 on failure.
110
+ #
111
+ # @param interval [Integer, #to_int, #to_i]
112
+ # @param handler [::FFI::Pointer, #to_ptr]
113
+ # @param arg [::FFI::Pointer, #to_ptr]
114
+ # @return [Integer]
115
+ def add(interval, handler, arg)
116
+ raise DestroyedError unless @ptr
117
+ self_p = @ptr
118
+ interval = Integer(interval)
119
+ result = ::CZMQ::FFI.ztimerset_add(self_p, interval, handler, arg)
120
+ result
121
+ end
122
+
123
+ # Cancel a timer. Returns 0 if OK, -1 on failure.
124
+ #
125
+ # @param timer_id [Integer, #to_int, #to_i]
126
+ # @return [Integer]
127
+ def cancel(timer_id)
128
+ raise DestroyedError unless @ptr
129
+ self_p = @ptr
130
+ timer_id = Integer(timer_id)
131
+ result = ::CZMQ::FFI.ztimerset_cancel(self_p, timer_id)
132
+ result
133
+ end
134
+
135
+ # Set timer interval. Returns 0 if OK, -1 on failure.
136
+ # This method is slow, canceling the timer and adding a new one yield better performance.
137
+ #
138
+ # @param timer_id [Integer, #to_int, #to_i]
139
+ # @param interval [Integer, #to_int, #to_i]
140
+ # @return [Integer]
141
+ def set_interval(timer_id, interval)
142
+ raise DestroyedError unless @ptr
143
+ self_p = @ptr
144
+ timer_id = Integer(timer_id)
145
+ interval = Integer(interval)
146
+ result = ::CZMQ::FFI.ztimerset_set_interval(self_p, timer_id, interval)
147
+ result
148
+ end
149
+
150
+ # Reset timer to start interval counting from current time. Returns 0 if OK, -1 on failure.
151
+ # This method is slow, canceling the timer and adding a new one yield better performance.
152
+ #
153
+ # @param timer_id [Integer, #to_int, #to_i]
154
+ # @return [Integer]
155
+ def reset(timer_id)
156
+ raise DestroyedError unless @ptr
157
+ self_p = @ptr
158
+ timer_id = Integer(timer_id)
159
+ result = ::CZMQ::FFI.ztimerset_reset(self_p, timer_id)
160
+ result
161
+ end
162
+
163
+ # Return the time until the next interval.
164
+ # Should be used as timeout parameter for the zpoller wait method.
165
+ # The timeout is in msec.
166
+ #
167
+ # @return [Integer]
168
+ def timeout()
169
+ raise DestroyedError unless @ptr
170
+ self_p = @ptr
171
+ result = ::CZMQ::FFI.ztimerset_timeout(self_p)
172
+ result
173
+ end
174
+
175
+ # Invoke callback function of all timers which their interval has elapsed.
176
+ # Should be call after zpoller wait method.
177
+ # Returns 0 if OK, -1 on failure.
178
+ #
179
+ # @return [Integer]
180
+ def execute()
181
+ raise DestroyedError unless @ptr
182
+ self_p = @ptr
183
+ result = ::CZMQ::FFI.ztimerset_execute(self_p)
184
+ result
185
+ end
186
+
187
+ # Self test of this class.
188
+ #
189
+ # @param verbose [Boolean]
190
+ # @return [void]
191
+ def self.test(verbose)
192
+ verbose = !(0==verbose||!verbose) # boolean
193
+ result = ::CZMQ::FFI.ztimerset_test(verbose)
194
+ result
195
+ end
196
+ end
197
+ end
198
+ end
199
+
200
+ ################################################################################
201
+ # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
202
+ # Read the zproject/README.md for information about making permanent changes. #
203
+ ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -217,5 +217,5 @@ end
217
217
 
218
218
  ################################################################################
219
219
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
220
- # Please refer to the README for information about making permanent changes. #
220
+ # Read the zproject/README.md for information about making permanent changes. #
221
221
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  module CZMQ
@@ -223,5 +223,5 @@ end
223
223
 
224
224
  ################################################################################
225
225
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
226
- # Please refer to the README for information about making permanent changes. #
226
+ # Read the zproject/README.md for information about making permanent changes. #
227
227
  ################################################################################
@@ -1,6 +1,6 @@
1
1
  ################################################################################
2
2
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
3
- # Please refer to the README for information about making permanent changes. #
3
+ # Read the zproject/README.md for information about making permanent changes. #
4
4
  ################################################################################
5
5
 
6
6
  require 'ffi'
@@ -75,8 +75,8 @@ module CZMQ
75
75
  attach_function :zcert_destroy, [:pointer], :void, **opts
76
76
  attach_function :zcert_public_key, [:pointer], :pointer, **opts
77
77
  attach_function :zcert_secret_key, [:pointer], :pointer, **opts
78
- attach_function :zcert_public_txt, [:pointer], :pointer, **opts
79
- attach_function :zcert_secret_txt, [:pointer], :pointer, **opts
78
+ attach_function :zcert_public_txt, [:pointer], :string, **opts
79
+ attach_function :zcert_secret_txt, [:pointer], :string, **opts
80
80
  attach_function :zcert_set_meta, [:pointer, :string, :string, :varargs], :void, **opts
81
81
  begin # DRAFT method
82
82
  attach_function :zcert_unset_meta, [:pointer, :string], :void, **opts
@@ -86,7 +86,7 @@ module CZMQ
86
86
  "this Ruby binding because it's not available."
87
87
  end
88
88
  end
89
- attach_function :zcert_meta, [:pointer, :string], :pointer, **opts
89
+ attach_function :zcert_meta, [:pointer, :string], :string, **opts
90
90
  attach_function :zcert_meta_keys, [:pointer], :pointer, **opts
91
91
  attach_function :zcert_save, [:pointer, :string], :int, **opts
92
92
  attach_function :zcert_save_public, [:pointer, :string], :int, **opts
@@ -102,8 +102,24 @@ module CZMQ
102
102
 
103
103
  attach_function :zcertstore_new, [:string], :pointer, **opts
104
104
  attach_function :zcertstore_destroy, [:pointer], :void, **opts
105
+ begin # DRAFT method
106
+ attach_function :zcertstore_set_loader, [:pointer, :pointer, :pointer, :pointer], :void, **opts
107
+ rescue ::FFI::NotFoundError
108
+ if $VERBOSE || $DEBUG
109
+ warn "The function zcertstore_set_loader() can't be used through " +
110
+ "this Ruby binding because it's not available."
111
+ end
112
+ end
105
113
  attach_function :zcertstore_lookup, [:pointer, :string], :pointer, **opts
106
114
  attach_function :zcertstore_insert, [:pointer, :pointer], :void, **opts
115
+ begin # DRAFT method
116
+ attach_function :zcertstore_empty, [:pointer], :void, **opts
117
+ rescue ::FFI::NotFoundError
118
+ if $VERBOSE || $DEBUG
119
+ warn "The function zcertstore_empty() can't be used through " +
120
+ "this Ruby binding because it's not available."
121
+ end
122
+ end
107
123
  attach_function :zcertstore_print, [:pointer], :void, **opts
108
124
  attach_function :zcertstore_fprint, [:pointer, :pointer], :void, **opts
109
125
  attach_function :zcertstore_test, [:bool], :void, **opts
@@ -257,6 +273,7 @@ module CZMQ
257
273
  attach_function :zframe_send, [:pointer, :pointer, :int], :int, **opts
258
274
  attach_function :zframe_size, [:pointer], :size_t, **opts
259
275
  attach_function :zframe_data, [:pointer], :pointer, **opts
276
+ attach_function :zframe_meta, [:pointer, :string], :string, **opts
260
277
  attach_function :zframe_dup, [:pointer], :pointer, **opts
261
278
  attach_function :zframe_strhex, [:pointer], :pointer, **opts
262
279
  attach_function :zframe_strdup, [:pointer], :pointer, **opts
@@ -331,6 +348,14 @@ module CZMQ
331
348
 
332
349
  attach_function :zhashx_new, [], :pointer, **opts
333
350
  attach_function :zhashx_unpack, [:pointer], :pointer, **opts
351
+ begin # DRAFT method
352
+ attach_function :zhashx_unpack_own, [:pointer, :pointer], :pointer, **opts
353
+ rescue ::FFI::NotFoundError
354
+ if $VERBOSE || $DEBUG
355
+ warn "The function zhashx_unpack_own() can't be used through " +
356
+ "this Ruby binding because it's not available."
357
+ end
358
+ end
334
359
  attach_function :zhashx_destroy, [:pointer], :void, **opts
335
360
  attach_function :zhashx_insert, [:pointer, :pointer, :pointer], :int, **opts
336
361
  attach_function :zhashx_update, [:pointer, :pointer, :pointer], :void, **opts
@@ -350,6 +375,14 @@ module CZMQ
350
375
  attach_function :zhashx_load, [:pointer, :string], :int, **opts
351
376
  attach_function :zhashx_refresh, [:pointer], :int, **opts
352
377
  attach_function :zhashx_pack, [:pointer], :pointer, **opts
378
+ begin # DRAFT method
379
+ attach_function :zhashx_pack_own, [:pointer, :pointer], :pointer, **opts
380
+ rescue ::FFI::NotFoundError
381
+ if $VERBOSE || $DEBUG
382
+ warn "The function zhashx_pack_own() can't be used through " +
383
+ "this Ruby binding because it's not available."
384
+ end
385
+ end
353
386
  attach_function :zhashx_dup, [:pointer], :pointer, **opts
354
387
  attach_function :zhashx_set_destructor, [:pointer, :pointer], :void, **opts
355
388
  attach_function :zhashx_set_duplicator, [:pointer, :pointer], :void, **opts
@@ -735,6 +768,22 @@ module CZMQ
735
768
  "this Ruby binding because it's not available."
736
769
  end
737
770
  end
771
+ begin # DRAFT method
772
+ attach_function :zsock_new_gather, [:string], :pointer, **opts
773
+ rescue ::FFI::NotFoundError
774
+ if $VERBOSE || $DEBUG
775
+ warn "The function zsock_new_gather() can't be used through " +
776
+ "this Ruby binding because it's not available."
777
+ end
778
+ end
779
+ begin # DRAFT method
780
+ attach_function :zsock_new_scatter, [:string], :pointer, **opts
781
+ rescue ::FFI::NotFoundError
782
+ if $VERBOSE || $DEBUG
783
+ warn "The function zsock_new_scatter() can't be used through " +
784
+ "this Ruby binding because it's not available."
785
+ end
786
+ end
738
787
  attach_function :zsock_destroy, [:pointer], :void, **opts
739
788
  attach_function :zsock_bind, [:pointer, :string, :varargs], :int, **opts
740
789
  attach_function :zsock_endpoint, [:pointer], :string, **opts
@@ -969,6 +1018,81 @@ module CZMQ
969
1018
 
970
1019
  require_relative 'ffi/zstr'
971
1020
 
1021
+ begin # DRAFT method
1022
+ attach_function :ztimerset_new, [], :pointer, **opts
1023
+ rescue ::FFI::NotFoundError
1024
+ if $VERBOSE || $DEBUG
1025
+ warn "The function ztimerset_new() can't be used through " +
1026
+ "this Ruby binding because it's not available."
1027
+ end
1028
+ end
1029
+ begin # DRAFT method
1030
+ attach_function :ztimerset_destroy, [:pointer], :void, **opts
1031
+ rescue ::FFI::NotFoundError
1032
+ if $VERBOSE || $DEBUG
1033
+ warn "The function ztimerset_destroy() can't be used through " +
1034
+ "this Ruby binding because it's not available."
1035
+ end
1036
+ end
1037
+ begin # DRAFT method
1038
+ attach_function :ztimerset_add, [:pointer, :size_t, :pointer, :pointer], :int, **opts
1039
+ rescue ::FFI::NotFoundError
1040
+ if $VERBOSE || $DEBUG
1041
+ warn "The function ztimerset_add() can't be used through " +
1042
+ "this Ruby binding because it's not available."
1043
+ end
1044
+ end
1045
+ begin # DRAFT method
1046
+ attach_function :ztimerset_cancel, [:pointer, :int], :int, **opts
1047
+ rescue ::FFI::NotFoundError
1048
+ if $VERBOSE || $DEBUG
1049
+ warn "The function ztimerset_cancel() can't be used through " +
1050
+ "this Ruby binding because it's not available."
1051
+ end
1052
+ end
1053
+ begin # DRAFT method
1054
+ attach_function :ztimerset_set_interval, [:pointer, :int, :size_t], :int, **opts
1055
+ rescue ::FFI::NotFoundError
1056
+ if $VERBOSE || $DEBUG
1057
+ warn "The function ztimerset_set_interval() can't be used through " +
1058
+ "this Ruby binding because it's not available."
1059
+ end
1060
+ end
1061
+ begin # DRAFT method
1062
+ attach_function :ztimerset_reset, [:pointer, :int], :int, **opts
1063
+ rescue ::FFI::NotFoundError
1064
+ if $VERBOSE || $DEBUG
1065
+ warn "The function ztimerset_reset() can't be used through " +
1066
+ "this Ruby binding because it's not available."
1067
+ end
1068
+ end
1069
+ begin # DRAFT method
1070
+ attach_function :ztimerset_timeout, [:pointer], :int, **opts
1071
+ rescue ::FFI::NotFoundError
1072
+ if $VERBOSE || $DEBUG
1073
+ warn "The function ztimerset_timeout() can't be used through " +
1074
+ "this Ruby binding because it's not available."
1075
+ end
1076
+ end
1077
+ begin # DRAFT method
1078
+ attach_function :ztimerset_execute, [:pointer], :int, **opts
1079
+ rescue ::FFI::NotFoundError
1080
+ if $VERBOSE || $DEBUG
1081
+ warn "The function ztimerset_execute() can't be used through " +
1082
+ "this Ruby binding because it's not available."
1083
+ end
1084
+ end
1085
+ begin # DRAFT method
1086
+ attach_function :ztimerset_test, [:bool], :void, **opts
1087
+ rescue ::FFI::NotFoundError
1088
+ if $VERBOSE || $DEBUG
1089
+ warn "The function ztimerset_test() can't be used through " +
1090
+ "this Ruby binding because it's not available."
1091
+ end
1092
+ end
1093
+
1094
+ require_relative 'ffi/ztimerset'
1095
+
972
1096
  begin # DRAFT method
973
1097
  attach_function :ztrie_new, [:pointer], :pointer, **opts
974
1098
  rescue ::FFI::NotFoundError
@@ -1082,5 +1206,5 @@ end
1082
1206
 
1083
1207
  ################################################################################
1084
1208
  # THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY #
1085
- # Please refer to the README for information about making permanent changes. #
1209
+ # Read the zproject/README.md for information about making permanent changes. #
1086
1210
  ################################################################################
@@ -1,5 +1,5 @@
1
1
  module CZMQ
2
2
  module FFI
3
- GEM_VERSION = "0.8.3"
3
+ GEM_VERSION = "0.9.1"
4
4
  end
5
5
  end
@@ -0,0 +1,5 @@
1
+ base_dir = File.expand_path(File.join(__dir__, "..", ".."))
2
+ vendor_bin_dir = File.join(base_dir, "vendor", "local", "bin")
3
+ if File.exist?(vendor_bin_dir)
4
+ ENV["PATH"] = [vendor_bin_dir, ENV["PATH"]].join(File::PATH_SEPARATOR)
5
+ end
data/lib/czmq-ffi-gen.rb CHANGED
@@ -1,3 +1,4 @@
1
+ require_relative "czmq-ffi-gen/vendor"
1
2
  require_relative "czmq-ffi-gen/czmq/ffi"
2
3
  require_relative "czmq-ffi-gen/versions"
3
4
  require_relative "czmq-ffi-gen/errors"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: czmq-ffi-gen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Patrik Wenger
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-03-29 00:00:00.000000000 Z
11
+ date: 2016-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -118,6 +118,7 @@ files:
118
118
  - lib/czmq-ffi-gen/czmq/ffi/zproc.rb
119
119
  - lib/czmq-ffi-gen/czmq/ffi/zsock.rb
120
120
  - lib/czmq-ffi-gen/czmq/ffi/zstr.rb
121
+ - lib/czmq-ffi-gen/czmq/ffi/ztimerset.rb
121
122
  - lib/czmq-ffi-gen/czmq/ffi/ztrie.rb
122
123
  - lib/czmq-ffi-gen/czmq/ffi/zuuid.rb
123
124
  - lib/czmq-ffi-gen/errors.rb
@@ -125,6 +126,7 @@ files:
125
126
  - lib/czmq-ffi-gen/legacy.rb
126
127
  - lib/czmq-ffi-gen/libzmq.rb
127
128
  - lib/czmq-ffi-gen/signals.rb
129
+ - lib/czmq-ffi-gen/vendor.rb
128
130
  - lib/czmq-ffi-gen/versions.rb
129
131
  homepage: https://github.com/paddor/czmq-ffi-gen
130
132
  licenses: