Apache Qpid C++ API
Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation

gen/qpid/framing/QueueQueryResult.h

Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_QUEUEQUERYRESULT_H
00002 #define QPID_FRAMING_QUEUEQUERYRESULT_H
00003 /*
00004  *
00005  * Licensed to the Apache Software Foundation (ASF) under one
00006  * or more contributor license agreements.  See the NOTICE file
00007  * distributed with this work for additional information
00008  * regarding copyright ownership.  The ASF licenses this file
00009  * to you under the Apache License, Version 2.0 (the
00010  * "License"); you may not use this file except in compliance
00011  * with the License.  You may obtain a copy of the License at
00012  *
00013  *   http://www.apache.org/licenses/LICENSE-2.0
00014  *
00015  * Unless required by applicable law or agreed to in writing,
00016  * software distributed under the License is distributed on an
00017  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00018  * KIND, either express or implied.  See the License for the
00019  * specific language governing permissions and limitations
00020  * under the License.
00021  *
00022  */
00023 
00028 
00029 
00030 
00031 #include <ostream>
00032 #include "qpid/framing/amqp_types_full.h"
00033 
00034 namespace qpid {
00035 namespace framing {
00036 
00037 class QueueQueryResult  {
00038     string queue;
00039     string alternateExchange;
00040     FieldTable arguments;
00041     uint32_t messageCount;
00042     uint32_t subscriberCount;
00043     uint16_t flags;
00044 public:
00045     static const uint16_t TYPE = 2049;
00046     QueueQueryResult(
00047         const string& _queue,
00048         const string& _alternateExchange,
00049         bool _durable,
00050         bool _exclusive,
00051         bool _autoDelete,
00052         const FieldTable& _arguments,
00053         uint32_t _messageCount,
00054         uint32_t _subscriberCount) : 
00055         queue(_queue),
00056         alternateExchange(_alternateExchange),
00057         arguments(_arguments),
00058         messageCount(_messageCount),
00059         subscriberCount(_subscriberCount),
00060         flags(0){
00061         setDurable(_durable);
00062         setExclusive(_exclusive);
00063         setAutoDelete(_autoDelete);
00064         flags |= (1 << 8);
00065         flags |= (1 << 9);
00066         flags |= (1 << 13);
00067         flags |= (1 << 14);
00068         flags |= (1 << 15);
00069     }
00070     QueueQueryResult()  : messageCount(0), subscriberCount(0), flags(0) {}
00071     
00072     void setQueue(const string& _queue);
00073     const string& getQueue() const;
00074     bool hasQueue() const;
00075     void clearQueueFlag();
00076     void setAlternateExchange(const string& _alternateExchange);
00077     const string& getAlternateExchange() const;
00078     bool hasAlternateExchange() const;
00079     void clearAlternateExchangeFlag();
00080     void setDurable(bool _durable);
00081     bool getDurable() const;
00082     void setExclusive(bool _exclusive);
00083     bool getExclusive() const;
00084     void setAutoDelete(bool _autoDelete);
00085     bool getAutoDelete() const;
00086     void setArguments(const FieldTable& _arguments);
00087     const FieldTable& getArguments() const;
00088     FieldTable& getArguments();
00089     bool hasArguments() const;
00090     void clearArgumentsFlag();
00091     void setMessageCount(uint32_t _messageCount);
00092     uint32_t getMessageCount() const;
00093     bool hasMessageCount() const;
00094     void clearMessageCountFlag();
00095     void setSubscriberCount(uint32_t _subscriberCount);
00096     uint32_t getSubscriberCount() const;
00097     bool hasSubscriberCount() const;
00098     void clearSubscriberCountFlag();
00099     friend std::ostream& operator<<(std::ostream&, const QueueQueryResult&);
00100     void encode(Buffer&) const;
00101     void decode(Buffer&, uint32_t=0);
00102     void encodeStructBody(Buffer&) const;
00103     void decodeStructBody(Buffer&, uint32_t=0);
00104     uint32_t encodedSize() const;
00105     uint32_t bodySize() const;
00106     void print(std::ostream& out) const;
00107 }; /* class QueueQueryResult */
00108 
00109 }}
00110 #endif  

Qpid C++ API Reference
Generated on Tue Dec 8 15:39:36 2009 for Qpid C++ Client API by doxygen 1.4.7