/opt/workspace/qpid/tags/M2/Final/cpp/gen/AMQP_ServerOperations.h

00001 /*
00002  *
00003  * Licensed to the Apache Software Foundation (ASF) under one
00004  * or more contributor license agreements.  See the NOTICE file
00005  * distributed with this work for additional information
00006  * regarding copyright ownership.  The ASF licenses this file
00007  * to you under the Apache License, Version 2.0 (the
00008  * "License"); you may not use this file except in compliance
00009  * with the License.  You may obtain a copy of the License at
00010  * 
00011  *   http://www.apache.org/licenses/LICENSE-2.0
00012  * 
00013  * Unless required by applicable law or agreed to in writing,
00014  * software distributed under the License is distributed on an
00015  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00016  * KIND, either express or implied.  See the License for the
00017  * specific language governing permissions and limitations
00018  * under the License.
00019  *
00020  */
00021 
00022 /*
00023  * This file is auto-generated by Qpid Gentools v.0.1 - do not modify.
00024  * Supported AMQP versions:
00025  *   8-0
00026  */
00027  
00028 #ifndef qpid_framing_AMQP_ServerOperations__
00029 #define qpid_framing_AMQP_ServerOperations__
00030 
00031 #include <sstream>
00032 
00033 #include <FieldTable.h>
00034 #include <ProtocolVersion.h>
00035 #include <ProtocolVersionException.h>
00036 
00037 namespace qpid {
00038 namespace framing {
00039 
00040 class AMQP_ServerProxy;
00041 class AMQP_ClientProxy;
00042 
00043 class AMQP_ServerOperations
00044 {
00045 protected:
00046     ProtocolVersion version;
00047         AMQP_ServerOperations() {}
00048 
00049 public:
00050     AMQP_ServerOperations(u_int8_t major, u_int8_t minor) : version(major, minor) {}
00051     AMQP_ServerOperations(ProtocolVersion& version) : version(version) {}
00052     virtual ~AMQP_ServerOperations() {}
00053 
00054     inline u_int8_t getMajor() const { return version.getMajor(); }
00055     inline u_int8_t getMinor() const { return version.getMinor(); }
00056     inline const ProtocolVersion& getVersion() const { return version; }
00057     inline bool isVersion(u_int8_t _major, u_int8_t _minor) const
00058     {
00059         return version.equals(_major, _minor);
00060     }
00061     inline bool isVersion(ProtocolVersion& _version) const
00062     {
00063         return version.equals(_version);
00064     }
00065     
00066         // Include framing constant declarations
00067         #include <AMQP_Constants.h>
00068 
00069     // Inner classes
00070 
00071     // ==================== class AccessHandler ====================
00072     class AccessHandler
00073     {
00074     private:
00075         AMQP_ServerProxy* parent;
00076 
00077         // Constructors and destructors
00078 
00079     protected:
00080         AccessHandler() {}
00081     public:
00082         AccessHandler(AMQP_ServerProxy* _parent) {parent = _parent;}
00083         virtual ~AccessHandler() {}
00084 
00085         // Protocol methods
00086 
00087         virtual void request( u_int16_t channel,
00088                             const string& realm,
00089                             bool exclusive,
00090                             bool passive,
00091                             bool active,
00092                             bool write,
00093                             bool read ) = 0;
00094     }; // class AccessHandler
00095 
00096     // ==================== class BasicHandler ====================
00097     class BasicHandler
00098     {
00099     private:
00100         AMQP_ServerProxy* parent;
00101 
00102         // Constructors and destructors
00103 
00104     protected:
00105         BasicHandler() {}
00106     public:
00107         BasicHandler(AMQP_ServerProxy* _parent) {parent = _parent;}
00108         virtual ~BasicHandler() {}
00109 
00110         // Protocol methods
00111 
00112         virtual void ack( u_int16_t channel,
00113                             u_int64_t deliveryTag,
00114                             bool multiple ) = 0;
00115 
00116         virtual void cancel( u_int16_t channel,
00117                             const string& consumerTag,
00118                             bool nowait ) = 0;
00119 
00120         virtual void consume( u_int16_t channel,
00121                             u_int16_t ticket,
00122                             const string& queue,
00123                             const string& consumerTag,
00124                             bool noLocal,
00125                             bool noAck,
00126                             bool exclusive,
00127                             bool nowait,
00128                             const FieldTable& arguments ) = 0;
00129 
00130         virtual void get( u_int16_t channel,
00131                             u_int16_t ticket,
00132                             const string& queue,
00133                             bool noAck ) = 0;
00134 
00135         virtual void publish( u_int16_t channel,
00136                             u_int16_t ticket,
00137                             const string& exchange,
00138                             const string& routingKey,
00139                             bool mandatory,
00140                             bool immediate ) = 0;
00141 
00142         virtual void qos( u_int16_t channel,
00143                             u_int32_t prefetchSize,
00144                             u_int16_t prefetchCount,
00145                             bool global ) = 0;
00146 
00147         virtual void recover( u_int16_t channel,
00148                             bool requeue ) = 0;
00149 
00150         virtual void reject( u_int16_t channel,
00151                             u_int64_t deliveryTag,
00152                             bool requeue ) = 0;
00153     }; // class BasicHandler
00154 
00155     // ==================== class ChannelHandler ====================
00156     class ChannelHandler
00157     {
00158     private:
00159         AMQP_ServerProxy* parent;
00160 
00161         // Constructors and destructors
00162 
00163     protected:
00164         ChannelHandler() {}
00165     public:
00166         ChannelHandler(AMQP_ServerProxy* _parent) {parent = _parent;}
00167         virtual ~ChannelHandler() {}
00168 
00169         // Protocol methods
00170 
00171         virtual void close( u_int16_t channel,
00172                             u_int16_t replyCode,
00173                             const string& replyText,
00174                             u_int16_t classId,
00175                             u_int16_t methodId ) = 0;
00176 
00177         virtual void closeOk( u_int16_t channel ) = 0;
00178 
00179         virtual void flow( u_int16_t channel,
00180                             bool active ) = 0;
00181 
00182         virtual void flowOk( u_int16_t channel,
00183                             bool active ) = 0;
00184 
00185         virtual void open( u_int16_t channel,
00186                             const string& outOfBand ) = 0;
00187     }; // class ChannelHandler
00188 
00189     // ==================== class ConnectionHandler ====================
00190     class ConnectionHandler
00191     {
00192     private:
00193         AMQP_ServerProxy* parent;
00194 
00195         // Constructors and destructors
00196 
00197     protected:
00198         ConnectionHandler() {}
00199     public:
00200         ConnectionHandler(AMQP_ServerProxy* _parent) {parent = _parent;}
00201         virtual ~ConnectionHandler() {}
00202 
00203         // Protocol methods
00204 
00205         virtual void close( u_int16_t channel,
00206                             u_int16_t replyCode,
00207                             const string& replyText,
00208                             u_int16_t classId,
00209                             u_int16_t methodId ) = 0;
00210 
00211         virtual void closeOk( u_int16_t channel ) = 0;
00212 
00213         virtual void open( u_int16_t channel,
00214                             const string& virtualHost,
00215                             const string& capabilities,
00216                             bool insist ) = 0;
00217 
00218         virtual void secureOk( u_int16_t channel,
00219                             const string& response ) = 0;
00220 
00221         virtual void startOk( u_int16_t channel,
00222                             const FieldTable& clientProperties,
00223                             const string& mechanism,
00224                             const string& response,
00225                             const string& locale ) = 0;
00226 
00227         virtual void tuneOk( u_int16_t channel,
00228                             u_int16_t channelMax,
00229                             u_int32_t frameMax,
00230                             u_int16_t heartbeat ) = 0;
00231     }; // class ConnectionHandler
00232 
00233     // ==================== class DtxHandler ====================
00234     class DtxHandler
00235     {
00236     private:
00237         AMQP_ServerProxy* parent;
00238 
00239         // Constructors and destructors
00240 
00241     protected:
00242         DtxHandler() {}
00243     public:
00244         DtxHandler(AMQP_ServerProxy* _parent) {parent = _parent;}
00245         virtual ~DtxHandler() {}
00246 
00247         // Protocol methods
00248 
00249         virtual void select( u_int16_t channel ) = 0;
00250 
00251         virtual void start( u_int16_t channel,
00252                             const string& dtxIdentifier ) = 0;
00253     }; // class DtxHandler
00254 
00255     // ==================== class ExchangeHandler ====================
00256     class ExchangeHandler
00257     {
00258     private:
00259         AMQP_ServerProxy* parent;
00260 
00261         // Constructors and destructors
00262 
00263     protected:
00264         ExchangeHandler() {}
00265     public:
00266         ExchangeHandler(AMQP_ServerProxy* _parent) {parent = _parent;}
00267         virtual ~ExchangeHandler() {}
00268 
00269         // Protocol methods
00270 
00271         virtual void declare( u_int16_t channel,
00272                             u_int16_t ticket,
00273                             const string& exchange,
00274                             const string& type,
00275                             bool passive,
00276                             bool durable,
00277                             bool autoDelete,
00278                             bool internal,
00279                             bool nowait,
00280                             const FieldTable& arguments ) = 0;
00281 
00282         virtual void delete_( u_int16_t channel,
00283                             u_int16_t ticket,
00284                             const string& exchange,
00285                             bool ifUnused,
00286                             bool nowait ) = 0;
00287     }; // class ExchangeHandler
00288 
00289     // ==================== class FileHandler ====================
00290     class FileHandler
00291     {
00292     private:
00293         AMQP_ServerProxy* parent;
00294 
00295         // Constructors and destructors
00296 
00297     protected:
00298         FileHandler() {}
00299     public:
00300         FileHandler(AMQP_ServerProxy* _parent) {parent = _parent;}
00301         virtual ~FileHandler() {}
00302 
00303         // Protocol methods
00304 
00305         virtual void ack( u_int16_t channel,
00306                             u_int64_t deliveryTag,
00307                             bool multiple ) = 0;
00308 
00309         virtual void cancel( u_int16_t channel,
00310                             const string& consumerTag,
00311                             bool nowait ) = 0;
00312 
00313         virtual void consume( u_int16_t channel,
00314                             u_int16_t ticket,
00315                             const string& queue,
00316                             const string& consumerTag,
00317                             bool noLocal,
00318                             bool noAck,
00319                             bool exclusive,
00320                             bool nowait ) = 0;
00321 
00322         virtual void open( u_int16_t channel,
00323                             const string& identifier,
00324                             u_int64_t contentSize ) = 0;
00325 
00326         virtual void openOk( u_int16_t channel,
00327                             u_int64_t stagedSize ) = 0;
00328 
00329         virtual void publish( u_int16_t channel,
00330                             u_int16_t ticket,
00331                             const string& exchange,
00332                             const string& routingKey,
00333                             bool mandatory,
00334                             bool immediate,
00335                             const string& identifier ) = 0;
00336 
00337         virtual void qos( u_int16_t channel,
00338                             u_int32_t prefetchSize,
00339                             u_int16_t prefetchCount,
00340                             bool global ) = 0;
00341 
00342         virtual void reject( u_int16_t channel,
00343                             u_int64_t deliveryTag,
00344                             bool requeue ) = 0;
00345 
00346         virtual void stage( u_int16_t channel ) = 0;
00347     }; // class FileHandler
00348 
00349     // ==================== class QueueHandler ====================
00350     class QueueHandler
00351     {
00352     private:
00353         AMQP_ServerProxy* parent;
00354 
00355         // Constructors and destructors
00356 
00357     protected:
00358         QueueHandler() {}
00359     public:
00360         QueueHandler(AMQP_ServerProxy* _parent) {parent = _parent;}
00361         virtual ~QueueHandler() {}
00362 
00363         // Protocol methods
00364 
00365         virtual void bind( u_int16_t channel,
00366                             u_int16_t ticket,
00367                             const string& queue,
00368                             const string& exchange,
00369                             const string& routingKey,
00370                             bool nowait,
00371                             const FieldTable& arguments ) = 0;
00372 
00373         virtual void declare( u_int16_t channel,
00374                             u_int16_t ticket,
00375                             const string& queue,
00376                             bool passive,
00377                             bool durable,
00378                             bool exclusive,
00379                             bool autoDelete,
00380                             bool nowait,
00381                             const FieldTable& arguments ) = 0;
00382 
00383         virtual void delete_( u_int16_t channel,
00384                             u_int16_t ticket,
00385                             const string& queue,
00386                             bool ifUnused,
00387                             bool ifEmpty,
00388                             bool nowait ) = 0;
00389 
00390         virtual void purge( u_int16_t channel,
00391                             u_int16_t ticket,
00392                             const string& queue,
00393                             bool nowait ) = 0;
00394     }; // class QueueHandler
00395 
00396     // ==================== class StreamHandler ====================
00397     class StreamHandler
00398     {
00399     private:
00400         AMQP_ServerProxy* parent;
00401 
00402         // Constructors and destructors
00403 
00404     protected:
00405         StreamHandler() {}
00406     public:
00407         StreamHandler(AMQP_ServerProxy* _parent) {parent = _parent;}
00408         virtual ~StreamHandler() {}
00409 
00410         // Protocol methods
00411 
00412         virtual void cancel( u_int16_t channel,
00413                             const string& consumerTag,
00414                             bool nowait ) = 0;
00415 
00416         virtual void consume( u_int16_t channel,
00417                             u_int16_t ticket,
00418                             const string& queue,
00419                             const string& consumerTag,
00420                             bool noLocal,
00421                             bool exclusive,
00422                             bool nowait ) = 0;
00423 
00424         virtual void publish( u_int16_t channel,
00425                             u_int16_t ticket,
00426                             const string& exchange,
00427                             const string& routingKey,
00428                             bool mandatory,
00429                             bool immediate ) = 0;
00430 
00431         virtual void qos( u_int16_t channel,
00432                             u_int32_t prefetchSize,
00433                             u_int16_t prefetchCount,
00434                             u_int32_t consumeRate,
00435                             bool global ) = 0;
00436     }; // class StreamHandler
00437 
00438     // ==================== class TestHandler ====================
00439     class TestHandler
00440     {
00441     private:
00442         AMQP_ServerProxy* parent;
00443 
00444         // Constructors and destructors
00445 
00446     protected:
00447         TestHandler() {}
00448     public:
00449         TestHandler(AMQP_ServerProxy* _parent) {parent = _parent;}
00450         virtual ~TestHandler() {}
00451 
00452         // Protocol methods
00453 
00454         virtual void content( u_int16_t channel ) = 0;
00455 
00456         virtual void contentOk( u_int16_t channel,
00457                             u_int32_t contentChecksum ) = 0;
00458 
00459         virtual void integer( u_int16_t channel,
00460                             u_int8_t integer1,
00461                             u_int16_t integer2,
00462                             u_int32_t integer3,
00463                             u_int64_t integer4,
00464                             u_int8_t operation ) = 0;
00465 
00466         virtual void integerOk( u_int16_t channel,
00467                             u_int64_t result ) = 0;
00468 
00469         virtual void string_( u_int16_t channel,
00470                             const string& string1,
00471                             const string& string2,
00472                             u_int8_t operation ) = 0;
00473 
00474         virtual void stringOk( u_int16_t channel,
00475                             const string& result ) = 0;
00476 
00477         virtual void table( u_int16_t channel,
00478                             const FieldTable& table,
00479                             u_int8_t integerOp,
00480                             u_int8_t stringOp ) = 0;
00481 
00482         virtual void tableOk( u_int16_t channel,
00483                             u_int64_t integerResult,
00484                             const string& stringResult ) = 0;
00485     }; // class TestHandler
00486 
00487     // ==================== class TunnelHandler ====================
00488     class TunnelHandler
00489     {
00490     private:
00491         AMQP_ServerProxy* parent;
00492 
00493         // Constructors and destructors
00494 
00495     protected:
00496         TunnelHandler() {}
00497     public:
00498         TunnelHandler(AMQP_ServerProxy* _parent) {parent = _parent;}
00499         virtual ~TunnelHandler() {}
00500 
00501         // Protocol methods
00502 
00503         virtual void request( u_int16_t channel,
00504                             const FieldTable& metaData ) = 0;
00505     }; // class TunnelHandler
00506 
00507     // ==================== class TxHandler ====================
00508     class TxHandler
00509     {
00510     private:
00511         AMQP_ServerProxy* parent;
00512 
00513         // Constructors and destructors
00514 
00515     protected:
00516         TxHandler() {}
00517     public:
00518         TxHandler(AMQP_ServerProxy* _parent) {parent = _parent;}
00519         virtual ~TxHandler() {}
00520 
00521         // Protocol methods
00522 
00523         virtual void commit( u_int16_t channel ) = 0;
00524 
00525         virtual void rollback( u_int16_t channel ) = 0;
00526 
00527         virtual void select( u_int16_t channel ) = 0;
00528     }; // class TxHandler
00529 
00530     // Method handler get methods
00531 
00532     virtual AMQP_ServerOperations::AccessHandler* getAccessHandler() = 0;
00533     virtual AMQP_ServerOperations::BasicHandler* getBasicHandler() = 0;
00534     virtual AMQP_ServerOperations::ChannelHandler* getChannelHandler() = 0;
00535     virtual AMQP_ServerOperations::ConnectionHandler* getConnectionHandler() = 0;
00536     virtual AMQP_ServerOperations::DtxHandler* getDtxHandler() = 0;
00537     virtual AMQP_ServerOperations::ExchangeHandler* getExchangeHandler() = 0;
00538     virtual AMQP_ServerOperations::FileHandler* getFileHandler() = 0;
00539     virtual AMQP_ServerOperations::QueueHandler* getQueueHandler() = 0;
00540     virtual AMQP_ServerOperations::StreamHandler* getStreamHandler() = 0;
00541     virtual AMQP_ServerOperations::TestHandler* getTestHandler() = 0;
00542     virtual AMQP_ServerOperations::TunnelHandler* getTunnelHandler() = 0;
00543     virtual AMQP_ServerOperations::TxHandler* getTxHandler() = 0;
00544 
00545 }; /* class AMQP_ServerOperations */
00546 
00547 } /* namespace framing */
00548 } /* namespace qpid */
00549 
00550 #endif

Generated on Mon Nov 26 19:13:17 2007 for Qpid by  doxygen 1.5.1