00001 #ifndef QPID_AMQP_0_10_SPECIFICATION_H
00002 #define QPID_AMQP_0_10_SPECIFICATION_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00028
00029
00030 #include "qpid/amqp_0_10/specification_fwd.h"
00031 #include "qpid/amqp_0_10/Map.h"
00032 #include "qpid/amqp_0_10/Array.h"
00033 #include "qpid/amqp_0_10/UnknownType.h"
00034 #include "qpid/amqp_0_10/Struct32.h"
00035 #include "qpid/amqp_0_10/Control.h"
00036 #include "qpid/amqp_0_10/Command.h"
00037 #include "qpid/amqp_0_10/Packer.h"
00038 #include <iosfwd>
00039
00040 namespace qpid {
00041 namespace amqp_0_10 {
00042
00043
00044 namespace connection {
00045
00046
00047 struct Start:
00048 public Control
00049 {
00050 Map serverProperties;
00051 Str16Array mechanisms;
00052 Str16Array locales;
00053
00054 static const char* NAME;
00055 static const uint8_t CODE=0x1;
00056 static const uint8_t CLASS_CODE=connection::CODE;
00057 static const char* CLASS_NAME;
00058 explicit Start(
00059 const Map& serverProperties_=Map(),
00060 const Str16Array& mechanisms_=Str16Array(),
00061 const Str16Array& locales_=Str16Array()
00062 );
00063 void accept(Visitor&);
00064 void accept(ConstVisitor&) const;
00065 template <class S> void serialize(S& s) {
00066 s(serverProperties)(mechanisms)(locales);
00067 }
00068
00069 struct Handler
00070 {
00071 void connectionStart(
00072 const Map& serverProperties_,
00073 const Str16Array& mechanisms_,
00074 const Str16Array& locales_
00075 );
00076 };
00077
00078 template <class T> void invoke(T& target)const
00079 {
00080 target.connectionStart(serverProperties, mechanisms, locales );
00081 }
00082 };
00083 inline Packer<Start> serializable(Start& x) { return Packer<Start>(x); }
00084 std::ostream& operator << (std::ostream&, const Start&);
00085 bool operator==(const Start&, const Start&);
00086
00087 struct StartOk:
00088 public Control
00089 {
00090 Map clientProperties;
00091 Str8 mechanism;
00092 Vbin32 response;
00093 Str8 locale;
00094
00095 static const char* NAME;
00096 static const uint8_t CODE=0x2;
00097 static const uint8_t CLASS_CODE=connection::CODE;
00098 static const char* CLASS_NAME;
00099 explicit StartOk(
00100 const Map& clientProperties_=Map(),
00101 const Str8& mechanism_=Str8(),
00102 const Vbin32& response_=Vbin32(),
00103 const Str8& locale_=Str8()
00104 );
00105 void accept(Visitor&);
00106 void accept(ConstVisitor&) const;
00107 template <class S> void serialize(S& s) {
00108 s(clientProperties)(mechanism)(response)(locale);
00109 }
00110
00111 struct Handler
00112 {
00113 void connectionStartOk(
00114 const Map& clientProperties_,
00115 const Str8& mechanism_,
00116 const Vbin32& response_,
00117 const Str8& locale_
00118 );
00119 };
00120
00121 template <class T> void invoke(T& target)const
00122 {
00123 target.connectionStartOk(clientProperties, mechanism, response, locale );
00124 }
00125 };
00126 inline Packer<StartOk> serializable(StartOk& x) { return Packer<StartOk>(x); }
00127 std::ostream& operator << (std::ostream&, const StartOk&);
00128 bool operator==(const StartOk&, const StartOk&);
00129
00130 struct Secure:
00131 public Control
00132 {
00133 Vbin32 challenge;
00134
00135 static const char* NAME;
00136 static const uint8_t CODE=0x3;
00137 static const uint8_t CLASS_CODE=connection::CODE;
00138 static const char* CLASS_NAME;
00139 explicit Secure(const Vbin32& challenge_=Vbin32());
00140 void accept(Visitor&);
00141 void accept(ConstVisitor&) const;
00142 template <class S> void serialize(S& s) {
00143 s(challenge);
00144 }
00145
00146 struct Handler
00147 {
00148 void connectionSecure(
00149 const Vbin32& challenge_
00150 );
00151 };
00152
00153 template <class T> void invoke(T& target)const
00154 {
00155 target.connectionSecure(challenge );
00156 }
00157 };
00158 inline Packer<Secure> serializable(Secure& x) { return Packer<Secure>(x); }
00159 std::ostream& operator << (std::ostream&, const Secure&);
00160 bool operator==(const Secure&, const Secure&);
00161
00162 struct SecureOk:
00163 public Control
00164 {
00165 Vbin32 response;
00166
00167 static const char* NAME;
00168 static const uint8_t CODE=0x4;
00169 static const uint8_t CLASS_CODE=connection::CODE;
00170 static const char* CLASS_NAME;
00171 explicit SecureOk(const Vbin32& response_=Vbin32());
00172 void accept(Visitor&);
00173 void accept(ConstVisitor&) const;
00174 template <class S> void serialize(S& s) {
00175 s(response);
00176 }
00177
00178 struct Handler
00179 {
00180 void connectionSecureOk(
00181 const Vbin32& response_
00182 );
00183 };
00184
00185 template <class T> void invoke(T& target)const
00186 {
00187 target.connectionSecureOk(response );
00188 }
00189 };
00190 inline Packer<SecureOk> serializable(SecureOk& x) { return Packer<SecureOk>(x); }
00191 std::ostream& operator << (std::ostream&, const SecureOk&);
00192 bool operator==(const SecureOk&, const SecureOk&);
00193
00194 struct Tune:
00195 public Control
00196 {
00197 Uint16 channelMax;
00198 Uint16 maxFrameSize;
00199 Uint16 heartbeatMin;
00200 Uint16 heartbeatMax;
00201
00202 static const char* NAME;
00203 static const uint8_t CODE=0x5;
00204 static const uint8_t CLASS_CODE=connection::CODE;
00205 static const char* CLASS_NAME;
00206 explicit Tune(
00207 Uint16 channelMax_=Uint16(),
00208 Uint16 maxFrameSize_=Uint16(),
00209 Uint16 heartbeatMin_=Uint16(),
00210 Uint16 heartbeatMax_=Uint16()
00211 );
00212 void accept(Visitor&);
00213 void accept(ConstVisitor&) const;
00214 template <class S> void serialize(S& s) {
00215 s(channelMax)(maxFrameSize)(heartbeatMin)(heartbeatMax);
00216 }
00217
00218 struct Handler
00219 {
00220 void connectionTune(
00221 Uint16 channelMax_,
00222 Uint16 maxFrameSize_,
00223 Uint16 heartbeatMin_,
00224 Uint16 heartbeatMax_
00225 );
00226 };
00227
00228 template <class T> void invoke(T& target)const
00229 {
00230 target.connectionTune(channelMax, maxFrameSize, heartbeatMin, heartbeatMax );
00231 }
00232 };
00233 inline Packer<Tune> serializable(Tune& x) { return Packer<Tune>(x); }
00234 std::ostream& operator << (std::ostream&, const Tune&);
00235 bool operator==(const Tune&, const Tune&);
00236
00237 struct TuneOk:
00238 public Control
00239 {
00240 Uint16 channelMax;
00241 Uint16 maxFrameSize;
00242 Uint16 heartbeat;
00243
00244 static const char* NAME;
00245 static const uint8_t CODE=0x6;
00246 static const uint8_t CLASS_CODE=connection::CODE;
00247 static const char* CLASS_NAME;
00248 explicit TuneOk(
00249 Uint16 channelMax_=Uint16(),
00250 Uint16 maxFrameSize_=Uint16(),
00251 Uint16 heartbeat_=Uint16()
00252 );
00253 void accept(Visitor&);
00254 void accept(ConstVisitor&) const;
00255 template <class S> void serialize(S& s) {
00256 s(channelMax)(maxFrameSize)(heartbeat);
00257 }
00258
00259 struct Handler
00260 {
00261 void connectionTuneOk(
00262 Uint16 channelMax_,
00263 Uint16 maxFrameSize_,
00264 Uint16 heartbeat_
00265 );
00266 };
00267
00268 template <class T> void invoke(T& target)const
00269 {
00270 target.connectionTuneOk(channelMax, maxFrameSize, heartbeat );
00271 }
00272 };
00273 inline Packer<TuneOk> serializable(TuneOk& x) { return Packer<TuneOk>(x); }
00274 std::ostream& operator << (std::ostream&, const TuneOk&);
00275 bool operator==(const TuneOk&, const TuneOk&);
00276
00277 struct Open:
00278 public Control
00279 {
00280 Str8 virtualHost;
00281 Str16Array capabilities;
00282 Bit insist;
00283
00284 static const char* NAME;
00285 static const uint8_t CODE=0x7;
00286 static const uint8_t CLASS_CODE=connection::CODE;
00287 static const char* CLASS_NAME;
00288 explicit Open(
00289 const Str8& virtualHost_=Str8(),
00290 const Str16Array& capabilities_=Str16Array(),
00291 Bit insist_=Bit()
00292 );
00293 void accept(Visitor&);
00294 void accept(ConstVisitor&) const;
00295 template <class S> void serialize(S& s) {
00296 s(virtualHost)(capabilities)(insist);
00297 }
00298
00299 struct Handler
00300 {
00301 void connectionOpen(
00302 const Str8& virtualHost_,
00303 const Str16Array& capabilities_,
00304 Bit insist_
00305 );
00306 };
00307
00308 template <class T> void invoke(T& target)const
00309 {
00310 target.connectionOpen(virtualHost, capabilities, insist );
00311 }
00312 };
00313 inline Packer<Open> serializable(Open& x) { return Packer<Open>(x); }
00314 std::ostream& operator << (std::ostream&, const Open&);
00315 bool operator==(const Open&, const Open&);
00316
00317 struct OpenOk:
00318 public Control
00319 {
00320 AmqpHostArray knownHosts;
00321
00322 static const char* NAME;
00323 static const uint8_t CODE=0x8;
00324 static const uint8_t CLASS_CODE=connection::CODE;
00325 static const char* CLASS_NAME;
00326 explicit OpenOk(const connection::AmqpHostArray& knownHosts_=connection::AmqpHostArray());
00327 void accept(Visitor&);
00328 void accept(ConstVisitor&) const;
00329 template <class S> void serialize(S& s) {
00330 s(knownHosts);
00331 }
00332
00333 struct Handler
00334 {
00335 void connectionOpenOk(
00336 const connection::AmqpHostArray& knownHosts_
00337 );
00338 };
00339
00340 template <class T> void invoke(T& target)const
00341 {
00342 target.connectionOpenOk(knownHosts );
00343 }
00344 };
00345 inline Packer<OpenOk> serializable(OpenOk& x) { return Packer<OpenOk>(x); }
00346 std::ostream& operator << (std::ostream&, const OpenOk&);
00347 bool operator==(const OpenOk&, const OpenOk&);
00348
00349 struct Redirect:
00350 public Control
00351 {
00352 AmqpHostUrl host;
00353 AmqpHostArray knownHosts;
00354
00355 static const char* NAME;
00356 static const uint8_t CODE=0x9;
00357 static const uint8_t CLASS_CODE=connection::CODE;
00358 static const char* CLASS_NAME;
00359 explicit Redirect(
00360 const connection::AmqpHostUrl& host_=connection::AmqpHostUrl(),
00361 const connection::AmqpHostArray& knownHosts_=connection::AmqpHostArray()
00362 );
00363 void accept(Visitor&);
00364 void accept(ConstVisitor&) const;
00365 template <class S> void serialize(S& s) {
00366 s(host)(knownHosts);
00367 }
00368
00369 struct Handler
00370 {
00371 void connectionRedirect(
00372 const connection::AmqpHostUrl& host_,
00373 const connection::AmqpHostArray& knownHosts_
00374 );
00375 };
00376
00377 template <class T> void invoke(T& target)const
00378 {
00379 target.connectionRedirect(host, knownHosts );
00380 }
00381 };
00382 inline Packer<Redirect> serializable(Redirect& x) { return Packer<Redirect>(x); }
00383 std::ostream& operator << (std::ostream&, const Redirect&);
00384 bool operator==(const Redirect&, const Redirect&);
00385
00386 struct Heartbeat:
00387 public Control
00388 {
00389
00390 static const char* NAME;
00391 static const uint8_t CODE=0xa;
00392 static const uint8_t CLASS_CODE=connection::CODE;
00393 static const char* CLASS_NAME;
00394 explicit Heartbeat();
00395 void accept(Visitor&);
00396 void accept(ConstVisitor&) const;
00397 template <class S> void serialize(S&) {}
00398
00399 struct Handler
00400 {
00401 void connectionHeartbeat(
00402
00403 );
00404 };
00405
00406 template <class T> void invoke(T& target)const
00407 {
00408 target.connectionHeartbeat( );
00409 }
00410 };
00411 inline Packer<Heartbeat> serializable(Heartbeat& x) { return Packer<Heartbeat>(x); }
00412 std::ostream& operator << (std::ostream&, const Heartbeat&);
00413 bool operator==(const Heartbeat&, const Heartbeat&);
00414
00415 struct Close:
00416 public Control
00417 {
00418 CloseCode replyCode;
00419 Str8 replyText;
00420
00421 static const char* NAME;
00422 static const uint8_t CODE=0xb;
00423 static const uint8_t CLASS_CODE=connection::CODE;
00424 static const char* CLASS_NAME;
00425 explicit Close(
00426 const connection::CloseCode& replyCode_=connection::CloseCode(),
00427 const Str8& replyText_=Str8()
00428 );
00429 void accept(Visitor&);
00430 void accept(ConstVisitor&) const;
00431 template <class S> void serialize(S& s) {
00432 s(replyCode)(replyText);
00433 }
00434
00435 struct Handler
00436 {
00437 void connectionClose(
00438 const connection::CloseCode& replyCode_,
00439 const Str8& replyText_
00440 );
00441 };
00442
00443 template <class T> void invoke(T& target)const
00444 {
00445 target.connectionClose(replyCode, replyText );
00446 }
00447 };
00448 inline Packer<Close> serializable(Close& x) { return Packer<Close>(x); }
00449 std::ostream& operator << (std::ostream&, const Close&);
00450 bool operator==(const Close&, const Close&);
00451
00452 struct CloseOk:
00453 public Control
00454 {
00455
00456 static const char* NAME;
00457 static const uint8_t CODE=0xc;
00458 static const uint8_t CLASS_CODE=connection::CODE;
00459 static const char* CLASS_NAME;
00460 explicit CloseOk();
00461 void accept(Visitor&);
00462 void accept(ConstVisitor&) const;
00463 template <class S> void serialize(S&) {}
00464
00465 struct Handler
00466 {
00467 void connectionCloseOk(
00468
00469 );
00470 };
00471
00472 template <class T> void invoke(T& target)const
00473 {
00474 target.connectionCloseOk( );
00475 }
00476 };
00477 inline Packer<CloseOk> serializable(CloseOk& x) { return Packer<CloseOk>(x); }
00478 std::ostream& operator << (std::ostream&, const CloseOk&);
00479 bool operator==(const CloseOk&, const CloseOk&);
00480
00481 }
00482
00483
00484 namespace session {
00485
00486
00487 struct Attach:
00488 public Control
00489 {
00490 Name name;
00491 Bit force;
00492
00493 static const char* NAME;
00494 static const uint8_t CODE=0x1;
00495 static const uint8_t CLASS_CODE=session::CODE;
00496 static const char* CLASS_NAME;
00497 explicit Attach(
00498 const session::Name& name_=session::Name(),
00499 Bit force_=Bit()
00500 );
00501 void accept(Visitor&);
00502 void accept(ConstVisitor&) const;
00503 template <class S> void serialize(S& s) {
00504 s(name)(force);
00505 }
00506
00507 struct Handler
00508 {
00509 void sessionAttach(
00510 const session::Name& name_,
00511 Bit force_
00512 );
00513 };
00514
00515 template <class T> void invoke(T& target)const
00516 {
00517 target.sessionAttach(name, force );
00518 }
00519 };
00520 inline Packer<Attach> serializable(Attach& x) { return Packer<Attach>(x); }
00521 std::ostream& operator << (std::ostream&, const Attach&);
00522 bool operator==(const Attach&, const Attach&);
00523
00524 struct Attached:
00525 public Control
00526 {
00527 Name name;
00528
00529 static const char* NAME;
00530 static const uint8_t CODE=0x2;
00531 static const uint8_t CLASS_CODE=session::CODE;
00532 static const char* CLASS_NAME;
00533 explicit Attached(const session::Name& name_=session::Name());
00534 void accept(Visitor&);
00535 void accept(ConstVisitor&) const;
00536 template <class S> void serialize(S& s) {
00537 s(name);
00538 }
00539
00540 struct Handler
00541 {
00542 void sessionAttached(
00543 const session::Name& name_
00544 );
00545 };
00546
00547 template <class T> void invoke(T& target)const
00548 {
00549 target.sessionAttached(name );
00550 }
00551 };
00552 inline Packer<Attached> serializable(Attached& x) { return Packer<Attached>(x); }
00553 std::ostream& operator << (std::ostream&, const Attached&);
00554 bool operator==(const Attached&, const Attached&);
00555
00556 struct Detach:
00557 public Control
00558 {
00559 Name name;
00560
00561 static const char* NAME;
00562 static const uint8_t CODE=0x3;
00563 static const uint8_t CLASS_CODE=session::CODE;
00564 static const char* CLASS_NAME;
00565 explicit Detach(const session::Name& name_=session::Name());
00566 void accept(Visitor&);
00567 void accept(ConstVisitor&) const;
00568 template <class S> void serialize(S& s) {
00569 s(name);
00570 }
00571
00572 struct Handler
00573 {
00574 void sessionDetach(
00575 const session::Name& name_
00576 );
00577 };
00578
00579 template <class T> void invoke(T& target)const
00580 {
00581 target.sessionDetach(name );
00582 }
00583 };
00584 inline Packer<Detach> serializable(Detach& x) { return Packer<Detach>(x); }
00585 std::ostream& operator << (std::ostream&, const Detach&);
00586 bool operator==(const Detach&, const Detach&);
00587
00588 struct Detached:
00589 public Control
00590 {
00591 Name name;
00592 DetachCode code;
00593
00594 static const char* NAME;
00595 static const uint8_t CODE=0x4;
00596 static const uint8_t CLASS_CODE=session::CODE;
00597 static const char* CLASS_NAME;
00598 explicit Detached(
00599 const session::Name& name_=session::Name(),
00600 const session::DetachCode& code_=session::DetachCode()
00601 );
00602 void accept(Visitor&);
00603 void accept(ConstVisitor&) const;
00604 template <class S> void serialize(S& s) {
00605 s(name)(code);
00606 }
00607
00608 struct Handler
00609 {
00610 void sessionDetached(
00611 const session::Name& name_,
00612 const session::DetachCode& code_
00613 );
00614 };
00615
00616 template <class T> void invoke(T& target)const
00617 {
00618 target.sessionDetached(name, code );
00619 }
00620 };
00621 inline Packer<Detached> serializable(Detached& x) { return Packer<Detached>(x); }
00622 std::ostream& operator << (std::ostream&, const Detached&);
00623 bool operator==(const Detached&, const Detached&);
00624
00625 struct RequestTimeout:
00626 public Control
00627 {
00628 Uint32 timeout;
00629
00630 static const char* NAME;
00631 static const uint8_t CODE=0x5;
00632 static const uint8_t CLASS_CODE=session::CODE;
00633 static const char* CLASS_NAME;
00634 explicit RequestTimeout(Uint32 timeout_=Uint32());
00635 void accept(Visitor&);
00636 void accept(ConstVisitor&) const;
00637 template <class S> void serialize(S& s) {
00638 s(timeout);
00639 }
00640
00641 struct Handler
00642 {
00643 void sessionRequestTimeout(
00644 Uint32 timeout_
00645 );
00646 };
00647
00648 template <class T> void invoke(T& target)const
00649 {
00650 target.sessionRequestTimeout(timeout );
00651 }
00652 };
00653 inline Packer<RequestTimeout> serializable(RequestTimeout& x) { return Packer<RequestTimeout>(x); }
00654 std::ostream& operator << (std::ostream&, const RequestTimeout&);
00655 bool operator==(const RequestTimeout&, const RequestTimeout&);
00656
00657 struct Timeout:
00658 public Control
00659 {
00660 Uint32 timeout;
00661
00662 static const char* NAME;
00663 static const uint8_t CODE=0x6;
00664 static const uint8_t CLASS_CODE=session::CODE;
00665 static const char* CLASS_NAME;
00666 explicit Timeout(Uint32 timeout_=Uint32());
00667 void accept(Visitor&);
00668 void accept(ConstVisitor&) const;
00669 template <class S> void serialize(S& s) {
00670 s(timeout);
00671 }
00672
00673 struct Handler
00674 {
00675 void sessionTimeout(
00676 Uint32 timeout_
00677 );
00678 };
00679
00680 template <class T> void invoke(T& target)const
00681 {
00682 target.sessionTimeout(timeout );
00683 }
00684 };
00685 inline Packer<Timeout> serializable(Timeout& x) { return Packer<Timeout>(x); }
00686 std::ostream& operator << (std::ostream&, const Timeout&);
00687 bool operator==(const Timeout&, const Timeout&);
00688
00689 struct CommandPoint:
00690 public Control
00691 {
00692 SequenceNo commandId;
00693 Uint64 commandOffset;
00694
00695 static const char* NAME;
00696 static const uint8_t CODE=0x7;
00697 static const uint8_t CLASS_CODE=session::CODE;
00698 static const char* CLASS_NAME;
00699 explicit CommandPoint(
00700 const SequenceNo& commandId_=SequenceNo(),
00701 Uint64 commandOffset_=Uint64()
00702 );
00703 void accept(Visitor&);
00704 void accept(ConstVisitor&) const;
00705 template <class S> void serialize(S& s) {
00706 s(commandId)(commandOffset);
00707 }
00708
00709 struct Handler
00710 {
00711 void sessionCommandPoint(
00712 const SequenceNo& commandId_,
00713 Uint64 commandOffset_
00714 );
00715 };
00716
00717 template <class T> void invoke(T& target)const
00718 {
00719 target.sessionCommandPoint(commandId, commandOffset );
00720 }
00721 };
00722 inline Packer<CommandPoint> serializable(CommandPoint& x) { return Packer<CommandPoint>(x); }
00723 std::ostream& operator << (std::ostream&, const CommandPoint&);
00724 bool operator==(const CommandPoint&, const CommandPoint&);
00725
00726 struct Expected:
00727 public Control
00728 {
00729 Commands commands;
00730 CommandFragments fragments;
00731
00732 static const char* NAME;
00733 static const uint8_t CODE=0x8;
00734 static const uint8_t CLASS_CODE=session::CODE;
00735 static const char* CLASS_NAME;
00736 explicit Expected(
00737 const session::Commands& commands_=session::Commands(),
00738 const session::CommandFragments& fragments_=session::CommandFragments()
00739 );
00740 void accept(Visitor&);
00741 void accept(ConstVisitor&) const;
00742 template <class S> void serialize(S& s) {
00743 s(commands)(fragments);
00744 }
00745
00746 struct Handler
00747 {
00748 void sessionExpected(
00749 const session::Commands& commands_,
00750 const session::CommandFragments& fragments_
00751 );
00752 };
00753
00754 template <class T> void invoke(T& target)const
00755 {
00756 target.sessionExpected(commands, fragments );
00757 }
00758 };
00759 inline Packer<Expected> serializable(Expected& x) { return Packer<Expected>(x); }
00760 std::ostream& operator << (std::ostream&, const Expected&);
00761 bool operator==(const Expected&, const Expected&);
00762
00763 struct Confirmed:
00764 public Control
00765 {
00766 Commands commands;
00767 CommandFragments fragments;
00768
00769 static const char* NAME;
00770 static const uint8_t CODE=0x9;
00771 static const uint8_t CLASS_CODE=session::CODE;
00772 static const char* CLASS_NAME;
00773 explicit Confirmed(
00774 const session::Commands& commands_=session::Commands(),
00775 const session::CommandFragments& fragments_=session::CommandFragments()
00776 );
00777 void accept(Visitor&);
00778 void accept(ConstVisitor&) const;
00779 template <class S> void serialize(S& s) {
00780 s(commands)(fragments);
00781 }
00782
00783 struct Handler
00784 {
00785 void sessionConfirmed(
00786 const session::Commands& commands_,
00787 const session::CommandFragments& fragments_
00788 );
00789 };
00790
00791 template <class T> void invoke(T& target)const
00792 {
00793 target.sessionConfirmed(commands, fragments );
00794 }
00795 };
00796 inline Packer<Confirmed> serializable(Confirmed& x) { return Packer<Confirmed>(x); }
00797 std::ostream& operator << (std::ostream&, const Confirmed&);
00798 bool operator==(const Confirmed&, const Confirmed&);
00799
00800 struct Completed:
00801 public Control
00802 {
00803 Commands commands;
00804 Bit timelyReply;
00805
00806 static const char* NAME;
00807 static const uint8_t CODE=0xa;
00808 static const uint8_t CLASS_CODE=session::CODE;
00809 static const char* CLASS_NAME;
00810 explicit Completed(
00811 const session::Commands& commands_=session::Commands(),
00812 Bit timelyReply_=Bit()
00813 );
00814 void accept(Visitor&);
00815 void accept(ConstVisitor&) const;
00816 template <class S> void serialize(S& s) {
00817 s(commands)(timelyReply);
00818 }
00819
00820 struct Handler
00821 {
00822 void sessionCompleted(
00823 const session::Commands& commands_,
00824 Bit timelyReply_
00825 );
00826 };
00827
00828 template <class T> void invoke(T& target)const
00829 {
00830 target.sessionCompleted(commands, timelyReply );
00831 }
00832 };
00833 inline Packer<Completed> serializable(Completed& x) { return Packer<Completed>(x); }
00834 std::ostream& operator << (std::ostream&, const Completed&);
00835 bool operator==(const Completed&, const Completed&);
00836
00837 struct KnownCompleted:
00838 public Control
00839 {
00840 Commands commands;
00841
00842 static const char* NAME;
00843 static const uint8_t CODE=0xb;
00844 static const uint8_t CLASS_CODE=session::CODE;
00845 static const char* CLASS_NAME;
00846 explicit KnownCompleted(const session::Commands& commands_=session::Commands());
00847 void accept(Visitor&);
00848 void accept(ConstVisitor&) const;
00849 template <class S> void serialize(S& s) {
00850 s(commands);
00851 }
00852
00853 struct Handler
00854 {
00855 void sessionKnownCompleted(
00856 const session::Commands& commands_
00857 );
00858 };
00859
00860 template <class T> void invoke(T& target)const
00861 {
00862 target.sessionKnownCompleted(commands );
00863 }
00864 };
00865 inline Packer<KnownCompleted> serializable(KnownCompleted& x) { return Packer<KnownCompleted>(x); }
00866 std::ostream& operator << (std::ostream&, const KnownCompleted&);
00867 bool operator==(const KnownCompleted&, const KnownCompleted&);
00868
00869 struct Flush:
00870 public Control
00871 {
00872 Bit expected;
00873 Bit confirmed;
00874 Bit completed;
00875
00876 static const char* NAME;
00877 static const uint8_t CODE=0xc;
00878 static const uint8_t CLASS_CODE=session::CODE;
00879 static const char* CLASS_NAME;
00880 explicit Flush(
00881 Bit expected_=Bit(),
00882 Bit confirmed_=Bit(),
00883 Bit completed_=Bit()
00884 );
00885 void accept(Visitor&);
00886 void accept(ConstVisitor&) const;
00887 template <class S> void serialize(S& s) {
00888 s(expected)(confirmed)(completed);
00889 }
00890
00891 struct Handler
00892 {
00893 void sessionFlush(
00894 Bit expected_,
00895 Bit confirmed_,
00896 Bit completed_
00897 );
00898 };
00899
00900 template <class T> void invoke(T& target)const
00901 {
00902 target.sessionFlush(expected, confirmed, completed );
00903 }
00904 };
00905 inline Packer<Flush> serializable(Flush& x) { return Packer<Flush>(x); }
00906 std::ostream& operator << (std::ostream&, const Flush&);
00907 bool operator==(const Flush&, const Flush&);
00908
00909 struct Gap:
00910 public Control
00911 {
00912 Commands commands;
00913
00914 static const char* NAME;
00915 static const uint8_t CODE=0xd;
00916 static const uint8_t CLASS_CODE=session::CODE;
00917 static const char* CLASS_NAME;
00918 explicit Gap(const session::Commands& commands_=session::Commands());
00919 void accept(Visitor&);
00920 void accept(ConstVisitor&) const;
00921 template <class S> void serialize(S& s) {
00922 s(commands);
00923 }
00924
00925 struct Handler
00926 {
00927 void sessionGap(
00928 const session::Commands& commands_
00929 );
00930 };
00931
00932 template <class T> void invoke(T& target)const
00933 {
00934 target.sessionGap(commands );
00935 }
00936 };
00937 inline Packer<Gap> serializable(Gap& x) { return Packer<Gap>(x); }
00938 std::ostream& operator << (std::ostream&, const Gap&);
00939 bool operator==(const Gap&, const Gap&);
00940
00941 }
00942
00943
00944 namespace execution {
00945
00946
00947 struct Sync:
00948 public Command
00949 {
00950
00951 static const char* NAME;
00952 static const uint8_t CODE=0x1;
00953 static const uint8_t CLASS_CODE=execution::CODE;
00954 static const char* CLASS_NAME;
00955 explicit Sync();
00956 void accept(Visitor&);
00957 void accept(ConstVisitor&) const;
00958 template <class S> void serialize(S&) {}
00959
00960 struct Handler
00961 {
00962 void executionSync(
00963
00964 );
00965 };
00966
00967 template <class T> void invoke(T& target)const
00968 {
00969 target.executionSync( );
00970 }
00971 };
00972 inline CommandPacker<Sync> serializable(Sync& x) { return CommandPacker<Sync>(x); }
00973 std::ostream& operator << (std::ostream&, const Sync&);
00974 bool operator==(const Sync&, const Sync&);
00975
00976 struct Result:
00977 public Command
00978 {
00979 SequenceNo commandId;
00980 Struct32 value;
00981
00982 static const char* NAME;
00983 static const uint8_t CODE=0x2;
00984 static const uint8_t CLASS_CODE=execution::CODE;
00985 static const char* CLASS_NAME;
00986 explicit Result(
00987 const SequenceNo& commandId_=SequenceNo(),
00988 const Struct32& value_=Struct32()
00989 );
00990 void accept(Visitor&);
00991 void accept(ConstVisitor&) const;
00992 template <class S> void serialize(S& s) {
00993 s(commandId)(value);
00994 }
00995
00996 struct Handler
00997 {
00998 void executionResult(
00999 const SequenceNo& commandId_,
01000 const Struct32& value_
01001 );
01002 };
01003
01004 template <class T> void invoke(T& target)const
01005 {
01006 target.executionResult(commandId, value );
01007 }
01008 };
01009 inline CommandPacker<Result> serializable(Result& x) { return CommandPacker<Result>(x); }
01010 std::ostream& operator << (std::ostream&, const Result&);
01011 bool operator==(const Result&, const Result&);
01012
01013 struct Exception:
01014 public Command
01015 {
01016 ErrorCode errorCode;
01017 SequenceNo commandId;
01018 Uint8 classCode;
01019 Uint8 commandCode;
01020 Uint8 fieldIndex;
01021 Str16 description;
01022 Map errorInfo;
01023
01024 static const char* NAME;
01025 static const uint8_t CODE=0x3;
01026 static const uint8_t CLASS_CODE=execution::CODE;
01027 static const char* CLASS_NAME;
01028 explicit Exception(
01029 const execution::ErrorCode& errorCode_=execution::ErrorCode(),
01030 const SequenceNo& commandId_=SequenceNo(),
01031 Uint8 classCode_=Uint8(),
01032 Uint8 commandCode_=Uint8(),
01033 Uint8 fieldIndex_=Uint8(),
01034 const Str16& description_=Str16(),
01035 const Map& errorInfo_=Map()
01036 );
01037 void accept(Visitor&);
01038 void accept(ConstVisitor&) const;
01039 template <class S> void serialize(S& s) {
01040 s(errorCode)(commandId)(classCode)(commandCode)(fieldIndex)(description)(errorInfo);
01041 }
01042
01043 struct Handler
01044 {
01045 void executionException(
01046 const execution::ErrorCode& errorCode_,
01047 const SequenceNo& commandId_,
01048 Uint8 classCode_,
01049 Uint8 commandCode_,
01050 Uint8 fieldIndex_,
01051 const Str16& description_,
01052 const Map& errorInfo_
01053 );
01054 };
01055
01056 template <class T> void invoke(T& target)const
01057 {
01058 target.executionException(errorCode, commandId, classCode, commandCode, fieldIndex, description, errorInfo );
01059 }
01060 };
01061 inline CommandPacker<Exception> serializable(Exception& x) { return CommandPacker<Exception>(x); }
01062 std::ostream& operator << (std::ostream&, const Exception&);
01063 bool operator==(const Exception&, const Exception&);
01064
01065 }
01066
01067
01068 namespace message {
01069
01070
01071 struct Transfer:
01072 public Command
01073 {
01074 Destination destination;
01075 AcceptMode acceptMode;
01076 AcquireMode acquireMode;
01077
01078 static const char* NAME;
01079 static const uint8_t CODE=0x1;
01080 static const uint8_t CLASS_CODE=message::CODE;
01081 static const char* CLASS_NAME;
01082 explicit Transfer(
01083 const message::Destination& destination_=message::Destination(),
01084 const message::AcceptMode& acceptMode_=message::AcceptMode(),
01085 const message::AcquireMode& acquireMode_=message::AcquireMode()
01086 );
01087 void accept(Visitor&);
01088 void accept(ConstVisitor&) const;
01089 template <class S> void serialize(S& s) {
01090 s(destination)(acceptMode)(acquireMode);
01091 }
01092
01093 struct Handler
01094 {
01095 void messageTransfer(
01096 const message::Destination& destination_,
01097 const message::AcceptMode& acceptMode_,
01098 const message::AcquireMode& acquireMode_
01099 );
01100 };
01101
01102 template <class T> void invoke(T& target)const
01103 {
01104 target.messageTransfer(destination, acceptMode, acquireMode );
01105 }
01106 };
01107 inline CommandPacker<Transfer> serializable(Transfer& x) { return CommandPacker<Transfer>(x); }
01108 std::ostream& operator << (std::ostream&, const Transfer&);
01109 bool operator==(const Transfer&, const Transfer&);
01110
01111 struct Accept:
01112 public Command
01113 {
01114 session::Commands transfers;
01115
01116 static const char* NAME;
01117 static const uint8_t CODE=0x2;
01118 static const uint8_t CLASS_CODE=message::CODE;
01119 static const char* CLASS_NAME;
01120 explicit Accept(const session::Commands& transfers_=session::Commands());
01121 void accept(Visitor&);
01122 void accept(ConstVisitor&) const;
01123 template <class S> void serialize(S& s) {
01124 s(transfers);
01125 }
01126
01127 struct Handler
01128 {
01129 void messageAccept(
01130 const session::Commands& transfers_
01131 );
01132 };
01133
01134 template <class T> void invoke(T& target)const
01135 {
01136 target.messageAccept(transfers );
01137 }
01138 };
01139 inline CommandPacker<Accept> serializable(Accept& x) { return CommandPacker<Accept>(x); }
01140 std::ostream& operator << (std::ostream&, const Accept&);
01141 bool operator==(const Accept&, const Accept&);
01142
01143 struct Reject:
01144 public Command
01145 {
01146 session::Commands transfers;
01147 RejectCode code;
01148 Str8 text;
01149
01150 static const char* NAME;
01151 static const uint8_t CODE=0x3;
01152 static const uint8_t CLASS_CODE=message::CODE;
01153 static const char* CLASS_NAME;
01154 explicit Reject(
01155 const session::Commands& transfers_=session::Commands(),
01156 const message::RejectCode& code_=message::RejectCode(),
01157 const Str8& text_=Str8()
01158 );
01159 void accept(Visitor&);
01160 void accept(ConstVisitor&) const;
01161 template <class S> void serialize(S& s) {
01162 s(transfers)(code)(text);
01163 }
01164
01165 struct Handler
01166 {
01167 void messageReject(
01168 const session::Commands& transfers_,
01169 const message::RejectCode& code_,
01170 const Str8& text_
01171 );
01172 };
01173
01174 template <class T> void invoke(T& target)const
01175 {
01176 target.messageReject(transfers, code, text );
01177 }
01178 };
01179 inline CommandPacker<Reject> serializable(Reject& x) { return CommandPacker<Reject>(x); }
01180 std::ostream& operator << (std::ostream&, const Reject&);
01181 bool operator==(const Reject&, const Reject&);
01182
01183 struct Release:
01184 public Command
01185 {
01186 session::Commands transfers;
01187 Bit setRedelivered;
01188
01189 static const char* NAME;
01190 static const uint8_t CODE=0x4;
01191 static const uint8_t CLASS_CODE=message::CODE;
01192 static const char* CLASS_NAME;
01193 explicit Release(
01194 const session::Commands& transfers_=session::Commands(),
01195 Bit setRedelivered_=Bit()
01196 );
01197 void accept(Visitor&);
01198 void accept(ConstVisitor&) const;
01199 template <class S> void serialize(S& s) {
01200 s(transfers)(setRedelivered);
01201 }
01202
01203 struct Handler
01204 {
01205 void messageRelease(
01206 const session::Commands& transfers_,
01207 Bit setRedelivered_
01208 );
01209 };
01210
01211 template <class T> void invoke(T& target)const
01212 {
01213 target.messageRelease(transfers, setRedelivered );
01214 }
01215 };
01216 inline CommandPacker<Release> serializable(Release& x) { return CommandPacker<Release>(x); }
01217 std::ostream& operator << (std::ostream&, const Release&);
01218 bool operator==(const Release&, const Release&);
01219
01220 struct Acquire:
01221 public Command
01222 {
01223 session::Commands transfers;
01224
01225 static const char* NAME;
01226 static const uint8_t CODE=0x5;
01227 static const uint8_t CLASS_CODE=message::CODE;
01228 static const char* CLASS_NAME;
01229 explicit Acquire(const session::Commands& transfers_=session::Commands());
01230 void accept(Visitor&);
01231 void accept(ConstVisitor&) const;
01232 template <class S> void serialize(S& s) {
01233 s(transfers);
01234 }
01235
01236 struct Handler
01237 {
01238 void messageAcquire(
01239 const session::Commands& transfers_
01240 );
01241 };
01242
01243 template <class T> void invoke(T& target)const
01244 {
01245 target.messageAcquire(transfers );
01246 }
01247 };
01248 inline CommandPacker<Acquire> serializable(Acquire& x) { return CommandPacker<Acquire>(x); }
01249 std::ostream& operator << (std::ostream&, const Acquire&);
01250 bool operator==(const Acquire&, const Acquire&);
01251
01252 struct Resume:
01253 public Command
01254 {
01255 Destination destination;
01256 ResumeId resumeId;
01257
01258 static const char* NAME;
01259 static const uint8_t CODE=0x6;
01260 static const uint8_t CLASS_CODE=message::CODE;
01261 static const char* CLASS_NAME;
01262 explicit Resume(
01263 const message::Destination& destination_=message::Destination(),
01264 const message::ResumeId& resumeId_=message::ResumeId()
01265 );
01266 void accept(Visitor&);
01267 void accept(ConstVisitor&) const;
01268 template <class S> void serialize(S& s) {
01269 s(destination)(resumeId);
01270 }
01271
01272 struct Handler
01273 {
01274 void messageResume(
01275 const message::Destination& destination_,
01276 const message::ResumeId& resumeId_
01277 );
01278 };
01279
01280 template <class T> void invoke(T& target)const
01281 {
01282 target.messageResume(destination, resumeId );
01283 }
01284 };
01285 inline CommandPacker<Resume> serializable(Resume& x) { return CommandPacker<Resume>(x); }
01286 std::ostream& operator << (std::ostream&, const Resume&);
01287 bool operator==(const Resume&, const Resume&);
01288
01289 struct Subscribe:
01290 public Command
01291 {
01292 queue::Name queue;
01293 Destination destination;
01294 AcceptMode acceptMode;
01295 AcquireMode acquireMode;
01296 Bit exclusive;
01297 ResumeId resumeId;
01298 Uint64 resumeTtl;
01299 Map arguments;
01300
01301 static const char* NAME;
01302 static const uint8_t CODE=0x7;
01303 static const uint8_t CLASS_CODE=message::CODE;
01304 static const char* CLASS_NAME;
01305 explicit Subscribe(
01306 const queue::Name& queue_=queue::Name(),
01307 const message::Destination& destination_=message::Destination(),
01308 const message::AcceptMode& acceptMode_=message::AcceptMode(),
01309 const message::AcquireMode& acquireMode_=message::AcquireMode(),
01310 Bit exclusive_=Bit(),
01311 const message::ResumeId& resumeId_=message::ResumeId(),
01312 Uint64 resumeTtl_=Uint64(),
01313 const Map& arguments_=Map()
01314 );
01315 void accept(Visitor&);
01316 void accept(ConstVisitor&) const;
01317 template <class S> void serialize(S& s) {
01318 s(queue)(destination)(acceptMode)(acquireMode)(exclusive)(resumeId)(resumeTtl)(arguments);
01319 }
01320
01321 struct Handler
01322 {
01323 void messageSubscribe(
01324 const queue::Name& queue_,
01325 const message::Destination& destination_,
01326 const message::AcceptMode& acceptMode_,
01327 const message::AcquireMode& acquireMode_,
01328 Bit exclusive_,
01329 const message::ResumeId& resumeId_,
01330 Uint64 resumeTtl_,
01331 const Map& arguments_
01332 );
01333 };
01334
01335 template <class T> void invoke(T& target)const
01336 {
01337 target.messageSubscribe(queue, destination, acceptMode, acquireMode, exclusive, resumeId, resumeTtl, arguments );
01338 }
01339 };
01340 inline CommandPacker<Subscribe> serializable(Subscribe& x) { return CommandPacker<Subscribe>(x); }
01341 std::ostream& operator << (std::ostream&, const Subscribe&);
01342 bool operator==(const Subscribe&, const Subscribe&);
01343
01344 struct Cancel:
01345 public Command
01346 {
01347 Destination destination;
01348
01349 static const char* NAME;
01350 static const uint8_t CODE=0x8;
01351 static const uint8_t CLASS_CODE=message::CODE;
01352 static const char* CLASS_NAME;
01353 explicit Cancel(const message::Destination& destination_=message::Destination());
01354 void accept(Visitor&);
01355 void accept(ConstVisitor&) const;
01356 template <class S> void serialize(S& s) {
01357 s(destination);
01358 }
01359
01360 struct Handler
01361 {
01362 void messageCancel(
01363 const message::Destination& destination_
01364 );
01365 };
01366
01367 template <class T> void invoke(T& target)const
01368 {
01369 target.messageCancel(destination );
01370 }
01371 };
01372 inline CommandPacker<Cancel> serializable(Cancel& x) { return CommandPacker<Cancel>(x); }
01373 std::ostream& operator << (std::ostream&, const Cancel&);
01374 bool operator==(const Cancel&, const Cancel&);
01375
01376 struct SetFlowMode:
01377 public Command
01378 {
01379 Destination destination;
01380 FlowMode flowMode;
01381
01382 static const char* NAME;
01383 static const uint8_t CODE=0x9;
01384 static const uint8_t CLASS_CODE=message::CODE;
01385 static const char* CLASS_NAME;
01386 explicit SetFlowMode(
01387 const message::Destination& destination_=message::Destination(),
01388 const message::FlowMode& flowMode_=message::FlowMode()
01389 );
01390 void accept(Visitor&);
01391 void accept(ConstVisitor&) const;
01392 template <class S> void serialize(S& s) {
01393 s(destination)(flowMode);
01394 }
01395
01396 struct Handler
01397 {
01398 void messageSetFlowMode(
01399 const message::Destination& destination_,
01400 const message::FlowMode& flowMode_
01401 );
01402 };
01403
01404 template <class T> void invoke(T& target)const
01405 {
01406 target.messageSetFlowMode(destination, flowMode );
01407 }
01408 };
01409 inline CommandPacker<SetFlowMode> serializable(SetFlowMode& x) { return CommandPacker<SetFlowMode>(x); }
01410 std::ostream& operator << (std::ostream&, const SetFlowMode&);
01411 bool operator==(const SetFlowMode&, const SetFlowMode&);
01412
01413 struct Flow:
01414 public Command
01415 {
01416 Destination destination;
01417 CreditUnit unit;
01418 Uint32 value;
01419
01420 static const char* NAME;
01421 static const uint8_t CODE=0xa;
01422 static const uint8_t CLASS_CODE=message::CODE;
01423 static const char* CLASS_NAME;
01424 explicit Flow(
01425 const message::Destination& destination_=message::Destination(),
01426 const message::CreditUnit& unit_=message::CreditUnit(),
01427 Uint32 value_=Uint32()
01428 );
01429 void accept(Visitor&);
01430 void accept(ConstVisitor&) const;
01431 template <class S> void serialize(S& s) {
01432 s(destination)(unit)(value);
01433 }
01434
01435 struct Handler
01436 {
01437 void messageFlow(
01438 const message::Destination& destination_,
01439 const message::CreditUnit& unit_,
01440 Uint32 value_
01441 );
01442 };
01443
01444 template <class T> void invoke(T& target)const
01445 {
01446 target.messageFlow(destination, unit, value );
01447 }
01448 };
01449 inline CommandPacker<Flow> serializable(Flow& x) { return CommandPacker<Flow>(x); }
01450 std::ostream& operator << (std::ostream&, const Flow&);
01451 bool operator==(const Flow&, const Flow&);
01452
01453 struct Flush:
01454 public Command
01455 {
01456 Destination destination;
01457
01458 static const char* NAME;
01459 static const uint8_t CODE=0xb;
01460 static const uint8_t CLASS_CODE=message::CODE;
01461 static const char* CLASS_NAME;
01462 explicit Flush(const message::Destination& destination_=message::Destination());
01463 void accept(Visitor&);
01464 void accept(ConstVisitor&) const;
01465 template <class S> void serialize(S& s) {
01466 s(destination);
01467 }
01468
01469 struct Handler
01470 {
01471 void messageFlush(
01472 const message::Destination& destination_
01473 );
01474 };
01475
01476 template <class T> void invoke(T& target)const
01477 {
01478 target.messageFlush(destination );
01479 }
01480 };
01481 inline CommandPacker<Flush> serializable(Flush& x) { return CommandPacker<Flush>(x); }
01482 std::ostream& operator << (std::ostream&, const Flush&);
01483 bool operator==(const Flush&, const Flush&);
01484
01485 struct Stop:
01486 public Command
01487 {
01488 Destination destination;
01489
01490 static const char* NAME;
01491 static const uint8_t CODE=0xc;
01492 static const uint8_t CLASS_CODE=message::CODE;
01493 static const char* CLASS_NAME;
01494 explicit Stop(const message::Destination& destination_=message::Destination());
01495 void accept(Visitor&);
01496 void accept(ConstVisitor&) const;
01497 template <class S> void serialize(S& s) {
01498 s(destination);
01499 }
01500
01501 struct Handler
01502 {
01503 void messageStop(
01504 const message::Destination& destination_
01505 );
01506 };
01507
01508 template <class T> void invoke(T& target)const
01509 {
01510 target.messageStop(destination );
01511 }
01512 };
01513 inline CommandPacker<Stop> serializable(Stop& x) { return CommandPacker<Stop>(x); }
01514 std::ostream& operator << (std::ostream&, const Stop&);
01515 bool operator==(const Stop&, const Stop&);
01516
01517 }
01518
01519
01520 namespace tx {
01521
01522
01523 struct Select:
01524 public Command
01525 {
01526
01527 static const char* NAME;
01528 static const uint8_t CODE=0x1;
01529 static const uint8_t CLASS_CODE=tx::CODE;
01530 static const char* CLASS_NAME;
01531 explicit Select();
01532 void accept(Visitor&);
01533 void accept(ConstVisitor&) const;
01534 template <class S> void serialize(S&) {}
01535
01536 struct Handler
01537 {
01538 void txSelect(
01539
01540 );
01541 };
01542
01543 template <class T> void invoke(T& target)const
01544 {
01545 target.txSelect( );
01546 }
01547 };
01548 inline CommandPacker<Select> serializable(Select& x) { return CommandPacker<Select>(x); }
01549 std::ostream& operator << (std::ostream&, const Select&);
01550 bool operator==(const Select&, const Select&);
01551
01552 struct Commit:
01553 public Command
01554 {
01555
01556 static const char* NAME;
01557 static const uint8_t CODE=0x2;
01558 static const uint8_t CLASS_CODE=tx::CODE;
01559 static const char* CLASS_NAME;
01560 explicit Commit();
01561 void accept(Visitor&);
01562 void accept(ConstVisitor&) const;
01563 template <class S> void serialize(S&) {}
01564
01565 struct Handler
01566 {
01567 void txCommit(
01568
01569 );
01570 };
01571
01572 template <class T> void invoke(T& target)const
01573 {
01574 target.txCommit( );
01575 }
01576 };
01577 inline CommandPacker<Commit> serializable(Commit& x) { return CommandPacker<Commit>(x); }
01578 std::ostream& operator << (std::ostream&, const Commit&);
01579 bool operator==(const Commit&, const Commit&);
01580
01581 struct Rollback:
01582 public Command
01583 {
01584
01585 static const char* NAME;
01586 static const uint8_t CODE=0x3;
01587 static const uint8_t CLASS_CODE=tx::CODE;
01588 static const char* CLASS_NAME;
01589 explicit Rollback();
01590 void accept(Visitor&);
01591 void accept(ConstVisitor&) const;
01592 template <class S> void serialize(S&) {}
01593
01594 struct Handler
01595 {
01596 void txRollback(
01597
01598 );
01599 };
01600
01601 template <class T> void invoke(T& target)const
01602 {
01603 target.txRollback( );
01604 }
01605 };
01606 inline CommandPacker<Rollback> serializable(Rollback& x) { return CommandPacker<Rollback>(x); }
01607 std::ostream& operator << (std::ostream&, const Rollback&);
01608 bool operator==(const Rollback&, const Rollback&);
01609
01610 }
01611
01612
01613 namespace dtx {
01614
01615
01616 struct Select:
01617 public Command
01618 {
01619
01620 static const char* NAME;
01621 static const uint8_t CODE=0x1;
01622 static const uint8_t CLASS_CODE=dtx::CODE;
01623 static const char* CLASS_NAME;
01624 explicit Select();
01625 void accept(Visitor&);
01626 void accept(ConstVisitor&) const;
01627 template <class S> void serialize(S&) {}
01628
01629 struct Handler
01630 {
01631 void dtxSelect(
01632
01633 );
01634 };
01635
01636 template <class T> void invoke(T& target)const
01637 {
01638 target.dtxSelect( );
01639 }
01640 };
01641 inline CommandPacker<Select> serializable(Select& x) { return CommandPacker<Select>(x); }
01642 std::ostream& operator << (std::ostream&, const Select&);
01643 bool operator==(const Select&, const Select&);
01644
01645 struct Start:
01646 public Command
01647 {
01648 Xid xid;
01649 Bit join;
01650 Bit resume;
01651
01652 static const char* NAME;
01653 static const uint8_t CODE=0x2;
01654 static const uint8_t CLASS_CODE=dtx::CODE;
01655 static const char* CLASS_NAME;
01656 explicit Start(
01657 const dtx::Xid& xid_=dtx::Xid(),
01658 Bit join_=Bit(),
01659 Bit resume_=Bit()
01660 );
01661 void accept(Visitor&);
01662 void accept(ConstVisitor&) const;
01663 template <class S> void serialize(S& s) {
01664 s(xid)(join)(resume);
01665 }
01666
01667 struct Handler
01668 {
01669 void dtxStart(
01670 const dtx::Xid& xid_,
01671 Bit join_,
01672 Bit resume_
01673 );
01674 };
01675
01676 template <class T> void invoke(T& target)const
01677 {
01678 target.dtxStart(xid, join, resume );
01679 }
01680 };
01681 inline CommandPacker<Start> serializable(Start& x) { return CommandPacker<Start>(x); }
01682 std::ostream& operator << (std::ostream&, const Start&);
01683 bool operator==(const Start&, const Start&);
01684
01685 struct End:
01686 public Command
01687 {
01688 Xid xid;
01689 Bit fail;
01690 Bit suspend;
01691
01692 static const char* NAME;
01693 static const uint8_t CODE=0x3;
01694 static const uint8_t CLASS_CODE=dtx::CODE;
01695 static const char* CLASS_NAME;
01696 explicit End(
01697 const dtx::Xid& xid_=dtx::Xid(),
01698 Bit fail_=Bit(),
01699 Bit suspend_=Bit()
01700 );
01701 void accept(Visitor&);
01702 void accept(ConstVisitor&) const;
01703 template <class S> void serialize(S& s) {
01704 s(xid)(fail)(suspend);
01705 }
01706
01707 struct Handler
01708 {
01709 void dtxEnd(
01710 const dtx::Xid& xid_,
01711 Bit fail_,
01712 Bit suspend_
01713 );
01714 };
01715
01716 template <class T> void invoke(T& target)const
01717 {
01718 target.dtxEnd(xid, fail, suspend );
01719 }
01720 };
01721 inline CommandPacker<End> serializable(End& x) { return CommandPacker<End>(x); }
01722 std::ostream& operator << (std::ostream&, const End&);
01723 bool operator==(const End&, const End&);
01724
01725 struct Commit:
01726 public Command
01727 {
01728 Xid xid;
01729 Bit onePhase;
01730
01731 static const char* NAME;
01732 static const uint8_t CODE=0x4;
01733 static const uint8_t CLASS_CODE=dtx::CODE;
01734 static const char* CLASS_NAME;
01735 explicit Commit(
01736 const dtx::Xid& xid_=dtx::Xid(),
01737 Bit onePhase_=Bit()
01738 );
01739 void accept(Visitor&);
01740 void accept(ConstVisitor&) const;
01741 template <class S> void serialize(S& s) {
01742 s(xid)(onePhase);
01743 }
01744
01745 struct Handler
01746 {
01747 void dtxCommit(
01748 const dtx::Xid& xid_,
01749 Bit onePhase_
01750 );
01751 };
01752
01753 template <class T> void invoke(T& target)const
01754 {
01755 target.dtxCommit(xid, onePhase );
01756 }
01757 };
01758 inline CommandPacker<Commit> serializable(Commit& x) { return CommandPacker<Commit>(x); }
01759 std::ostream& operator << (std::ostream&, const Commit&);
01760 bool operator==(const Commit&, const Commit&);
01761
01762 struct Forget:
01763 public Command
01764 {
01765 Xid xid;
01766
01767 static const char* NAME;
01768 static const uint8_t CODE=0x5;
01769 static const uint8_t CLASS_CODE=dtx::CODE;
01770 static const char* CLASS_NAME;
01771 explicit Forget(const dtx::Xid& xid_=dtx::Xid());
01772 void accept(Visitor&);
01773 void accept(ConstVisitor&) const;
01774 template <class S> void serialize(S& s) {
01775 s(xid);
01776 }
01777
01778 struct Handler
01779 {
01780 void dtxForget(
01781 const dtx::Xid& xid_
01782 );
01783 };
01784
01785 template <class T> void invoke(T& target)const
01786 {
01787 target.dtxForget(xid );
01788 }
01789 };
01790 inline CommandPacker<Forget> serializable(Forget& x) { return CommandPacker<Forget>(x); }
01791 std::ostream& operator << (std::ostream&, const Forget&);
01792 bool operator==(const Forget&, const Forget&);
01793
01794 struct GetTimeout:
01795 public Command
01796 {
01797 Xid xid;
01798
01799 static const char* NAME;
01800 static const uint8_t CODE=0x6;
01801 static const uint8_t CLASS_CODE=dtx::CODE;
01802 static const char* CLASS_NAME;
01803 explicit GetTimeout(const dtx::Xid& xid_=dtx::Xid());
01804 void accept(Visitor&);
01805 void accept(ConstVisitor&) const;
01806 template <class S> void serialize(S& s) {
01807 s(xid);
01808 }
01809
01810 struct Handler
01811 {
01812 void dtxGetTimeout(
01813 const dtx::Xid& xid_
01814 );
01815 };
01816
01817 template <class T> void invoke(T& target)const
01818 {
01819 target.dtxGetTimeout(xid );
01820 }
01821 };
01822 inline CommandPacker<GetTimeout> serializable(GetTimeout& x) { return CommandPacker<GetTimeout>(x); }
01823 std::ostream& operator << (std::ostream&, const GetTimeout&);
01824 bool operator==(const GetTimeout&, const GetTimeout&);
01825
01826 struct Prepare:
01827 public Command
01828 {
01829 Xid xid;
01830
01831 static const char* NAME;
01832 static const uint8_t CODE=0x7;
01833 static const uint8_t CLASS_CODE=dtx::CODE;
01834 static const char* CLASS_NAME;
01835 explicit Prepare(const dtx::Xid& xid_=dtx::Xid());
01836 void accept(Visitor&);
01837 void accept(ConstVisitor&) const;
01838 template <class S> void serialize(S& s) {
01839 s(xid);
01840 }
01841
01842 struct Handler
01843 {
01844 void dtxPrepare(
01845 const dtx::Xid& xid_
01846 );
01847 };
01848
01849 template <class T> void invoke(T& target)const
01850 {
01851 target.dtxPrepare(xid );
01852 }
01853 };
01854 inline CommandPacker<Prepare> serializable(Prepare& x) { return CommandPacker<Prepare>(x); }
01855 std::ostream& operator << (std::ostream&, const Prepare&);
01856 bool operator==(const Prepare&, const Prepare&);
01857
01858 struct Recover:
01859 public Command
01860 {
01861
01862 static const char* NAME;
01863 static const uint8_t CODE=0x8;
01864 static const uint8_t CLASS_CODE=dtx::CODE;
01865 static const char* CLASS_NAME;
01866 explicit Recover();
01867 void accept(Visitor&);
01868 void accept(ConstVisitor&) const;
01869 template <class S> void serialize(S&) {}
01870
01871 struct Handler
01872 {
01873 void dtxRecover(
01874
01875 );
01876 };
01877
01878 template <class T> void invoke(T& target)const
01879 {
01880 target.dtxRecover( );
01881 }
01882 };
01883 inline CommandPacker<Recover> serializable(Recover& x) { return CommandPacker<Recover>(x); }
01884 std::ostream& operator << (std::ostream&, const Recover&);
01885 bool operator==(const Recover&, const Recover&);
01886
01887 struct Rollback:
01888 public Command
01889 {
01890 Xid xid;
01891
01892 static const char* NAME;
01893 static const uint8_t CODE=0x9;
01894 static const uint8_t CLASS_CODE=dtx::CODE;
01895 static const char* CLASS_NAME;
01896 explicit Rollback(const dtx::Xid& xid_=dtx::Xid());
01897 void accept(Visitor&);
01898 void accept(ConstVisitor&) const;
01899 template <class S> void serialize(S& s) {
01900 s(xid);
01901 }
01902
01903 struct Handler
01904 {
01905 void dtxRollback(
01906 const dtx::Xid& xid_
01907 );
01908 };
01909
01910 template <class T> void invoke(T& target)const
01911 {
01912 target.dtxRollback(xid );
01913 }
01914 };
01915 inline CommandPacker<Rollback> serializable(Rollback& x) { return CommandPacker<Rollback>(x); }
01916 std::ostream& operator << (std::ostream&, const Rollback&);
01917 bool operator==(const Rollback&, const Rollback&);
01918
01919 struct SetTimeout:
01920 public Command
01921 {
01922 Xid xid;
01923 Uint32 timeout;
01924
01925 static const char* NAME;
01926 static const uint8_t CODE=0xa;
01927 static const uint8_t CLASS_CODE=dtx::CODE;
01928 static const char* CLASS_NAME;
01929 explicit SetTimeout(
01930 const dtx::Xid& xid_=dtx::Xid(),
01931 Uint32 timeout_=Uint32()
01932 );
01933 void accept(Visitor&);
01934 void accept(ConstVisitor&) const;
01935 template <class S> void serialize(S& s) {
01936 s(xid)(timeout);
01937 }
01938
01939 struct Handler
01940 {
01941 void dtxSetTimeout(
01942 const dtx::Xid& xid_,
01943 Uint32 timeout_
01944 );
01945 };
01946
01947 template <class T> void invoke(T& target)const
01948 {
01949 target.dtxSetTimeout(xid, timeout );
01950 }
01951 };
01952 inline CommandPacker<SetTimeout> serializable(SetTimeout& x) { return CommandPacker<SetTimeout>(x); }
01953 std::ostream& operator << (std::ostream&, const SetTimeout&);
01954 bool operator==(const SetTimeout&, const SetTimeout&);
01955
01956 }
01957
01958
01959 namespace exchange {
01960
01961
01962 struct Declare:
01963 public Command
01964 {
01965 Name exchange;
01966 Str8 type;
01967 Name alternateExchange;
01968 Bit passive;
01969 Bit durable;
01970 Bit autoDelete;
01971 Map arguments;
01972
01973 static const char* NAME;
01974 static const uint8_t CODE=0x1;
01975 static const uint8_t CLASS_CODE=exchange::CODE;
01976 static const char* CLASS_NAME;
01977 explicit Declare(
01978 const exchange::Name& exchange_=exchange::Name(),
01979 const Str8& type_=Str8(),
01980 const exchange::Name& alternateExchange_=exchange::Name(),
01981 Bit passive_=Bit(),
01982 Bit durable_=Bit(),
01983 Bit autoDelete_=Bit(),
01984 const Map& arguments_=Map()
01985 );
01986 void accept(Visitor&);
01987 void accept(ConstVisitor&) const;
01988 template <class S> void serialize(S& s) {
01989 s(exchange)(type)(alternateExchange)(passive)(durable)(autoDelete)(arguments);
01990 }
01991
01992 struct Handler
01993 {
01994 void exchangeDeclare(
01995 const exchange::Name& exchange_,
01996 const Str8& type_,
01997 const exchange::Name& alternateExchange_,
01998 Bit passive_,
01999 Bit durable_,
02000 Bit autoDelete_,
02001 const Map& arguments_
02002 );
02003 };
02004
02005 template <class T> void invoke(T& target)const
02006 {
02007 target.exchangeDeclare(exchange, type, alternateExchange, passive, durable, autoDelete, arguments );
02008 }
02009 };
02010 inline CommandPacker<Declare> serializable(Declare& x) { return CommandPacker<Declare>(x); }
02011 std::ostream& operator << (std::ostream&, const Declare&);
02012 bool operator==(const Declare&, const Declare&);
02013
02014 struct Delete:
02015 public Command
02016 {
02017 Name exchange;
02018 Bit ifUnused;
02019
02020 static const char* NAME;
02021 static const uint8_t CODE=0x2;
02022 static const uint8_t CLASS_CODE=exchange::CODE;
02023 static const char* CLASS_NAME;
02024 explicit Delete(
02025 const exchange::Name& exchange_=exchange::Name(),
02026 Bit ifUnused_=Bit()
02027 );
02028 void accept(Visitor&);
02029 void accept(ConstVisitor&) const;
02030 template <class S> void serialize(S& s) {
02031 s(exchange)(ifUnused);
02032 }
02033
02034 struct Handler
02035 {
02036 void exchangeDelete(
02037 const exchange::Name& exchange_,
02038 Bit ifUnused_
02039 );
02040 };
02041
02042 template <class T> void invoke(T& target)const
02043 {
02044 target.exchangeDelete(exchange, ifUnused );
02045 }
02046 };
02047 inline CommandPacker<Delete> serializable(Delete& x) { return CommandPacker<Delete>(x); }
02048 std::ostream& operator << (std::ostream&, const Delete&);
02049 bool operator==(const Delete&, const Delete&);
02050
02051 struct Query:
02052 public Command
02053 {
02054 Str8 name;
02055
02056 static const char* NAME;
02057 static const uint8_t CODE=0x3;
02058 static const uint8_t CLASS_CODE=exchange::CODE;
02059 static const char* CLASS_NAME;
02060 explicit Query(const Str8& name_=Str8());
02061 void accept(Visitor&);
02062 void accept(ConstVisitor&) const;
02063 template <class S> void serialize(S& s) {
02064 s(name);
02065 }
02066
02067 struct Handler
02068 {
02069 void exchangeQuery(
02070 const Str8& name_
02071 );
02072 };
02073
02074 template <class T> void invoke(T& target)const
02075 {
02076 target.exchangeQuery(name );
02077 }
02078 };
02079 inline CommandPacker<Query> serializable(Query& x) { return CommandPacker<Query>(x); }
02080 std::ostream& operator << (std::ostream&, const Query&);
02081 bool operator==(const Query&, const Query&);
02082
02083 struct Bind:
02084 public Command
02085 {
02086 queue::Name queue;
02087 Name exchange;
02088 Str8 bindingKey;
02089 Map arguments;
02090
02091 static const char* NAME;
02092 static const uint8_t CODE=0x4;
02093 static const uint8_t CLASS_CODE=exchange::CODE;
02094 static const char* CLASS_NAME;
02095 explicit Bind(
02096 const queue::Name& queue_=queue::Name(),
02097 const exchange::Name& exchange_=exchange::Name(),
02098 const Str8& bindingKey_=Str8(),
02099 const Map& arguments_=Map()
02100 );
02101 void accept(Visitor&);
02102 void accept(ConstVisitor&) const;
02103 template <class S> void serialize(S& s) {
02104 s(queue)(exchange)(bindingKey)(arguments);
02105 }
02106
02107 struct Handler
02108 {
02109 void exchangeBind(
02110 const queue::Name& queue_,
02111 const exchange::Name& exchange_,
02112 const Str8& bindingKey_,
02113 const Map& arguments_
02114 );
02115 };
02116
02117 template <class T> void invoke(T& target)const
02118 {
02119 target.exchangeBind(queue, exchange, bindingKey, arguments );
02120 }
02121 };
02122 inline CommandPacker<Bind> serializable(Bind& x) { return CommandPacker<Bind>(x); }
02123 std::ostream& operator << (std::ostream&, const Bind&);
02124 bool operator==(const Bind&, const Bind&);
02125
02126 struct Unbind:
02127 public Command
02128 {
02129 queue::Name queue;
02130 Name exchange;
02131 Str8 bindingKey;
02132
02133 static const char* NAME;
02134 static const uint8_t CODE=0x5;
02135 static const uint8_t CLASS_CODE=exchange::CODE;
02136 static const char* CLASS_NAME;
02137 explicit Unbind(
02138 const queue::Name& queue_=queue::Name(),
02139 const exchange::Name& exchange_=exchange::Name(),
02140 const Str8& bindingKey_=Str8()
02141 );
02142 void accept(Visitor&);
02143 void accept(ConstVisitor&) const;
02144 template <class S> void serialize(S& s) {
02145 s(queue)(exchange)(bindingKey);
02146 }
02147
02148 struct Handler
02149 {
02150 void exchangeUnbind(
02151 const queue::Name& queue_,
02152 const exchange::Name& exchange_,
02153 const Str8& bindingKey_
02154 );
02155 };
02156
02157 template <class T> void invoke(T& target)const
02158 {
02159 target.exchangeUnbind(queue, exchange, bindingKey );
02160 }
02161 };
02162 inline CommandPacker<Unbind> serializable(Unbind& x) { return CommandPacker<Unbind>(x); }
02163 std::ostream& operator << (std::ostream&, const Unbind&);
02164 bool operator==(const Unbind&, const Unbind&);
02165
02166 struct Bound:
02167 public Command
02168 {
02169 Str8 exchange;
02170 Str8 queue;
02171 Str8 bindingKey;
02172 Map arguments;
02173
02174 static const char* NAME;
02175 static const uint8_t CODE=0x6;
02176 static const uint8_t CLASS_CODE=exchange::CODE;
02177 static const char* CLASS_NAME;
02178 explicit Bound(
02179 const Str8& exchange_=Str8(),
02180 const Str8& queue_=Str8(),
02181 const Str8& bindingKey_=Str8(),
02182 const Map& arguments_=Map()
02183 );
02184 void accept(Visitor&);
02185 void accept(ConstVisitor&) const;
02186 template <class S> void serialize(S& s) {
02187 s(exchange)(queue)(bindingKey)(arguments);
02188 }
02189
02190 struct Handler
02191 {
02192 void exchangeBound(
02193 const Str8& exchange_,
02194 const Str8& queue_,
02195 const Str8& bindingKey_,
02196 const Map& arguments_
02197 );
02198 };
02199
02200 template <class T> void invoke(T& target)const
02201 {
02202 target.exchangeBound(exchange, queue, bindingKey, arguments );
02203 }
02204 };
02205 inline CommandPacker<Bound> serializable(Bound& x) { return CommandPacker<Bound>(x); }
02206 std::ostream& operator << (std::ostream&, const Bound&);
02207 bool operator==(const Bound&, const Bound&);
02208
02209 }
02210
02211
02212 namespace queue {
02213
02214
02215 struct Declare:
02216 public Command
02217 {
02218 Name queue;
02219 exchange::Name alternateExchange;
02220 Bit passive;
02221 Bit durable;
02222 Bit exclusive;
02223 Bit autoDelete;
02224 Map arguments;
02225
02226 static const char* NAME;
02227 static const uint8_t CODE=0x1;
02228 static const uint8_t CLASS_CODE=queue::CODE;
02229 static const char* CLASS_NAME;
02230 explicit Declare(
02231 const queue::Name& queue_=queue::Name(),
02232 const exchange::Name& alternateExchange_=exchange::Name(),
02233 Bit passive_=Bit(),
02234 Bit durable_=Bit(),
02235 Bit exclusive_=Bit(),
02236 Bit autoDelete_=Bit(),
02237 const Map& arguments_=Map()
02238 );
02239 void accept(Visitor&);
02240 void accept(ConstVisitor&) const;
02241 template <class S> void serialize(S& s) {
02242 s(queue)(alternateExchange)(passive)(durable)(exclusive)(autoDelete)(arguments);
02243 }
02244
02245 struct Handler
02246 {
02247 void queueDeclare(
02248 const queue::Name& queue_,
02249 const exchange::Name& alternateExchange_,
02250 Bit passive_,
02251 Bit durable_,
02252 Bit exclusive_,
02253 Bit autoDelete_,
02254 const Map& arguments_
02255 );
02256 };
02257
02258 template <class T> void invoke(T& target)const
02259 {
02260 target.queueDeclare(queue, alternateExchange, passive, durable, exclusive, autoDelete, arguments );
02261 }
02262 };
02263 inline CommandPacker<Declare> serializable(Declare& x) { return CommandPacker<Declare>(x); }
02264 std::ostream& operator << (std::ostream&, const Declare&);
02265 bool operator==(const Declare&, const Declare&);
02266
02267 struct Delete:
02268 public Command
02269 {
02270 Name queue;
02271 Bit ifUnused;
02272 Bit ifEmpty;
02273
02274 static const char* NAME;
02275 static const uint8_t CODE=0x2;
02276 static const uint8_t CLASS_CODE=queue::CODE;
02277 static const char* CLASS_NAME;
02278 explicit Delete(
02279 const queue::Name& queue_=queue::Name(),
02280 Bit ifUnused_=Bit(),
02281 Bit ifEmpty_=Bit()
02282 );
02283 void accept(Visitor&);
02284 void accept(ConstVisitor&) const;
02285 template <class S> void serialize(S& s) {
02286 s(queue)(ifUnused)(ifEmpty);
02287 }
02288
02289 struct Handler
02290 {
02291 void queueDelete(
02292 const queue::Name& queue_,
02293 Bit ifUnused_,
02294 Bit ifEmpty_
02295 );
02296 };
02297
02298 template <class T> void invoke(T& target)const
02299 {
02300 target.queueDelete(queue, ifUnused, ifEmpty );
02301 }
02302 };
02303 inline CommandPacker<Delete> serializable(Delete& x) { return CommandPacker<Delete>(x); }
02304 std::ostream& operator << (std::ostream&, const Delete&);
02305 bool operator==(const Delete&, const Delete&);
02306
02307 struct Purge:
02308 public Command
02309 {
02310 Name queue;
02311
02312 static const char* NAME;
02313 static const uint8_t CODE=0x3;
02314 static const uint8_t CLASS_CODE=queue::CODE;
02315 static const char* CLASS_NAME;
02316 explicit Purge(const queue::Name& queue_=queue::Name());
02317 void accept(Visitor&);
02318 void accept(ConstVisitor&) const;
02319 template <class S> void serialize(S& s) {
02320 s(queue);
02321 }
02322
02323 struct Handler
02324 {
02325 void queuePurge(
02326 const queue::Name& queue_
02327 );
02328 };
02329
02330 template <class T> void invoke(T& target)const
02331 {
02332 target.queuePurge(queue );
02333 }
02334 };
02335 inline CommandPacker<Purge> serializable(Purge& x) { return CommandPacker<Purge>(x); }
02336 std::ostream& operator << (std::ostream&, const Purge&);
02337 bool operator==(const Purge&, const Purge&);
02338
02339 struct Query:
02340 public Command
02341 {
02342 Name queue;
02343
02344 static const char* NAME;
02345 static const uint8_t CODE=0x4;
02346 static const uint8_t CLASS_CODE=queue::CODE;
02347 static const char* CLASS_NAME;
02348 explicit Query(const queue::Name& queue_=queue::Name());
02349 void accept(Visitor&);
02350 void accept(ConstVisitor&) const;
02351 template <class S> void serialize(S& s) {
02352 s(queue);
02353 }
02354
02355 struct Handler
02356 {
02357 void queueQuery(
02358 const queue::Name& queue_
02359 );
02360 };
02361
02362 template <class T> void invoke(T& target)const
02363 {
02364 target.queueQuery(queue );
02365 }
02366 };
02367 inline CommandPacker<Query> serializable(Query& x) { return CommandPacker<Query>(x); }
02368 std::ostream& operator << (std::ostream&, const Query&);
02369 bool operator==(const Query&, const Query&);
02370
02371 }
02372
02373
02374 namespace file {
02375
02376
02377 struct Qos:
02378 public Command
02379 {
02380 Uint32 prefetchSize;
02381 Uint16 prefetchCount;
02382 Bit global;
02383
02384 static const char* NAME;
02385 static const uint8_t CODE=0x1;
02386 static const uint8_t CLASS_CODE=file::CODE;
02387 static const char* CLASS_NAME;
02388 explicit Qos(
02389 Uint32 prefetchSize_=Uint32(),
02390 Uint16 prefetchCount_=Uint16(),
02391 Bit global_=Bit()
02392 );
02393 void accept(Visitor&);
02394 void accept(ConstVisitor&) const;
02395 template <class S> void serialize(S& s) {
02396 s(prefetchSize)(prefetchCount)(global);
02397 }
02398
02399 struct Handler
02400 {
02401 void fileQos(
02402 Uint32 prefetchSize_,
02403 Uint16 prefetchCount_,
02404 Bit global_
02405 );
02406 };
02407
02408 template <class T> void invoke(T& target)const
02409 {
02410 target.fileQos(prefetchSize, prefetchCount, global );
02411 }
02412 };
02413 inline CommandPacker<Qos> serializable(Qos& x) { return CommandPacker<Qos>(x); }
02414 std::ostream& operator << (std::ostream&, const Qos&);
02415 bool operator==(const Qos&, const Qos&);
02416
02417 struct QosOk:
02418 public Command
02419 {
02420
02421 static const char* NAME;
02422 static const uint8_t CODE=0x2;
02423 static const uint8_t CLASS_CODE=file::CODE;
02424 static const char* CLASS_NAME;
02425 explicit QosOk();
02426 void accept(Visitor&);
02427 void accept(ConstVisitor&) const;
02428 template <class S> void serialize(S&) {}
02429
02430 struct Handler
02431 {
02432 void fileQosOk(
02433
02434 );
02435 };
02436
02437 template <class T> void invoke(T& target)const
02438 {
02439 target.fileQosOk( );
02440 }
02441 };
02442 inline CommandPacker<QosOk> serializable(QosOk& x) { return CommandPacker<QosOk>(x); }
02443 std::ostream& operator << (std::ostream&, const QosOk&);
02444 bool operator==(const QosOk&, const QosOk&);
02445
02446 struct Consume:
02447 public Command
02448 {
02449 queue::Name queue;
02450 Str8 consumerTag;
02451 Bit noLocal;
02452 Bit noAck;
02453 Bit exclusive;
02454 Bit nowait;
02455 Map arguments;
02456
02457 static const char* NAME;
02458 static const uint8_t CODE=0x3;
02459 static const uint8_t CLASS_CODE=file::CODE;
02460 static const char* CLASS_NAME;
02461 explicit Consume(
02462 const queue::Name& queue_=queue::Name(),
02463 const Str8& consumerTag_=Str8(),
02464 Bit noLocal_=Bit(),
02465 Bit noAck_=Bit(),
02466 Bit exclusive_=Bit(),
02467 Bit nowait_=Bit(),
02468 const Map& arguments_=Map()
02469 );
02470 void accept(Visitor&);
02471 void accept(ConstVisitor&) const;
02472 template <class S> void serialize(S& s) {
02473 s(queue)(consumerTag)(noLocal)(noAck)(exclusive)(nowait)(arguments);
02474 }
02475
02476 struct Handler
02477 {
02478 void fileConsume(
02479 const queue::Name& queue_,
02480 const Str8& consumerTag_,
02481 Bit noLocal_,
02482 Bit noAck_,
02483 Bit exclusive_,
02484 Bit nowait_,
02485 const Map& arguments_
02486 );
02487 };
02488
02489 template <class T> void invoke(T& target)const
02490 {
02491 target.fileConsume(queue, consumerTag, noLocal, noAck, exclusive, nowait, arguments );
02492 }
02493 };
02494 inline CommandPacker<Consume> serializable(Consume& x) { return CommandPacker<Consume>(x); }
02495 std::ostream& operator << (std::ostream&, const Consume&);
02496 bool operator==(const Consume&, const Consume&);
02497
02498 struct ConsumeOk:
02499 public Command
02500 {
02501 Str8 consumerTag;
02502
02503 static const char* NAME;
02504 static const uint8_t CODE=0x4;
02505 static const uint8_t CLASS_CODE=file::CODE;
02506 static const char* CLASS_NAME;
02507 explicit ConsumeOk(const Str8& consumerTag_=Str8());
02508 void accept(Visitor&);
02509 void accept(ConstVisitor&) const;
02510 template <class S> void serialize(S& s) {
02511 s(consumerTag);
02512 }
02513
02514 struct Handler
02515 {
02516 void fileConsumeOk(
02517 const Str8& consumerTag_
02518 );
02519 };
02520
02521 template <class T> void invoke(T& target)const
02522 {
02523 target.fileConsumeOk(consumerTag );
02524 }
02525 };
02526 inline CommandPacker<ConsumeOk> serializable(ConsumeOk& x) { return CommandPacker<ConsumeOk>(x); }
02527 std::ostream& operator << (std::ostream&, const ConsumeOk&);
02528 bool operator==(const ConsumeOk&, const ConsumeOk&);
02529
02530 struct Cancel:
02531 public Command
02532 {
02533 Str8 consumerTag;
02534
02535 static const char* NAME;
02536 static const uint8_t CODE=0x5;
02537 static const uint8_t CLASS_CODE=file::CODE;
02538 static const char* CLASS_NAME;
02539 explicit Cancel(const Str8& consumerTag_=Str8());
02540 void accept(Visitor&);
02541 void accept(ConstVisitor&) const;
02542 template <class S> void serialize(S& s) {
02543 s(consumerTag);
02544 }
02545
02546 struct Handler
02547 {
02548 void fileCancel(
02549 const Str8& consumerTag_
02550 );
02551 };
02552
02553 template <class T> void invoke(T& target)const
02554 {
02555 target.fileCancel(consumerTag );
02556 }
02557 };
02558 inline CommandPacker<Cancel> serializable(Cancel& x) { return CommandPacker<Cancel>(x); }
02559 std::ostream& operator << (std::ostream&, const Cancel&);
02560 bool operator==(const Cancel&, const Cancel&);
02561
02562 struct Open:
02563 public Command
02564 {
02565 Str8 identifier;
02566 Uint64 contentSize;
02567
02568 static const char* NAME;
02569 static const uint8_t CODE=0x6;
02570 static const uint8_t CLASS_CODE=file::CODE;
02571 static const char* CLASS_NAME;
02572 explicit Open(
02573 const Str8& identifier_=Str8(),
02574 Uint64 contentSize_=Uint64()
02575 );
02576 void accept(Visitor&);
02577 void accept(ConstVisitor&) const;
02578 template <class S> void serialize(S& s) {
02579 s(identifier)(contentSize);
02580 }
02581
02582 struct Handler
02583 {
02584 void fileOpen(
02585 const Str8& identifier_,
02586 Uint64 contentSize_
02587 );
02588 };
02589
02590 template <class T> void invoke(T& target)const
02591 {
02592 target.fileOpen(identifier, contentSize );
02593 }
02594 };
02595 inline CommandPacker<Open> serializable(Open& x) { return CommandPacker<Open>(x); }
02596 std::ostream& operator << (std::ostream&, const Open&);
02597 bool operator==(const Open&, const Open&);
02598
02599 struct OpenOk:
02600 public Command
02601 {
02602 Uint64 stagedSize;
02603
02604 static const char* NAME;
02605 static const uint8_t CODE=0x7;
02606 static const uint8_t CLASS_CODE=file::CODE;
02607 static const char* CLASS_NAME;
02608 explicit OpenOk(Uint64 stagedSize_=Uint64());
02609 void accept(Visitor&);
02610 void accept(ConstVisitor&) const;
02611 template <class S> void serialize(S& s) {
02612 s(stagedSize);
02613 }
02614
02615 struct Handler
02616 {
02617 void fileOpenOk(
02618 Uint64 stagedSize_
02619 );
02620 };
02621
02622 template <class T> void invoke(T& target)const
02623 {
02624 target.fileOpenOk(stagedSize );
02625 }
02626 };
02627 inline CommandPacker<OpenOk> serializable(OpenOk& x) { return CommandPacker<OpenOk>(x); }
02628 std::ostream& operator << (std::ostream&, const OpenOk&);
02629 bool operator==(const OpenOk&, const OpenOk&);
02630
02631 struct Stage:
02632 public Command
02633 {
02634
02635 static const char* NAME;
02636 static const uint8_t CODE=0x8;
02637 static const uint8_t CLASS_CODE=file::CODE;
02638 static const char* CLASS_NAME;
02639 explicit Stage();
02640 void accept(Visitor&);
02641 void accept(ConstVisitor&) const;
02642 template <class S> void serialize(S&) {}
02643
02644 struct Handler
02645 {
02646 void fileStage(
02647
02648 );
02649 };
02650
02651 template <class T> void invoke(T& target)const
02652 {
02653 target.fileStage( );
02654 }
02655 };
02656 inline CommandPacker<Stage> serializable(Stage& x) { return CommandPacker<Stage>(x); }
02657 std::ostream& operator << (std::ostream&, const Stage&);
02658 bool operator==(const Stage&, const Stage&);
02659
02660 struct Publish:
02661 public Command
02662 {
02663 exchange::Name exchange;
02664 Str8 routingKey;
02665 Bit mandatory;
02666 Bit immediate;
02667 Str8 identifier;
02668
02669 static const char* NAME;
02670 static const uint8_t CODE=0x9;
02671 static const uint8_t CLASS_CODE=file::CODE;
02672 static const char* CLASS_NAME;
02673 explicit Publish(
02674 const exchange::Name& exchange_=exchange::Name(),
02675 const Str8& routingKey_=Str8(),
02676 Bit mandatory_=Bit(),
02677 Bit immediate_=Bit(),
02678 const Str8& identifier_=Str8()
02679 );
02680 void accept(Visitor&);
02681 void accept(ConstVisitor&) const;
02682 template <class S> void serialize(S& s) {
02683 s(exchange)(routingKey)(mandatory)(immediate)(identifier);
02684 }
02685
02686 struct Handler
02687 {
02688 void filePublish(
02689 const exchange::Name& exchange_,
02690 const Str8& routingKey_,
02691 Bit mandatory_,
02692 Bit immediate_,
02693 const Str8& identifier_
02694 );
02695 };
02696
02697 template <class T> void invoke(T& target)const
02698 {
02699 target.filePublish(exchange, routingKey, mandatory, immediate, identifier );
02700 }
02701 };
02702 inline CommandPacker<Publish> serializable(Publish& x) { return CommandPacker<Publish>(x); }
02703 std::ostream& operator << (std::ostream&, const Publish&);
02704 bool operator==(const Publish&, const Publish&);
02705
02706 struct Return:
02707 public Command
02708 {
02709 ReturnCode replyCode;
02710 Str8 replyText;
02711 exchange::Name exchange;
02712 Str8 routingKey;
02713
02714 static const char* NAME;
02715 static const uint8_t CODE=0xa;
02716 static const uint8_t CLASS_CODE=file::CODE;
02717 static const char* CLASS_NAME;
02718 explicit Return(
02719 const file::ReturnCode& replyCode_=file::ReturnCode(),
02720 const Str8& replyText_=Str8(),
02721 const exchange::Name& exchange_=exchange::Name(),
02722 const Str8& routingKey_=Str8()
02723 );
02724 void accept(Visitor&);
02725 void accept(ConstVisitor&) const;
02726 template <class S> void serialize(S& s) {
02727 s(replyCode)(replyText)(exchange)(routingKey);
02728 }
02729
02730 struct Handler
02731 {
02732 void fileReturn(
02733 const file::ReturnCode& replyCode_,
02734 const Str8& replyText_,
02735 const exchange::Name& exchange_,
02736 const Str8& routingKey_
02737 );
02738 };
02739
02740 template <class T> void invoke(T& target)const
02741 {
02742 target.fileReturn(replyCode, replyText, exchange, routingKey );
02743 }
02744 };
02745 inline CommandPacker<Return> serializable(Return& x) { return CommandPacker<Return>(x); }
02746 std::ostream& operator << (std::ostream&, const Return&);
02747 bool operator==(const Return&, const Return&);
02748
02749 struct Deliver:
02750 public Command
02751 {
02752 Str8 consumerTag;
02753 Uint64 deliveryTag;
02754 Bit redelivered;
02755 exchange::Name exchange;
02756 Str8 routingKey;
02757 Str8 identifier;
02758
02759 static const char* NAME;
02760 static const uint8_t CODE=0xb;
02761 static const uint8_t CLASS_CODE=file::CODE;
02762 static const char* CLASS_NAME;
02763 explicit Deliver(
02764 const Str8& consumerTag_=Str8(),
02765 Uint64 deliveryTag_=Uint64(),
02766 Bit redelivered_=Bit(),
02767 const exchange::Name& exchange_=exchange::Name(),
02768 const Str8& routingKey_=Str8(),
02769 const Str8& identifier_=Str8()
02770 );
02771 void accept(Visitor&);
02772 void accept(ConstVisitor&) const;
02773 template <class S> void serialize(S& s) {
02774 s(consumerTag)(deliveryTag)(redelivered)(exchange)(routingKey)(identifier);
02775 }
02776
02777 struct Handler
02778 {
02779 void fileDeliver(
02780 const Str8& consumerTag_,
02781 Uint64 deliveryTag_,
02782 Bit redelivered_,
02783 const exchange::Name& exchange_,
02784 const Str8& routingKey_,
02785 const Str8& identifier_
02786 );
02787 };
02788
02789 template <class T> void invoke(T& target)const
02790 {
02791 target.fileDeliver(consumerTag, deliveryTag, redelivered, exchange, routingKey, identifier );
02792 }
02793 };
02794 inline CommandPacker<Deliver> serializable(Deliver& x) { return CommandPacker<Deliver>(x); }
02795 std::ostream& operator << (std::ostream&, const Deliver&);
02796 bool operator==(const Deliver&, const Deliver&);
02797
02798 struct Ack:
02799 public Command
02800 {
02801 Uint64 deliveryTag;
02802 Bit multiple;
02803
02804 static const char* NAME;
02805 static const uint8_t CODE=0xc;
02806 static const uint8_t CLASS_CODE=file::CODE;
02807 static const char* CLASS_NAME;
02808 explicit Ack(
02809 Uint64 deliveryTag_=Uint64(),
02810 Bit multiple_=Bit()
02811 );
02812 void accept(Visitor&);
02813 void accept(ConstVisitor&) const;
02814 template <class S> void serialize(S& s) {
02815 s(deliveryTag)(multiple);
02816 }
02817
02818 struct Handler
02819 {
02820 void fileAck(
02821 Uint64 deliveryTag_,
02822 Bit multiple_
02823 );
02824 };
02825
02826 template <class T> void invoke(T& target)const
02827 {
02828 target.fileAck(deliveryTag, multiple );
02829 }
02830 };
02831 inline CommandPacker<Ack> serializable(Ack& x) { return CommandPacker<Ack>(x); }
02832 std::ostream& operator << (std::ostream&, const Ack&);
02833 bool operator==(const Ack&, const Ack&);
02834
02835 struct Reject:
02836 public Command
02837 {
02838 Uint64 deliveryTag;
02839 Bit requeue;
02840
02841 static const char* NAME;
02842 static const uint8_t CODE=0xd;
02843 static const uint8_t CLASS_CODE=file::CODE;
02844 static const char* CLASS_NAME;
02845 explicit Reject(
02846 Uint64 deliveryTag_=Uint64(),
02847 Bit requeue_=Bit()
02848 );
02849 void accept(Visitor&);
02850 void accept(ConstVisitor&) const;
02851 template <class S> void serialize(S& s) {
02852 s(deliveryTag)(requeue);
02853 }
02854
02855 struct Handler
02856 {
02857 void fileReject(
02858 Uint64 deliveryTag_,
02859 Bit requeue_
02860 );
02861 };
02862
02863 template <class T> void invoke(T& target)const
02864 {
02865 target.fileReject(deliveryTag, requeue );
02866 }
02867 };
02868 inline CommandPacker<Reject> serializable(Reject& x) { return CommandPacker<Reject>(x); }
02869 std::ostream& operator << (std::ostream&, const Reject&);
02870 bool operator==(const Reject&, const Reject&);
02871
02872 }
02873
02874
02875 namespace stream {
02876
02877
02878 struct Qos:
02879 public Command
02880 {
02881 Uint32 prefetchSize;
02882 Uint16 prefetchCount;
02883 Uint32 consumeRate;
02884 Bit global;
02885
02886 static const char* NAME;
02887 static const uint8_t CODE=0x1;
02888 static const uint8_t CLASS_CODE=stream::CODE;
02889 static const char* CLASS_NAME;
02890 explicit Qos(
02891 Uint32 prefetchSize_=Uint32(),
02892 Uint16 prefetchCount_=Uint16(),
02893 Uint32 consumeRate_=Uint32(),
02894 Bit global_=Bit()
02895 );
02896 void accept(Visitor&);
02897 void accept(ConstVisitor&) const;
02898 template <class S> void serialize(S& s) {
02899 s(prefetchSize)(prefetchCount)(consumeRate)(global);
02900 }
02901
02902 struct Handler
02903 {
02904 void streamQos(
02905 Uint32 prefetchSize_,
02906 Uint16 prefetchCount_,
02907 Uint32 consumeRate_,
02908 Bit global_
02909 );
02910 };
02911
02912 template <class T> void invoke(T& target)const
02913 {
02914 target.streamQos(prefetchSize, prefetchCount, consumeRate, global );
02915 }
02916 };
02917 inline CommandPacker<Qos> serializable(Qos& x) { return CommandPacker<Qos>(x); }
02918 std::ostream& operator << (std::ostream&, const Qos&);
02919 bool operator==(const Qos&, const Qos&);
02920
02921 struct QosOk:
02922 public Command
02923 {
02924
02925 static const char* NAME;
02926 static const uint8_t CODE=0x2;
02927 static const uint8_t CLASS_CODE=stream::CODE;
02928 static const char* CLASS_NAME;
02929 explicit QosOk();
02930 void accept(Visitor&);
02931 void accept(ConstVisitor&) const;
02932 template <class S> void serialize(S&) {}
02933
02934 struct Handler
02935 {
02936 void streamQosOk(
02937
02938 );
02939 };
02940
02941 template <class T> void invoke(T& target)const
02942 {
02943 target.streamQosOk( );
02944 }
02945 };
02946 inline CommandPacker<QosOk> serializable(QosOk& x) { return CommandPacker<QosOk>(x); }
02947 std::ostream& operator << (std::ostream&, const QosOk&);
02948 bool operator==(const QosOk&, const QosOk&);
02949
02950 struct Consume:
02951 public Command
02952 {
02953 queue::Name queue;
02954 Str8 consumerTag;
02955 Bit noLocal;
02956 Bit exclusive;
02957 Bit nowait;
02958 Map arguments;
02959
02960 static const char* NAME;
02961 static const uint8_t CODE=0x3;
02962 static const uint8_t CLASS_CODE=stream::CODE;
02963 static const char* CLASS_NAME;
02964 explicit Consume(
02965 const queue::Name& queue_=queue::Name(),
02966 const Str8& consumerTag_=Str8(),
02967 Bit noLocal_=Bit(),
02968 Bit exclusive_=Bit(),
02969 Bit nowait_=Bit(),
02970 const Map& arguments_=Map()
02971 );
02972 void accept(Visitor&);
02973 void accept(ConstVisitor&) const;
02974 template <class S> void serialize(S& s) {
02975 s(queue)(consumerTag)(noLocal)(exclusive)(nowait)(arguments);
02976 }
02977
02978 struct Handler
02979 {
02980 void streamConsume(
02981 const queue::Name& queue_,
02982 const Str8& consumerTag_,
02983 Bit noLocal_,
02984 Bit exclusive_,
02985 Bit nowait_,
02986 const Map& arguments_
02987 );
02988 };
02989
02990 template <class T> void invoke(T& target)const
02991 {
02992 target.streamConsume(queue, consumerTag, noLocal, exclusive, nowait, arguments );
02993 }
02994 };
02995 inline CommandPacker<Consume> serializable(Consume& x) { return CommandPacker<Consume>(x); }
02996 std::ostream& operator << (std::ostream&, const Consume&);
02997 bool operator==(const Consume&, const Consume&);
02998
02999 struct ConsumeOk:
03000 public Command
03001 {
03002 Str8 consumerTag;
03003
03004 static const char* NAME;
03005 static const uint8_t CODE=0x4;
03006 static const uint8_t CLASS_CODE=stream::CODE;
03007 static const char* CLASS_NAME;
03008 explicit ConsumeOk(const Str8& consumerTag_=Str8());
03009 void accept(Visitor&);
03010 void accept(ConstVisitor&) const;
03011 template <class S> void serialize(S& s) {
03012 s(consumerTag);
03013 }
03014
03015 struct Handler
03016 {
03017 void streamConsumeOk(
03018 const Str8& consumerTag_
03019 );
03020 };
03021
03022 template <class T> void invoke(T& target)const
03023 {
03024 target.streamConsumeOk(consumerTag );
03025 }
03026 };
03027 inline CommandPacker<ConsumeOk> serializable(ConsumeOk& x) { return CommandPacker<ConsumeOk>(x); }
03028 std::ostream& operator << (std::ostream&, const ConsumeOk&);
03029 bool operator==(const ConsumeOk&, const ConsumeOk&);
03030
03031 struct Cancel:
03032 public Command
03033 {
03034 Str8 consumerTag;
03035
03036 static const char* NAME;
03037 static const uint8_t CODE=0x5;
03038 static const uint8_t CLASS_CODE=stream::CODE;
03039 static const char* CLASS_NAME;
03040 explicit Cancel(const Str8& consumerTag_=Str8());
03041 void accept(Visitor&);
03042 void accept(ConstVisitor&) const;
03043 template <class S> void serialize(S& s) {
03044 s(consumerTag);
03045 }
03046
03047 struct Handler
03048 {
03049 void streamCancel(
03050 const Str8& consumerTag_
03051 );
03052 };
03053
03054 template <class T> void invoke(T& target)const
03055 {
03056 target.streamCancel(consumerTag );
03057 }
03058 };
03059 inline CommandPacker<Cancel> serializable(Cancel& x) { return CommandPacker<Cancel>(x); }
03060 std::ostream& operator << (std::ostream&, const Cancel&);
03061 bool operator==(const Cancel&, const Cancel&);
03062
03063 struct Publish:
03064 public Command
03065 {
03066 exchange::Name exchange;
03067 Str8 routingKey;
03068 Bit mandatory;
03069 Bit immediate;
03070
03071 static const char* NAME;
03072 static const uint8_t CODE=0x6;
03073 static const uint8_t CLASS_CODE=stream::CODE;
03074 static const char* CLASS_NAME;
03075 explicit Publish(
03076 const exchange::Name& exchange_=exchange::Name(),
03077 const Str8& routingKey_=Str8(),
03078 Bit mandatory_=Bit(),
03079 Bit immediate_=Bit()
03080 );
03081 void accept(Visitor&);
03082 void accept(ConstVisitor&) const;
03083 template <class S> void serialize(S& s) {
03084 s(exchange)(routingKey)(mandatory)(immediate);
03085 }
03086
03087 struct Handler
03088 {
03089 void streamPublish(
03090 const exchange::Name& exchange_,
03091 const Str8& routingKey_,
03092 Bit mandatory_,
03093 Bit immediate_
03094 );
03095 };
03096
03097 template <class T> void invoke(T& target)const
03098 {
03099 target.streamPublish(exchange, routingKey, mandatory, immediate );
03100 }
03101 };
03102 inline CommandPacker<Publish> serializable(Publish& x) { return CommandPacker<Publish>(x); }
03103 std::ostream& operator << (std::ostream&, const Publish&);
03104 bool operator==(const Publish&, const Publish&);
03105
03106 struct Return:
03107 public Command
03108 {
03109 ReturnCode replyCode;
03110 Str8 replyText;
03111 exchange::Name exchange;
03112 Str8 routingKey;
03113
03114 static const char* NAME;
03115 static const uint8_t CODE=0x7;
03116 static const uint8_t CLASS_CODE=stream::CODE;
03117 static const char* CLASS_NAME;
03118 explicit Return(
03119 const stream::ReturnCode& replyCode_=stream::ReturnCode(),
03120 const Str8& replyText_=Str8(),
03121 const exchange::Name& exchange_=exchange::Name(),
03122 const Str8& routingKey_=Str8()
03123 );
03124 void accept(Visitor&);
03125 void accept(ConstVisitor&) const;
03126 template <class S> void serialize(S& s) {
03127 s(replyCode)(replyText)(exchange)(routingKey);
03128 }
03129
03130 struct Handler
03131 {
03132 void streamReturn(
03133 const stream::ReturnCode& replyCode_,
03134 const Str8& replyText_,
03135 const exchange::Name& exchange_,
03136 const Str8& routingKey_
03137 );
03138 };
03139
03140 template <class T> void invoke(T& target)const
03141 {
03142 target.streamReturn(replyCode, replyText, exchange, routingKey );
03143 }
03144 };
03145 inline CommandPacker<Return> serializable(Return& x) { return CommandPacker<Return>(x); }
03146 std::ostream& operator << (std::ostream&, const Return&);
03147 bool operator==(const Return&, const Return&);
03148
03149 struct Deliver:
03150 public Command
03151 {
03152 Str8 consumerTag;
03153 Uint64 deliveryTag;
03154 exchange::Name exchange;
03155 queue::Name queue;
03156
03157 static const char* NAME;
03158 static const uint8_t CODE=0x8;
03159 static const uint8_t CLASS_CODE=stream::CODE;
03160 static const char* CLASS_NAME;
03161 explicit Deliver(
03162 const Str8& consumerTag_=Str8(),
03163 Uint64 deliveryTag_=Uint64(),
03164 const exchange::Name& exchange_=exchange::Name(),
03165 const queue::Name& queue_=queue::Name()
03166 );
03167 void accept(Visitor&);
03168 void accept(ConstVisitor&) const;
03169 template <class S> void serialize(S& s) {
03170 s(consumerTag)(deliveryTag)(exchange)(queue);
03171 }
03172
03173 struct Handler
03174 {
03175 void streamDeliver(
03176 const Str8& consumerTag_,
03177 Uint64 deliveryTag_,
03178 const exchange::Name& exchange_,
03179 const queue::Name& queue_
03180 );
03181 };
03182
03183 template <class T> void invoke(T& target)const
03184 {
03185 target.streamDeliver(consumerTag, deliveryTag, exchange, queue );
03186 }
03187 };
03188 inline CommandPacker<Deliver> serializable(Deliver& x) { return CommandPacker<Deliver>(x); }
03189 std::ostream& operator << (std::ostream&, const Deliver&);
03190 bool operator==(const Deliver&, const Deliver&);
03191
03192 }
03193
03194
03195 }}
03196
03197 #endif