Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET | Apache Qpid Documentation |
00001 #ifndef QPID_FRAMING_EXCHANGEQUERYRESULT_H 00002 #define QPID_FRAMING_EXCHANGEQUERYRESULT_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 ExchangeQueryResult { 00038 string type; 00039 FieldTable arguments; 00040 uint16_t flags; 00041 public: 00042 static const uint16_t TYPE = 1793; 00043 ExchangeQueryResult( 00044 const string& _type, 00045 bool _durable, 00046 bool _notFound, 00047 const FieldTable& _arguments) : 00048 type(_type), 00049 arguments(_arguments), 00050 flags(0){ 00051 setDurable(_durable); 00052 setNotFound(_notFound); 00053 flags |= (1 << 8); 00054 flags |= (1 << 11); 00055 } 00056 ExchangeQueryResult() : flags(0) {} 00057 00058 void setType(const string& _type); 00059 const string& getType() const; 00060 bool hasType() const; 00061 void clearTypeFlag(); 00062 void setDurable(bool _durable); 00063 bool getDurable() const; 00064 void setNotFound(bool _notFound); 00065 bool getNotFound() const; 00066 void setArguments(const FieldTable& _arguments); 00067 const FieldTable& getArguments() const; 00068 FieldTable& getArguments(); 00069 bool hasArguments() const; 00070 void clearArgumentsFlag(); 00071 friend std::ostream& operator<<(std::ostream&, const ExchangeQueryResult&); 00072 void encode(Buffer&) const; 00073 void decode(Buffer&, uint32_t=0); 00074 void encodeStructBody(Buffer&) const; 00075 void decodeStructBody(Buffer&, uint32_t=0); 00076 uint32_t encodedSize() const; 00077 uint32_t bodySize() const; 00078 void print(std::ostream& out) const; 00079 }; /* class ExchangeQueryResult */ 00080 00081 }} 00082 #endif