fotonauts-bunny 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,822 @@
1
+
2
+ #:stopdoc:
3
+ # this file was autogenerated on Fri May 15 10:11:23 +0100 2009
4
+ # using amqp-0.8.xml (mtime: Wed May 06 14:48:51 +0100 2009)
5
+ #
6
+ # DO NOT EDIT! (edit ext/qparser.rb and config.yml instead, and run 'ruby qparser.rb')
7
+
8
+ module Qrack
9
+ module Protocol
10
+ HEADER = "AMQP".freeze
11
+ VERSION_MAJOR = 8
12
+ VERSION_MINOR = 0
13
+ REVISION = 0
14
+ PORT = 5672
15
+
16
+ RESPONSES = {
17
+ 200 => :REPLY_SUCCESS,
18
+ 310 => :NOT_DELIVERED,
19
+ 311 => :CONTENT_TOO_LARGE,
20
+ 320 => :CONNECTION_FORCED,
21
+ 402 => :INVALID_PATH,
22
+ 403 => :ACCESS_REFUSED,
23
+ 404 => :NOT_FOUND,
24
+ 405 => :RESOURCE_LOCKED,
25
+ 502 => :SYNTAX_ERROR,
26
+ 503 => :COMMAND_INVALID,
27
+ 504 => :CHANNEL_ERROR,
28
+ 506 => :RESOURCE_ERROR,
29
+ 530 => :NOT_ALLOWED,
30
+ 540 => :NOT_IMPLEMENTED,
31
+ 541 => :INTERNAL_ERROR,
32
+ }
33
+
34
+ FIELDS = [
35
+ :bit,
36
+ :long,
37
+ :longlong,
38
+ :longstr,
39
+ :octet,
40
+ :short,
41
+ :shortstr,
42
+ :table,
43
+ :timestamp,
44
+ ]
45
+
46
+ class Class
47
+ class << self
48
+ FIELDS.each do |f|
49
+ class_eval %[
50
+ def #{f} name
51
+ properties << [ :#{f}, name ] unless properties.include?([:#{f}, name])
52
+ attr_accessor name
53
+ end
54
+ ]
55
+ end
56
+
57
+ def properties() @properties ||= [] end
58
+
59
+ def id() self::ID end
60
+ def name() self::NAME end
61
+ end
62
+
63
+ class Method
64
+ class << self
65
+ FIELDS.each do |f|
66
+ class_eval %[
67
+ def #{f} name
68
+ arguments << [ :#{f}, name ] unless arguments.include?([:#{f}, name])
69
+ attr_accessor name
70
+ end
71
+ ]
72
+ end
73
+
74
+ def arguments() @arguments ||= [] end
75
+
76
+ def parent() Protocol.const_get(self.to_s[/Protocol::(.+?)::/,1]) end
77
+ def id() self::ID end
78
+ def name() self::NAME end
79
+ end
80
+
81
+ def == b
82
+ self.class.arguments.inject(true) do |eql, (type, name)|
83
+ eql and __send__("#{name}") == b.__send__("#{name}")
84
+ end
85
+ end
86
+ end
87
+
88
+ def self.methods() @methods ||= {} end
89
+
90
+ def self.Method(id, name)
91
+ @_base_methods ||= {}
92
+ @_base_methods[id] ||= ::Class.new(Method) do
93
+ class_eval %[
94
+ def self.inherited klass
95
+ klass.const_set(:ID, #{id})
96
+ klass.const_set(:NAME, :#{name.to_s})
97
+ klass.parent.methods[#{id}] = klass
98
+ klass.parent.methods[klass::NAME] = klass
99
+ end
100
+ ]
101
+ end
102
+ end
103
+ end
104
+
105
+ def self.classes() @classes ||= {} end
106
+
107
+ def self.Class(id, name)
108
+ @_base_classes ||= {}
109
+ @_base_classes[id] ||= ::Class.new(Class) do
110
+ class_eval %[
111
+ def self.inherited klass
112
+ klass.const_set(:ID, #{id})
113
+ klass.const_set(:NAME, :#{name.to_s})
114
+ Protocol.classes[#{id}] = klass
115
+ Protocol.classes[klass::NAME] = klass
116
+ end
117
+ ]
118
+ end
119
+ end
120
+ end
121
+ end
122
+
123
+ module Qrack
124
+ module Protocol
125
+ class Connection < Class( 10, :connection ); end
126
+ class Channel < Class( 20, :channel ); end
127
+ class Access < Class( 30, :access ); end
128
+ class Exchange < Class( 40, :exchange ); end
129
+ class Queue < Class( 50, :queue ); end
130
+ class Basic < Class( 60, :basic ); end
131
+ class File < Class( 70, :file ); end
132
+ class Stream < Class( 80, :stream ); end
133
+ class Tx < Class( 90, :tx ); end
134
+ class Dtx < Class( 100, :dtx ); end
135
+ class Tunnel < Class( 110, :tunnel ); end
136
+ class Test < Class( 120, :test ); end
137
+
138
+ class Connection
139
+
140
+ class Start < Method( 10, :start ); end
141
+ class StartOk < Method( 11, :start_ok ); end
142
+ class Secure < Method( 20, :secure ); end
143
+ class SecureOk < Method( 21, :secure_ok ); end
144
+ class Tune < Method( 30, :tune ); end
145
+ class TuneOk < Method( 31, :tune_ok ); end
146
+ class Open < Method( 40, :open ); end
147
+ class OpenOk < Method( 41, :open_ok ); end
148
+ class Redirect < Method( 50, :redirect ); end
149
+ class Close < Method( 60, :close ); end
150
+ class CloseOk < Method( 61, :close_ok ); end
151
+
152
+
153
+ class Start
154
+ octet :version_major
155
+ octet :version_minor
156
+ table :server_properties
157
+ longstr :mechanisms
158
+ longstr :locales
159
+ end
160
+
161
+ class StartOk
162
+ table :client_properties
163
+ shortstr :mechanism
164
+ longstr :response
165
+ shortstr :locale
166
+ end
167
+
168
+ class Secure
169
+ longstr :challenge
170
+ end
171
+
172
+ class SecureOk
173
+ longstr :response
174
+ end
175
+
176
+ class Tune
177
+ short :channel_max
178
+ long :frame_max
179
+ short :heartbeat
180
+ end
181
+
182
+ class TuneOk
183
+ short :channel_max
184
+ long :frame_max
185
+ short :heartbeat
186
+ end
187
+
188
+ class Open
189
+ shortstr :virtual_host
190
+ shortstr :capabilities
191
+ bit :insist
192
+ end
193
+
194
+ class OpenOk
195
+ shortstr :known_hosts
196
+ end
197
+
198
+ class Redirect
199
+ shortstr :host
200
+ shortstr :known_hosts
201
+ end
202
+
203
+ class Close
204
+ short :reply_code
205
+ shortstr :reply_text
206
+ short :class_id
207
+ short :method_id
208
+ end
209
+
210
+ class CloseOk
211
+ end
212
+
213
+ end
214
+
215
+ class Channel
216
+
217
+ class Open < Method( 10, :open ); end
218
+ class OpenOk < Method( 11, :open_ok ); end
219
+ class Flow < Method( 20, :flow ); end
220
+ class FlowOk < Method( 21, :flow_ok ); end
221
+ class Alert < Method( 30, :alert ); end
222
+ class Close < Method( 40, :close ); end
223
+ class CloseOk < Method( 41, :close_ok ); end
224
+
225
+
226
+ class Open
227
+ shortstr :out_of_band
228
+ end
229
+
230
+ class OpenOk
231
+ end
232
+
233
+ class Flow
234
+ bit :active
235
+ end
236
+
237
+ class FlowOk
238
+ bit :active
239
+ end
240
+
241
+ class Alert
242
+ short :reply_code
243
+ shortstr :reply_text
244
+ table :details
245
+ end
246
+
247
+ class Close
248
+ short :reply_code
249
+ shortstr :reply_text
250
+ short :class_id
251
+ short :method_id
252
+ end
253
+
254
+ class CloseOk
255
+ end
256
+
257
+ end
258
+
259
+ class Access
260
+
261
+ class Request < Method( 10, :request ); end
262
+ class RequestOk < Method( 11, :request_ok ); end
263
+
264
+
265
+ class Request
266
+ shortstr :realm
267
+ bit :exclusive
268
+ bit :passive
269
+ bit :active
270
+ bit :write
271
+ bit :read
272
+ end
273
+
274
+ class RequestOk
275
+ short :ticket
276
+ end
277
+
278
+ end
279
+
280
+ class Exchange
281
+
282
+ class Declare < Method( 10, :declare ); end
283
+ class DeclareOk < Method( 11, :declare_ok ); end
284
+ class Delete < Method( 20, :delete ); end
285
+ class DeleteOk < Method( 21, :delete_ok ); end
286
+
287
+
288
+ class Declare
289
+ short :ticket
290
+ shortstr :exchange
291
+ shortstr :type
292
+ bit :passive
293
+ bit :durable
294
+ bit :auto_delete
295
+ bit :internal
296
+ bit :nowait
297
+ table :arguments
298
+ end
299
+
300
+ class DeclareOk
301
+ end
302
+
303
+ class Delete
304
+ short :ticket
305
+ shortstr :exchange
306
+ bit :if_unused
307
+ bit :nowait
308
+ end
309
+
310
+ class DeleteOk
311
+ end
312
+
313
+ end
314
+
315
+ class Queue
316
+
317
+ class Declare < Method( 10, :declare ); end
318
+ class DeclareOk < Method( 11, :declare_ok ); end
319
+ class Bind < Method( 20, :bind ); end
320
+ class BindOk < Method( 21, :bind_ok ); end
321
+ class Purge < Method( 30, :purge ); end
322
+ class PurgeOk < Method( 31, :purge_ok ); end
323
+ class Delete < Method( 40, :delete ); end
324
+ class DeleteOk < Method( 41, :delete_ok ); end
325
+ class Unbind < Method( 50, :unbind ); end
326
+ class UnbindOk < Method( 51, :unbind_ok ); end
327
+
328
+
329
+ class Declare
330
+ short :ticket
331
+ shortstr :queue
332
+ bit :passive
333
+ bit :durable
334
+ bit :exclusive
335
+ bit :auto_delete
336
+ bit :nowait
337
+ table :arguments
338
+ end
339
+
340
+ class DeclareOk
341
+ shortstr :queue
342
+ long :message_count
343
+ long :consumer_count
344
+ end
345
+
346
+ class Bind
347
+ short :ticket
348
+ shortstr :queue
349
+ shortstr :exchange
350
+ shortstr :routing_key
351
+ bit :nowait
352
+ table :arguments
353
+ end
354
+
355
+ class BindOk
356
+ end
357
+
358
+ class Purge
359
+ short :ticket
360
+ shortstr :queue
361
+ bit :nowait
362
+ end
363
+
364
+ class PurgeOk
365
+ long :message_count
366
+ end
367
+
368
+ class Delete
369
+ short :ticket
370
+ shortstr :queue
371
+ bit :if_unused
372
+ bit :if_empty
373
+ bit :nowait
374
+ end
375
+
376
+ class DeleteOk
377
+ long :message_count
378
+ end
379
+
380
+ class Unbind
381
+ short :ticket
382
+ shortstr :queue
383
+ shortstr :exchange
384
+ shortstr :routing_key
385
+ table :arguments
386
+ end
387
+
388
+ class UnbindOk
389
+ end
390
+
391
+ end
392
+
393
+ class Basic
394
+ shortstr :content_type
395
+ shortstr :content_encoding
396
+ table :headers
397
+ octet :delivery_mode
398
+ octet :priority
399
+ shortstr :correlation_id
400
+ shortstr :reply_to
401
+ shortstr :expiration
402
+ shortstr :message_id
403
+ timestamp :timestamp
404
+ shortstr :type
405
+ shortstr :user_id
406
+ shortstr :app_id
407
+ shortstr :cluster_id
408
+
409
+ class Qos < Method( 10, :qos ); end
410
+ class QosOk < Method( 11, :qos_ok ); end
411
+ class Consume < Method( 20, :consume ); end
412
+ class ConsumeOk < Method( 21, :consume_ok ); end
413
+ class Cancel < Method( 30, :cancel ); end
414
+ class CancelOk < Method( 31, :cancel_ok ); end
415
+ class Publish < Method( 40, :publish ); end
416
+ class Return < Method( 50, :return ); end
417
+ class Deliver < Method( 60, :deliver ); end
418
+ class Get < Method( 70, :get ); end
419
+ class GetOk < Method( 71, :get_ok ); end
420
+ class GetEmpty < Method( 72, :get_empty ); end
421
+ class Ack < Method( 80, :ack ); end
422
+ class Reject < Method( 90, :reject ); end
423
+ class Recover < Method( 100, :recover ); end
424
+
425
+
426
+ class Qos
427
+ long :prefetch_size
428
+ short :prefetch_count
429
+ bit :global
430
+ end
431
+
432
+ class QosOk
433
+ end
434
+
435
+ class Consume
436
+ short :ticket
437
+ shortstr :queue
438
+ shortstr :consumer_tag
439
+ bit :no_local
440
+ bit :no_ack
441
+ bit :exclusive
442
+ bit :nowait
443
+ end
444
+
445
+ class ConsumeOk
446
+ shortstr :consumer_tag
447
+ end
448
+
449
+ class Cancel
450
+ shortstr :consumer_tag
451
+ bit :nowait
452
+ end
453
+
454
+ class CancelOk
455
+ shortstr :consumer_tag
456
+ end
457
+
458
+ class Publish
459
+ short :ticket
460
+ shortstr :exchange
461
+ shortstr :routing_key
462
+ bit :mandatory
463
+ bit :immediate
464
+ end
465
+
466
+ class Return
467
+ short :reply_code
468
+ shortstr :reply_text
469
+ shortstr :exchange
470
+ shortstr :routing_key
471
+ end
472
+
473
+ class Deliver
474
+ shortstr :consumer_tag
475
+ longlong :delivery_tag
476
+ bit :redelivered
477
+ shortstr :exchange
478
+ shortstr :routing_key
479
+ end
480
+
481
+ class Get
482
+ short :ticket
483
+ shortstr :queue
484
+ bit :no_ack
485
+ end
486
+
487
+ class GetOk
488
+ longlong :delivery_tag
489
+ bit :redelivered
490
+ shortstr :exchange
491
+ shortstr :routing_key
492
+ long :message_count
493
+ end
494
+
495
+ class GetEmpty
496
+ shortstr :cluster_id
497
+ end
498
+
499
+ class Ack
500
+ longlong :delivery_tag
501
+ bit :multiple
502
+ end
503
+
504
+ class Reject
505
+ longlong :delivery_tag
506
+ bit :requeue
507
+ end
508
+
509
+ class Recover
510
+ bit :requeue
511
+ end
512
+
513
+ end
514
+
515
+ class File
516
+ shortstr :content_type
517
+ shortstr :content_encoding
518
+ table :headers
519
+ octet :priority
520
+ shortstr :reply_to
521
+ shortstr :message_id
522
+ shortstr :filename
523
+ timestamp :timestamp
524
+ shortstr :cluster_id
525
+
526
+ class Qos < Method( 10, :qos ); end
527
+ class QosOk < Method( 11, :qos_ok ); end
528
+ class Consume < Method( 20, :consume ); end
529
+ class ConsumeOk < Method( 21, :consume_ok ); end
530
+ class Cancel < Method( 30, :cancel ); end
531
+ class CancelOk < Method( 31, :cancel_ok ); end
532
+ class Open < Method( 40, :open ); end
533
+ class OpenOk < Method( 41, :open_ok ); end
534
+ class Stage < Method( 50, :stage ); end
535
+ class Publish < Method( 60, :publish ); end
536
+ class Return < Method( 70, :return ); end
537
+ class Deliver < Method( 80, :deliver ); end
538
+ class Ack < Method( 90, :ack ); end
539
+ class Reject < Method( 100, :reject ); end
540
+
541
+
542
+ class Qos
543
+ long :prefetch_size
544
+ short :prefetch_count
545
+ bit :global
546
+ end
547
+
548
+ class QosOk
549
+ end
550
+
551
+ class Consume
552
+ short :ticket
553
+ shortstr :queue
554
+ shortstr :consumer_tag
555
+ bit :no_local
556
+ bit :no_ack
557
+ bit :exclusive
558
+ bit :nowait
559
+ end
560
+
561
+ class ConsumeOk
562
+ shortstr :consumer_tag
563
+ end
564
+
565
+ class Cancel
566
+ shortstr :consumer_tag
567
+ bit :nowait
568
+ end
569
+
570
+ class CancelOk
571
+ shortstr :consumer_tag
572
+ end
573
+
574
+ class Open
575
+ shortstr :identifier
576
+ longlong :content_size
577
+ end
578
+
579
+ class OpenOk
580
+ longlong :staged_size
581
+ end
582
+
583
+ class Stage
584
+ end
585
+
586
+ class Publish
587
+ short :ticket
588
+ shortstr :exchange
589
+ shortstr :routing_key
590
+ bit :mandatory
591
+ bit :immediate
592
+ shortstr :identifier
593
+ end
594
+
595
+ class Return
596
+ short :reply_code
597
+ shortstr :reply_text
598
+ shortstr :exchange
599
+ shortstr :routing_key
600
+ end
601
+
602
+ class Deliver
603
+ shortstr :consumer_tag
604
+ longlong :delivery_tag
605
+ bit :redelivered
606
+ shortstr :exchange
607
+ shortstr :routing_key
608
+ shortstr :identifier
609
+ end
610
+
611
+ class Ack
612
+ longlong :delivery_tag
613
+ bit :multiple
614
+ end
615
+
616
+ class Reject
617
+ longlong :delivery_tag
618
+ bit :requeue
619
+ end
620
+
621
+ end
622
+
623
+ class Stream
624
+ shortstr :content_type
625
+ shortstr :content_encoding
626
+ table :headers
627
+ octet :priority
628
+ timestamp :timestamp
629
+
630
+ class Qos < Method( 10, :qos ); end
631
+ class QosOk < Method( 11, :qos_ok ); end
632
+ class Consume < Method( 20, :consume ); end
633
+ class ConsumeOk < Method( 21, :consume_ok ); end
634
+ class Cancel < Method( 30, :cancel ); end
635
+ class CancelOk < Method( 31, :cancel_ok ); end
636
+ class Publish < Method( 40, :publish ); end
637
+ class Return < Method( 50, :return ); end
638
+ class Deliver < Method( 60, :deliver ); end
639
+
640
+
641
+ class Qos
642
+ long :prefetch_size
643
+ short :prefetch_count
644
+ long :consume_rate
645
+ bit :global
646
+ end
647
+
648
+ class QosOk
649
+ end
650
+
651
+ class Consume
652
+ short :ticket
653
+ shortstr :queue
654
+ shortstr :consumer_tag
655
+ bit :no_local
656
+ bit :exclusive
657
+ bit :nowait
658
+ end
659
+
660
+ class ConsumeOk
661
+ shortstr :consumer_tag
662
+ end
663
+
664
+ class Cancel
665
+ shortstr :consumer_tag
666
+ bit :nowait
667
+ end
668
+
669
+ class CancelOk
670
+ shortstr :consumer_tag
671
+ end
672
+
673
+ class Publish
674
+ short :ticket
675
+ shortstr :exchange
676
+ shortstr :routing_key
677
+ bit :mandatory
678
+ bit :immediate
679
+ end
680
+
681
+ class Return
682
+ short :reply_code
683
+ shortstr :reply_text
684
+ shortstr :exchange
685
+ shortstr :routing_key
686
+ end
687
+
688
+ class Deliver
689
+ shortstr :consumer_tag
690
+ longlong :delivery_tag
691
+ shortstr :exchange
692
+ shortstr :queue
693
+ end
694
+
695
+ end
696
+
697
+ class Tx
698
+
699
+ class Select < Method( 10, :select ); end
700
+ class SelectOk < Method( 11, :select_ok ); end
701
+ class Commit < Method( 20, :commit ); end
702
+ class CommitOk < Method( 21, :commit_ok ); end
703
+ class Rollback < Method( 30, :rollback ); end
704
+ class RollbackOk < Method( 31, :rollback_ok ); end
705
+
706
+
707
+ class Select
708
+ end
709
+
710
+ class SelectOk
711
+ end
712
+
713
+ class Commit
714
+ end
715
+
716
+ class CommitOk
717
+ end
718
+
719
+ class Rollback
720
+ end
721
+
722
+ class RollbackOk
723
+ end
724
+
725
+ end
726
+
727
+ class Dtx
728
+
729
+ class Select < Method( 10, :select ); end
730
+ class SelectOk < Method( 11, :select_ok ); end
731
+ class Start < Method( 20, :start ); end
732
+ class StartOk < Method( 21, :start_ok ); end
733
+
734
+
735
+ class Select
736
+ end
737
+
738
+ class SelectOk
739
+ end
740
+
741
+ class Start
742
+ shortstr :dtx_identifier
743
+ end
744
+
745
+ class StartOk
746
+ end
747
+
748
+ end
749
+
750
+ class Tunnel
751
+ table :headers
752
+ shortstr :proxy_name
753
+ shortstr :data_name
754
+ octet :durable
755
+ octet :broadcast
756
+
757
+ class Request < Method( 10, :request ); end
758
+
759
+
760
+ class Request
761
+ table :meta_data
762
+ end
763
+
764
+ end
765
+
766
+ class Test
767
+
768
+ class Integer < Method( 10, :integer ); end
769
+ class IntegerOk < Method( 11, :integer_ok ); end
770
+ class String < Method( 20, :string ); end
771
+ class StringOk < Method( 21, :string_ok ); end
772
+ class Table < Method( 30, :table ); end
773
+ class TableOk < Method( 31, :table_ok ); end
774
+ class Content < Method( 40, :content ); end
775
+ class ContentOk < Method( 41, :content_ok ); end
776
+
777
+
778
+ class Integer
779
+ octet :integer_1
780
+ short :integer_2
781
+ long :integer_3
782
+ longlong :integer_4
783
+ octet :operation
784
+ end
785
+
786
+ class IntegerOk
787
+ longlong :result
788
+ end
789
+
790
+ class String
791
+ shortstr :string_1
792
+ longstr :string_2
793
+ octet :operation
794
+ end
795
+
796
+ class StringOk
797
+ longstr :result
798
+ end
799
+
800
+ class Table
801
+ table :table
802
+ octet :integer_op
803
+ octet :string_op
804
+ end
805
+
806
+ class TableOk
807
+ longlong :integer_result
808
+ longstr :string_result
809
+ end
810
+
811
+ class Content
812
+ end
813
+
814
+ class ContentOk
815
+ long :content_checksum
816
+ end
817
+
818
+ end
819
+
820
+ end
821
+
822
+ end