diff options
| author | Rajith Muditha Attapattu <rajith@apache.org> | 2011-05-27 15:44:23 +0000 |
|---|---|---|
| committer | Rajith Muditha Attapattu <rajith@apache.org> | 2011-05-27 15:44:23 +0000 |
| commit | 66765100f4257159622cefe57bed50125a5ad017 (patch) | |
| tree | a88ee23bb194eb91f0ebb2d9b23ff423e3ea8e37 /cpp/include/qpid/framing | |
| parent | 1aeaa7b16e5ce54f10c901d75c4d40f9f88b9db6 (diff) | |
| parent | 88b98b2f4152ef59a671fad55a0d08338b6b78ca (diff) | |
| download | qpid-python-rajith_jms_client.tar.gz | |
Creating a branch for experimenting with some ideas for JMS client.rajith_jms_client
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/rajith_jms_client@1128369 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/include/qpid/framing')
| -rw-r--r-- | cpp/include/qpid/framing/Array.h | 97 | ||||
| -rw-r--r-- | cpp/include/qpid/framing/Buffer.h | 136 | ||||
| -rw-r--r-- | cpp/include/qpid/framing/FieldTable.h | 129 | ||||
| -rw-r--r-- | cpp/include/qpid/framing/FieldValue.h | 474 | ||||
| -rw-r--r-- | cpp/include/qpid/framing/List.h | 77 | ||||
| -rw-r--r-- | cpp/include/qpid/framing/ProtocolVersion.h | 58 | ||||
| -rw-r--r-- | cpp/include/qpid/framing/SequenceNumber.h | 79 | ||||
| -rw-r--r-- | cpp/include/qpid/framing/SequenceSet.h | 69 | ||||
| -rw-r--r-- | cpp/include/qpid/framing/StructHelper.h | 57 | ||||
| -rw-r--r-- | cpp/include/qpid/framing/Uuid.h | 91 | ||||
| -rw-r--r-- | cpp/include/qpid/framing/amqp_types.h | 66 | ||||
| -rw-r--r-- | cpp/include/qpid/framing/amqp_types_full.h | 38 |
12 files changed, 0 insertions, 1371 deletions
diff --git a/cpp/include/qpid/framing/Array.h b/cpp/include/qpid/framing/Array.h deleted file mode 100644 index 1e97be3bb4..0000000000 --- a/cpp/include/qpid/framing/Array.h +++ /dev/null @@ -1,97 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#include "qpid/framing/amqp_types.h" -#include "qpid/framing/FieldValue.h" -#include "qpid/framing/TypeCode.h" -#include <boost/shared_ptr.hpp> -#include <iostream> -#include <vector> -#include "qpid/CommonImportExport.h" - -#ifndef _Array_ -#define _Array_ - -namespace qpid { -namespace framing { - -class Buffer; - -class QPID_COMMON_CLASS_EXTERN Array -{ - public: - typedef boost::shared_ptr<FieldValue> ValuePtr; - typedef std::vector<ValuePtr> ValueVector; - typedef ValueVector::const_iterator const_iterator; - typedef ValueVector::iterator iterator; - - QPID_COMMON_EXTERN uint32_t encodedSize() const; - QPID_COMMON_EXTERN void encode(Buffer& buffer) const; - QPID_COMMON_EXTERN void decode(Buffer& buffer); - - QPID_COMMON_EXTERN int count() const; - QPID_COMMON_EXTERN bool operator==(const Array& other) const; - - QPID_COMMON_EXTERN Array(); - QPID_COMMON_EXTERN Array(TypeCode type); - QPID_COMMON_EXTERN Array(uint8_t type); - //creates a longstr array - QPID_COMMON_EXTERN Array(const std::vector<std::string>& in); - - QPID_COMMON_INLINE_EXTERN TypeCode getType() const { return type; } - - // std collection interface. - QPID_COMMON_INLINE_EXTERN const_iterator begin() const { return values.begin(); } - QPID_COMMON_INLINE_EXTERN const_iterator end() const { return values.end(); } - QPID_COMMON_INLINE_EXTERN iterator begin() { return values.begin(); } - QPID_COMMON_INLINE_EXTERN iterator end(){ return values.end(); } - - QPID_COMMON_INLINE_EXTERN ValuePtr front() const { return values.front(); } - QPID_COMMON_INLINE_EXTERN ValuePtr back() const { return values.back(); } - QPID_COMMON_INLINE_EXTERN size_t size() const { return values.size(); } - - QPID_COMMON_EXTERN void insert(iterator i, ValuePtr value); - QPID_COMMON_INLINE_EXTERN void erase(iterator i) { values.erase(i); } - QPID_COMMON_INLINE_EXTERN void push_back(ValuePtr value) { values.insert(end(), value); } - QPID_COMMON_INLINE_EXTERN void pop_back() { values.pop_back(); } - - // Non-std interface - QPID_COMMON_INLINE_EXTERN void add(ValuePtr value) { push_back(value); } - - template <class T> - void collect(std::vector<T>& out) const - { - for (ValueVector::const_iterator i = values.begin(); i != values.end(); ++i) { - out.push_back((*i)->get<T>()); - } - } - - private: - TypeCode type; - ValueVector values; - - friend QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream& out, const Array& body); -}; - -} -} - - -#endif diff --git a/cpp/include/qpid/framing/Buffer.h b/cpp/include/qpid/framing/Buffer.h deleted file mode 100644 index 8b08e60762..0000000000 --- a/cpp/include/qpid/framing/Buffer.h +++ /dev/null @@ -1,136 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#include "qpid/framing/amqp_types.h" -#include "qpid/Exception.h" -#include "qpid/CommonImportExport.h" -#include <boost/iterator/iterator_facade.hpp> - -#ifndef _Buffer_ -#define _Buffer_ - -namespace qpid { -namespace framing { - -struct QPID_COMMON_CLASS_EXTERN OutOfBounds : qpid::Exception { - OutOfBounds() : qpid::Exception(std::string("Out of Bounds")) {} -}; - -class Content; -class FieldTable; - -class QPID_COMMON_CLASS_EXTERN Buffer -{ - uint32_t size; - char* data; - uint32_t position; - uint32_t r_position; - - public: - void checkAvailable(uint32_t count) { if (position + count > size) throw OutOfBounds(); } - - /** Buffer input/output iterator. - * Supports using an amqp_0_10::Codec with a framing::Buffer. - */ - class Iterator : public boost::iterator_facade< - Iterator, char, boost::random_access_traversal_tag> - { - public: - Iterator(Buffer& b) : buffer(&b) {} - - private: - friend class boost::iterator_core_access; - char& dereference() const { return buffer->data[buffer->position]; } - void increment() { ++buffer->position; } - bool equal(const Iterator& x) const { return buffer == x.buffer; } - - Buffer* buffer; - }; - - friend class Iterator; - - QPID_COMMON_EXTERN Buffer(char* data=0, uint32_t size=0); - - QPID_COMMON_EXTERN void record(); - QPID_COMMON_EXTERN void restore(bool reRecord = false); - QPID_COMMON_EXTERN void reset(); - - QPID_COMMON_INLINE_EXTERN uint32_t available() { return size - position; } - QPID_COMMON_INLINE_EXTERN uint32_t getSize() { return size; } - QPID_COMMON_INLINE_EXTERN uint32_t getPosition() { return position; } - QPID_COMMON_INLINE_EXTERN void setPosition(uint32_t p) { position = p; } - QPID_COMMON_INLINE_EXTERN Iterator getIterator() { return Iterator(*this); } - QPID_COMMON_INLINE_EXTERN char* getPointer() { return data; } - - QPID_COMMON_EXTERN void putOctet(uint8_t i); - QPID_COMMON_EXTERN void putShort(uint16_t i); - QPID_COMMON_EXTERN void putLong(uint32_t i); - QPID_COMMON_EXTERN void putLongLong(uint64_t i); - QPID_COMMON_EXTERN void putInt8(int8_t i); - QPID_COMMON_EXTERN void putInt16(int16_t i); - QPID_COMMON_EXTERN void putInt32(int32_t i); - QPID_COMMON_EXTERN void putInt64(int64_t i); - QPID_COMMON_EXTERN void putFloat(float f); - QPID_COMMON_EXTERN void putDouble(double f); - QPID_COMMON_EXTERN void putBin128(const uint8_t* b); - - QPID_COMMON_EXTERN uint8_t getOctet(); - QPID_COMMON_EXTERN uint16_t getShort(); - QPID_COMMON_EXTERN uint32_t getLong(); - QPID_COMMON_EXTERN uint64_t getLongLong(); - QPID_COMMON_EXTERN int8_t getInt8(); - QPID_COMMON_EXTERN int16_t getInt16(); - QPID_COMMON_EXTERN int32_t getInt32(); - QPID_COMMON_EXTERN int64_t getInt64(); - QPID_COMMON_EXTERN float getFloat(); - QPID_COMMON_EXTERN double getDouble(); - - template <int n> - QPID_COMMON_EXTERN uint64_t getUInt(); - - template <int n> - QPID_COMMON_EXTERN void putUInt(uint64_t); - - QPID_COMMON_EXTERN void putShortString(const string& s); - QPID_COMMON_EXTERN void putMediumString(const string& s); - QPID_COMMON_EXTERN void putLongString(const string& s); - QPID_COMMON_EXTERN void getShortString(string& s); - QPID_COMMON_EXTERN void getMediumString(string& s); - QPID_COMMON_EXTERN void getLongString(string& s); - QPID_COMMON_EXTERN void getBin128(uint8_t* b); - - QPID_COMMON_EXTERN void putRawData(const string& s); - QPID_COMMON_EXTERN void getRawData(string& s, uint32_t size); - - QPID_COMMON_EXTERN void putRawData(const uint8_t* data, size_t size); - QPID_COMMON_EXTERN void getRawData(uint8_t* data, size_t size); - - template <class T> void put(const T& data) { data.encode(*this); } - template <class T> void get(T& data) { data.decode(*this); } - - QPID_COMMON_EXTERN void dump(std::ostream&) const; -}; - -std::ostream& operator<<(std::ostream&, const Buffer&); - -}} // namespace qpid::framing - - -#endif diff --git a/cpp/include/qpid/framing/FieldTable.h b/cpp/include/qpid/framing/FieldTable.h deleted file mode 100644 index fed431129a..0000000000 --- a/cpp/include/qpid/framing/FieldTable.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#include <iostream> -#include <vector> -#include <boost/shared_ptr.hpp> -#include <map> -#include "qpid/framing/amqp_types.h" -#include "qpid/CommonImportExport.h" - -#ifndef _FieldTable_ -#define _FieldTable_ - -namespace qpid { - /** - * The framing namespace contains classes that are used to create, - * send and receive the basic packets from which AMQP is built. - */ -namespace framing { - -class Array; -class FieldValue; -class Buffer; - -/** - * A set of name-value pairs. (See the AMQP spec for more details on - * AMQP field tables). - * - * \ingroup clientapi - */ -class FieldTable -{ - public: - typedef boost::shared_ptr<FieldValue> ValuePtr; - typedef std::map<std::string, ValuePtr> ValueMap; - typedef ValueMap::iterator iterator; - typedef ValueMap::const_iterator const_iterator; - typedef ValueMap::const_reference const_reference; - typedef ValueMap::reference reference; - typedef ValueMap::value_type value_type; - - QPID_COMMON_INLINE_EXTERN FieldTable() {}; - QPID_COMMON_EXTERN FieldTable(const FieldTable& ft); - QPID_COMMON_EXTERN ~FieldTable(); - QPID_COMMON_EXTERN FieldTable& operator=(const FieldTable& ft); - QPID_COMMON_EXTERN uint32_t encodedSize() const; - QPID_COMMON_EXTERN void encode(Buffer& buffer) const; - QPID_COMMON_EXTERN void decode(Buffer& buffer); - - QPID_COMMON_EXTERN int count() const; - QPID_COMMON_EXTERN void set(const std::string& name, const ValuePtr& value); - QPID_COMMON_EXTERN ValuePtr get(const std::string& name) const; - QPID_COMMON_INLINE_EXTERN bool isSet(const std::string& name) const { return get(name).get() != 0; } - - QPID_COMMON_EXTERN void setString(const std::string& name, const std::string& value); - QPID_COMMON_EXTERN void setInt(const std::string& name, const int value); - QPID_COMMON_EXTERN void setInt64(const std::string& name, const int64_t value); - QPID_COMMON_EXTERN void setTimestamp(const std::string& name, const uint64_t value); - QPID_COMMON_EXTERN void setUInt64(const std::string& name, const uint64_t value); - QPID_COMMON_EXTERN void setTable(const std::string& name, const FieldTable& value); - QPID_COMMON_EXTERN void setArray(const std::string& name, const Array& value); - QPID_COMMON_EXTERN void setFloat(const std::string& name, const float value); - QPID_COMMON_EXTERN void setDouble(const std::string& name, const double value); - //void setDecimal(string& name, xxx& value); - - QPID_COMMON_EXTERN int getAsInt(const std::string& name) const; - QPID_COMMON_EXTERN uint64_t getAsUInt64(const std::string& name) const; - QPID_COMMON_EXTERN int64_t getAsInt64(const std::string& name) const; - QPID_COMMON_EXTERN std::string getAsString(const std::string& name) const; - - QPID_COMMON_EXTERN bool getTable(const std::string& name, FieldTable& value) const; - QPID_COMMON_EXTERN bool getArray(const std::string& name, Array& value) const; - QPID_COMMON_EXTERN bool getFloat(const std::string& name, float& value) const; - QPID_COMMON_EXTERN bool getDouble(const std::string& name, double& value) const; - //bool getTimestamp(const std::string& name, uint64_t& value) const; - //bool getDecimal(string& name, xxx& value); - QPID_COMMON_EXTERN void erase(const std::string& name); - - - QPID_COMMON_EXTERN bool operator==(const FieldTable& other) const; - - // Map-like interface. - ValueMap::const_iterator begin() const { return values.begin(); } - ValueMap::const_iterator end() const { return values.end(); } - ValueMap::const_iterator find(const std::string& s) const { return values.find(s); } - - ValueMap::iterator begin() { return values.begin(); } - ValueMap::iterator end() { return values.end(); } - ValueMap::iterator find(const std::string& s) { return values.find(s); } - - QPID_COMMON_EXTERN std::pair <ValueMap::iterator, bool> insert(const ValueMap::value_type&); - QPID_COMMON_EXTERN ValueMap::iterator insert(ValueMap::iterator, const ValueMap::value_type&); - void clear() { values.clear(); } - - // ### Hack Alert - - ValueMap::iterator getValues() { return values.begin(); } - - private: - ValueMap values; - - QPID_COMMON_EXTERN friend std::ostream& operator<<(std::ostream& out, const FieldTable& body); -}; - -//class FieldNotFoundException{}; -//class UnknownFieldName : public FieldNotFoundException{}; -//class IncorrectFieldType : public FieldNotFoundException{}; -} -} - - -#endif diff --git a/cpp/include/qpid/framing/FieldValue.h b/cpp/include/qpid/framing/FieldValue.h deleted file mode 100644 index 458de62fdf..0000000000 --- a/cpp/include/qpid/framing/FieldValue.h +++ /dev/null @@ -1,474 +0,0 @@ -#ifndef _framing_FieldValue_h -#define _framing_FieldValue_h -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -#include "qpid/Exception.h" -#include "qpid/framing/amqp_types.h" -#include "qpid/framing/Buffer.h" -#include "qpid/framing/FieldTable.h" -#include "qpid/CommonImportExport.h" - -#include <iostream> -#include <memory> -#include <vector> - -#include <assert.h> - -namespace qpid { -namespace framing { - -/** - * Exception that is the base exception for all field table errors. - * - * \ingroup clientapi - */ -class QPID_COMMON_CLASS_EXTERN FieldValueException : public qpid::Exception {}; - -/** - * Exception thrown when we can't perform requested conversion - * - * \ingroup clientapi - */ -struct QPID_COMMON_CLASS_EXTERN InvalidConversionException : public FieldValueException { - InvalidConversionException() {} -}; - -class List; - -/** - * Value that can appear in an AMQP field table - * - * \ingroup clientapi - */ -class QPID_COMMON_CLASS_EXTERN FieldValue { - public: - /* - * Abstract type for content of different types - */ - class Data { - public: - virtual ~Data() {}; - virtual uint32_t encodedSize() const = 0; - virtual void encode(Buffer& buffer) = 0; - virtual void decode(Buffer& buffer) = 0; - virtual bool operator==(const Data&) const = 0; - - virtual bool convertsToInt() const { return false; } - virtual bool convertsToString() const { return false; } - virtual int64_t getInt() const { throw InvalidConversionException();} - virtual std::string getString() const { throw InvalidConversionException(); } - - virtual void print(std::ostream& out) const = 0; - }; - - FieldValue(): data(0) {}; - // Default assignment operator is fine - void setType(uint8_t type); - QPID_COMMON_EXTERN uint8_t getType() const; - Data& getData() { return *data; } - uint32_t encodedSize() const { return 1 + data->encodedSize(); }; - bool empty() const { return data.get() == 0; } - void encode(Buffer& buffer); - void decode(Buffer& buffer); - QPID_COMMON_EXTERN bool operator==(const FieldValue&) const; - QPID_COMMON_INLINE_EXTERN bool operator!=(const FieldValue& v) const { return !(*this == v); } - - QPID_COMMON_EXTERN void print(std::ostream& out) const; - - template <typename T> bool convertsTo() const { return false; } - template <typename T> T get() const { throw InvalidConversionException(); } - - template <class T, int W> T getIntegerValue() const; - template <class T> T getIntegerValue() const; - template <class T, int W> T getFloatingPointValue() const; - template <int W> void getFixedWidthValue(unsigned char*) const; - template <class T> bool get(T&) const; - - protected: - FieldValue(uint8_t t, Data* d): typeOctet(t), data(d) {} - - QPID_COMMON_EXTERN static uint8_t* convertIfRequired(uint8_t* const octets, int width); - - private: - uint8_t typeOctet; - std::auto_ptr<Data> data; - -}; - -template <> -inline bool FieldValue::convertsTo<int>() const { return data->convertsToInt(); } - -template <> -inline bool FieldValue::convertsTo<int64_t>() const { return data->convertsToInt(); } - -template <> -inline bool FieldValue::convertsTo<std::string>() const { return data->convertsToString(); } - -template <> -inline int FieldValue::get<int>() const { return static_cast<int>(data->getInt()); } - -template <> -inline int64_t FieldValue::get<int64_t>() const { return data->getInt(); } - -template <> -inline std::string FieldValue::get<std::string>() const { return data->getString(); } - -inline std::ostream& operator<<(std::ostream& out, const FieldValue& v) { - v.print(out); - return out; -} - -template <int width> -class FixedWidthValue : public FieldValue::Data { - uint8_t octets[width]; - - public: - FixedWidthValue() {} - FixedWidthValue(const uint8_t (&data)[width]) : octets(data) {} - FixedWidthValue(const uint8_t* const data) - { - for (int i = 0; i < width; i++) octets[i] = data[i]; - } - FixedWidthValue(uint64_t v) - { - for (int i = width; i > 1; --i) { - octets[i-1] = (uint8_t) (0xFF & v); v >>= 8; - } - octets[0] = (uint8_t) (0xFF & v); - } - uint32_t encodedSize() const { return width; } - void encode(Buffer& buffer) { buffer.putRawData(octets, width); } - void decode(Buffer& buffer) { buffer.getRawData(octets, width); } - bool operator==(const Data& d) const { - const FixedWidthValue<width>* rhs = dynamic_cast< const FixedWidthValue<width>* >(&d); - if (rhs == 0) return false; - else return std::equal(&octets[0], &octets[width], &rhs->octets[0]); - } - - bool convertsToInt() const { return true; } - int64_t getInt() const - { - int64_t v = 0; - for (int i = 0; i < width-1; ++i) { - v |= octets[i]; v <<= 8; - } - v |= octets[width-1]; - return v; - } - uint8_t* rawOctets() { return octets; } - uint8_t* rawOctets() const { return octets; } - - void print(std::ostream& o) const { o << "F" << width << ":"; }; -}; - -template <class T, int W> -inline T FieldValue::getIntegerValue() const -{ - FixedWidthValue<W>* const fwv = dynamic_cast< FixedWidthValue<W>* const>(data.get()); - if (fwv) { - uint8_t* octets = fwv->rawOctets(); - T v = 0; - for (int i = 0; i < W-1; ++i) { - v |= octets[i]; v <<= 8; - } - v |= octets[W-1]; - return v; - } else { - throw InvalidConversionException(); - } -} - -template <class T> -inline T FieldValue::getIntegerValue() const -{ - FixedWidthValue<1>* const fwv = dynamic_cast< FixedWidthValue<1>* const>(data.get()); - if (fwv) { - uint8_t* octets = fwv->rawOctets(); - return octets[0]; - } else { - throw InvalidConversionException(); - } -} - -template <class T, int W> -inline T FieldValue::getFloatingPointValue() const { - FixedWidthValue<W>* const fwv = dynamic_cast< FixedWidthValue<W>* const>(data.get()); - if (fwv) { - T value; - uint8_t* const octets = convertIfRequired(fwv->rawOctets(), W); - uint8_t* const target = reinterpret_cast<uint8_t*>(&value); - for (size_t i = 0; i < W; ++i) target[i] = octets[i]; - return value; - } else { - throw InvalidConversionException(); - } -} - -template <int W> void FieldValue::getFixedWidthValue(unsigned char* value) const -{ - FixedWidthValue<W>* const fwv = dynamic_cast< FixedWidthValue<W>* const>(data.get()); - if (fwv) { - for (size_t i = 0; i < W; ++i) value[i] = fwv->rawOctets()[i]; - } else { - throw InvalidConversionException(); - } -} - -template <> -inline float FieldValue::get<float>() const { - return getFloatingPointValue<float, 4>(); -} - -template <> -inline double FieldValue::get<double>() const { - return getFloatingPointValue<double, 8>(); -} - -template <> -class FixedWidthValue<0> : public FieldValue::Data { - public: - // Implicit default constructor is fine - uint32_t encodedSize() const { return 0; } - void encode(Buffer&) {}; - void decode(Buffer&) {}; - bool operator==(const Data& d) const { - const FixedWidthValue<0>* rhs = dynamic_cast< const FixedWidthValue<0>* >(&d); - return rhs != 0; - } - void print(std::ostream& o) const { o << "F0"; }; -}; - -template <int lenwidth> -class VariableWidthValue : public FieldValue::Data { - std::vector<uint8_t> octets; - - public: - VariableWidthValue() {} - VariableWidthValue(const std::vector<uint8_t>& data) : octets(data) {} - VariableWidthValue(const uint8_t* start, const uint8_t* end) : octets(start, end) {} - uint32_t encodedSize() const { return lenwidth + octets.size(); } - void encode(Buffer& buffer) { - buffer.putUInt<lenwidth>(octets.size()); - if (octets.size() > 0) - buffer.putRawData(&octets[0], octets.size()); - }; - void decode(Buffer& buffer) { - uint32_t len = buffer.getUInt<lenwidth>(); - octets.resize(len); - if (len > 0) - buffer.getRawData(&octets[0], len); - } - bool operator==(const Data& d) const { - const VariableWidthValue<lenwidth>* rhs = dynamic_cast< const VariableWidthValue<lenwidth>* >(&d); - if (rhs == 0) return false; - else return octets==rhs->octets; - } - - bool convertsToString() const { return true; } - std::string getString() const { return std::string(octets.begin(), octets.end()); } - - void print(std::ostream& o) const { o << "V" << lenwidth << ":" << octets.size() << ":"; }; -}; - -template <class T> -class EncodedValue : public FieldValue::Data { - T value; - public: - - EncodedValue() {} - EncodedValue(const T& v) : value(v) {} - - T& getValue() { return value; } - const T& getValue() const { return value; } - - uint32_t encodedSize() const { return value.encodedSize(); } - - void encode(Buffer& buffer) { - value.encode(buffer); - }; - void decode(Buffer& buffer) { - value.decode(buffer); - } - bool operator==(const Data& d) const { - const EncodedValue<T>* rhs = dynamic_cast< const EncodedValue<T>* >(&d); - if (rhs == 0) return false; - else return value==rhs->value; - } - - void print(std::ostream& o) const { o << "[" << value << "]"; }; -}; - -/** - * Accessor that can be used to get values of type FieldTable, Array - * and List. - */ -template <class T> -inline bool FieldValue::get(T& t) const -{ - const EncodedValue<T>* v = dynamic_cast< EncodedValue<T>* >(data.get()); - if (v != 0) { - t = v->getValue(); - return true; - } else { - try { - t = get<T>(); - return true; - } catch (const InvalidConversionException&) { - return false; - } - } -} - -class Str8Value : public FieldValue { - public: - QPID_COMMON_EXTERN Str8Value(const std::string& v); -}; - -class Str16Value : public FieldValue { - public: - QPID_COMMON_EXTERN Str16Value(const std::string& v); -}; - -class Var16Value : public FieldValue { - public: - QPID_COMMON_EXTERN Var16Value(const std::string& v, uint8_t code); -}; - -class Var32Value : public FieldValue { - public: - QPID_COMMON_EXTERN Var32Value(const std::string& v, uint8_t code); -}; - -class Struct32Value : public FieldValue { - public: - QPID_COMMON_EXTERN Struct32Value(const std::string& v); -}; - -class FloatValue : public FieldValue -{ - public: - QPID_COMMON_EXTERN FloatValue(float f); -}; -class DoubleValue : public FieldValue -{ - public: - QPID_COMMON_EXTERN DoubleValue(double f); -}; - -/* - * Basic integer value encodes as signed 32 bit - */ -class IntegerValue : public FieldValue { - public: - QPID_COMMON_EXTERN IntegerValue(int v); -}; - -class TimeValue : public FieldValue { - public: - QPID_COMMON_EXTERN TimeValue(uint64_t v); -}; - -class Integer64Value : public FieldValue { - public: - QPID_COMMON_EXTERN Integer64Value(int64_t v); -}; - -class Unsigned64Value : public FieldValue { - public: - QPID_COMMON_EXTERN Unsigned64Value(uint64_t v); -}; - -class FieldTableValue : public FieldValue { - public: - typedef FieldTable ValueType; - QPID_COMMON_EXTERN FieldTableValue(const FieldTable&); -}; - -class ArrayValue : public FieldValue { - public: - QPID_COMMON_EXTERN ArrayValue(const Array&); -}; - -class VoidValue : public FieldValue { - public: - QPID_COMMON_EXTERN VoidValue(); -}; - -class BoolValue : public FieldValue { - public: - QPID_COMMON_EXTERN BoolValue(bool); -}; - -class Unsigned8Value : public FieldValue { - public: - QPID_COMMON_EXTERN Unsigned8Value(uint8_t); -}; - -class Unsigned16Value : public FieldValue { - public: - QPID_COMMON_EXTERN Unsigned16Value(uint16_t); -}; - -class Unsigned32Value : public FieldValue { - public: - QPID_COMMON_EXTERN Unsigned32Value(uint32_t); -}; - -class Integer8Value : public FieldValue { - public: - QPID_COMMON_EXTERN Integer8Value(int8_t); -}; - -class Integer16Value : public FieldValue { - public: - QPID_COMMON_EXTERN Integer16Value(int16_t); -}; - -typedef IntegerValue Integer32Value; - -class ListValue : public FieldValue { - public: - typedef List ValueType; - QPID_COMMON_EXTERN ListValue(const List&); -}; - -class UuidValue : public FieldValue { - public: - QPID_COMMON_EXTERN UuidValue(const unsigned char*); -}; - -template <class T> -bool getEncodedValue(FieldTable::ValuePtr vptr, T& value) -{ - if (vptr) { - const EncodedValue<T>* ev = dynamic_cast< EncodedValue<T>* >(&(vptr->getData())); - if (ev != 0) { - value = ev->getValue(); - return true; - } - } - return false; -} - -}} // qpid::framing - -#endif diff --git a/cpp/include/qpid/framing/List.h b/cpp/include/qpid/framing/List.h deleted file mode 100644 index 417fd4bffb..0000000000 --- a/cpp/include/qpid/framing/List.h +++ /dev/null @@ -1,77 +0,0 @@ -#ifndef QPID_FRAMING_LIST_H -#define QPID_FRAMING_LIST_H - -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#include "qpid/CommonImportExport.h" -#include "qpid/framing/amqp_types.h" -#include <iostream> -#include <list> -#include <boost/shared_ptr.hpp> - -namespace qpid { -namespace framing { - -class Buffer; -class FieldValue; - -/** - * Representation of an AMQP 0-10 list - */ -class QPID_COMMON_CLASS_EXTERN List -{ - public: - typedef boost::shared_ptr<FieldValue> ValuePtr; - typedef std::list<ValuePtr> Values; - typedef Values::const_iterator const_iterator; - typedef Values::iterator iterator; - typedef Values::const_reference const_reference; - typedef Values::reference reference; - - QPID_COMMON_EXTERN uint32_t encodedSize() const; - QPID_COMMON_EXTERN void encode(Buffer& buffer) const; - QPID_COMMON_EXTERN void decode(Buffer& buffer); - - QPID_COMMON_EXTERN bool operator==(const List& other) const; - - // std collection interface. - QPID_COMMON_INLINE_EXTERN const_iterator begin() const { return values.begin(); } - QPID_COMMON_INLINE_EXTERN const_iterator end() const { return values.end(); } - QPID_COMMON_INLINE_EXTERN iterator begin() { return values.begin(); } - QPID_COMMON_INLINE_EXTERN iterator end(){ return values.end(); } - - QPID_COMMON_INLINE_EXTERN ValuePtr front() const { return values.front(); } - QPID_COMMON_INLINE_EXTERN ValuePtr back() const { return values.back(); } - QPID_COMMON_INLINE_EXTERN size_t size() const { return values.size(); } - - QPID_COMMON_INLINE_EXTERN iterator insert(iterator i, ValuePtr value) { return values.insert(i, value); } - QPID_COMMON_INLINE_EXTERN void erase(iterator i) { values.erase(i); } - QPID_COMMON_INLINE_EXTERN void push_back(ValuePtr value) { values.insert(end(), value); } - QPID_COMMON_INLINE_EXTERN void pop_back() { values.pop_back(); } - - private: - Values values; - - friend QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream& out, const List& list); -}; -}} // namespace qpid::framing - -#endif /*!QPID_FRAMING_LIST_H*/ diff --git a/cpp/include/qpid/framing/ProtocolVersion.h b/cpp/include/qpid/framing/ProtocolVersion.h deleted file mode 100644 index 30094c165d..0000000000 --- a/cpp/include/qpid/framing/ProtocolVersion.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#ifndef _ProtocolVersion_ -#define _ProtocolVersion_ - -#include "qpid/framing/amqp_types.h" -#include "qpid/CommonImportExport.h" - -namespace qpid -{ -namespace framing -{ - -class QPID_COMMON_CLASS_EXTERN ProtocolVersion -{ -private: - uint8_t major_; - uint8_t minor_; - -public: - explicit ProtocolVersion(uint8_t _major=0, uint8_t _minor=0) - : major_(_major), minor_(_minor) {} - - QPID_COMMON_INLINE_EXTERN uint8_t getMajor() const { return major_; } - QPID_COMMON_INLINE_EXTERN void setMajor(uint8_t major) { major_ = major; } - QPID_COMMON_INLINE_EXTERN uint8_t getMinor() const { return minor_; } - QPID_COMMON_INLINE_EXTERN void setMinor(uint8_t minor) { minor_ = minor; } - QPID_COMMON_EXTERN const std::string toString() const; - - QPID_COMMON_EXTERN ProtocolVersion& operator=(ProtocolVersion p); - - QPID_COMMON_EXTERN bool operator==(ProtocolVersion p) const; - QPID_COMMON_INLINE_EXTERN bool operator!=(ProtocolVersion p) const { return ! (*this == p); } -}; - -} // namespace framing -} // namespace qpid - - -#endif // ifndef _ProtocolVersion_ diff --git a/cpp/include/qpid/framing/SequenceNumber.h b/cpp/include/qpid/framing/SequenceNumber.h deleted file mode 100644 index eed15a4b75..0000000000 --- a/cpp/include/qpid/framing/SequenceNumber.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#ifndef _framing_SequenceNumber_h -#define _framing_SequenceNumber_h - -#include "qpid/framing/amqp_types.h" -#include <boost/operators.hpp> -#include <iosfwd> -#include "qpid/CommonImportExport.h" - -namespace qpid { -namespace framing { - -class Buffer; - -/** - * 4-byte sequence number that 'wraps around'. - */ -class QPID_COMMON_CLASS_EXTERN SequenceNumber : public -boost::equality_comparable< - SequenceNumber, boost::less_than_comparable< - SequenceNumber, boost::incrementable< - SequenceNumber, boost::decrementable<SequenceNumber> > > > -{ - int32_t value; - - public: - SequenceNumber(uint32_t v=0) : value(v) {} - - SequenceNumber& operator++() { ++value; return *this; } - SequenceNumber& operator--() { --value; return *this; } - bool operator==(const SequenceNumber& other) const { return value == other.value; } - bool operator<(const SequenceNumber& other) const { return (value - other.value) < 0; } - uint32_t getValue() const { return uint32_t(value); } - operator uint32_t() const { return uint32_t(value); } - - void encode(Buffer& buffer) const; - void decode(Buffer& buffer); - uint32_t encodedSize() const; - - template <class S> void serialize(S& s) { s(value); } - - friend inline int32_t operator-(const SequenceNumber& a, const SequenceNumber& b); -}; - -inline int32_t operator-(const SequenceNumber& a, const SequenceNumber& b) { - return int32_t(a.value - b.value); -} - -struct Window -{ - SequenceNumber hwm; - SequenceNumber lwm; -}; - -QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream& o, const SequenceNumber& n); - -}} // namespace qpid::framing - - -#endif diff --git a/cpp/include/qpid/framing/SequenceSet.h b/cpp/include/qpid/framing/SequenceSet.h deleted file mode 100644 index 0a78e418ba..0000000000 --- a/cpp/include/qpid/framing/SequenceSet.h +++ /dev/null @@ -1,69 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#ifndef _framing_SequenceSet_h -#define _framing_SequenceSet_h - -#include "qpid/framing/SequenceNumber.h" -#include "qpid/RangeSet.h" -#include "qpid/CommonImportExport.h" - -namespace qpid { -namespace framing { -class Buffer; - -class QPID_COMMON_CLASS_EXTERN SequenceSet : public RangeSet<SequenceNumber> { - public: - SequenceSet() {} - SequenceSet(const RangeSet<SequenceNumber>& r) - : RangeSet<SequenceNumber>(r) {} - SequenceSet(const SequenceNumber& s) { add(s); } - SequenceSet(const SequenceNumber& start, const SequenceNumber finish) { add(start,finish); } - - - void encode(Buffer& buffer) const; - void decode(Buffer& buffer); - uint32_t encodedSize() const; - - QPID_COMMON_EXTERN bool contains(const SequenceNumber& s) const; - QPID_COMMON_EXTERN void add(const SequenceNumber& s); - QPID_COMMON_EXTERN void add(const SequenceNumber& start, const SequenceNumber& finish); // Closed range - QPID_COMMON_EXTERN void add(const SequenceSet& set); - QPID_COMMON_EXTERN void remove(const SequenceNumber& s); - QPID_COMMON_EXTERN void remove(const SequenceNumber& start, const SequenceNumber& finish); // Closed range - QPID_COMMON_EXTERN void remove(const SequenceSet& set); - - template <class T> void for_each(T& t) const { - for (RangeIterator i = rangesBegin(); i != rangesEnd(); i++) - t(i->first(), i->last()); - } - - template <class T> void for_each(const T& t) const { - for (RangeIterator i = rangesBegin(); i != rangesEnd(); i++) - t(i->first(), i->last()); - } - - friend QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream&, const SequenceSet&); -}; - -}} // namespace qpid::framing - - -#endif diff --git a/cpp/include/qpid/framing/StructHelper.h b/cpp/include/qpid/framing/StructHelper.h deleted file mode 100644 index 21f9b91fa9..0000000000 --- a/cpp/include/qpid/framing/StructHelper.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ -#ifndef _StructHelper_ -#define _StructHelper_ - -#include "qpid/Exception.h" -#include "qpid/CommonImportExport.h" -#include "qpid/framing/Buffer.h" - -#include <stdlib.h> // For alloca - -namespace qpid { -namespace framing { - -class QPID_COMMON_CLASS_EXTERN StructHelper -{ -public: - - template <class T> void encode(const T t, std::string& data) { - uint32_t size = t.bodySize() + 2/*type*/; - data.resize(size); - Buffer wbuffer(const_cast<char*>(data.data()), size); - wbuffer.putShort(T::TYPE); - t.encodeStructBody(wbuffer); - } - - template <class T> void decode(T& t, const std::string& data) { - Buffer rbuffer(const_cast<char*>(data.data()), data.length()); - uint16_t type = rbuffer.getShort(); - if (type == T::TYPE) { - t.decodeStructBody(rbuffer); - } else { - throw Exception("Type code does not match"); - } - } -}; - -}} -#endif diff --git a/cpp/include/qpid/framing/Uuid.h b/cpp/include/qpid/framing/Uuid.h deleted file mode 100644 index ccfd7e9534..0000000000 --- a/cpp/include/qpid/framing/Uuid.h +++ /dev/null @@ -1,91 +0,0 @@ -#ifndef QPID_FRAMING_UUID_H -#define QPID_FRAMING_UUID_H - -/* - * - * Copyright (c) 2006 The Apache Software Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -#include "qpid/CommonImportExport.h" -#include "qpid/sys/IntegerTypes.h" - -#include <boost/array.hpp> - -#include <ostream> -#include <istream> - -namespace qpid { -namespace framing { - -class Buffer; - -/** - * A UUID is represented as a boost::array of 16 bytes. - * - * Full value semantics, operators ==, < etc. are provided by - * boost::array so Uuid can be the key type in a map etc. - * - * TODO: change this implementation as it leaks boost into the - * client API - */ -struct Uuid : public boost::array<uint8_t, 16> { - /** If unique is true, generate a unique ID else a null ID. */ - QPID_COMMON_EXTERN Uuid(bool unique=false); - - /** Copy from 16 bytes of data. */ - QPID_COMMON_EXTERN Uuid(const uint8_t* data); - - // Default op= and copy ctor are fine. - // boost::array gives us ==, < etc. - - /** Copy from 16 bytes of data. */ - QPID_COMMON_EXTERN void assign(const uint8_t* data); - - /** Set to a new unique identifier. */ - QPID_COMMON_EXTERN void generate(); - - /** Set to all zeros. */ - QPID_COMMON_EXTERN void clear(); - - /** Test for null (all zeros). */ - QPID_COMMON_EXTERN bool isNull() const; - QPID_COMMON_INLINE_EXTERN operator bool() const { return !isNull(); } - QPID_COMMON_INLINE_EXTERN bool operator!() const { return isNull(); } - - QPID_COMMON_EXTERN void encode(framing::Buffer& buf) const; - QPID_COMMON_EXTERN void decode(framing::Buffer& buf); - QPID_COMMON_INLINE_EXTERN uint32_t encodedSize() const - { return static_cast<uint32_t>(size()); } - - /** String value in format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb. */ - QPID_COMMON_EXTERN std::string str() const; - - template <class S> void serialize(S& s) { - s.raw(begin(), size()); - } -}; - -/** Print in format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb. */ -QPID_COMMON_EXTERN std::ostream& operator<<(std::ostream&, Uuid); - -/** Read from format 1b4e28ba-2fa1-11d2-883f-b9a761bde3fb. */ -QPID_COMMON_EXTERN std::istream& operator>>(std::istream&, Uuid&); - -}} // namespace qpid::framing - - - -#endif /*!QPID_FRAMING_UUID_H*/ diff --git a/cpp/include/qpid/framing/amqp_types.h b/cpp/include/qpid/framing/amqp_types.h deleted file mode 100644 index d9088b7a12..0000000000 --- a/cpp/include/qpid/framing/amqp_types.h +++ /dev/null @@ -1,66 +0,0 @@ -#ifndef AMQP_TYPES_H -#define AMQP_TYPES_H -/* - * - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - * - */ - -/** \file - * Definitions and forward declarations of all types used - * in AMQP messages. - */ - -#include "qpid/sys/IntegerTypes.h" -#include <string> - -namespace qpid { -namespace framing { - -using std::string; -typedef uint8_t FrameType; -typedef uint16_t ChannelId; -typedef uint32_t BatchOffset; -typedef uint8_t ClassId; -typedef uint8_t MethodId; -typedef uint16_t ReplyCode; - -// Types represented by classes. -class Content; -class FieldTable; -class SequenceNumberSet; -struct Uuid; - -// Useful constants - -/** Maximum channel ID used by broker. Reserve high bit for internal use.*/ -const ChannelId CHANNEL_MAX=(ChannelId(~1))>>1; -const ChannelId CHANNEL_HIGH_BIT= ChannelId(~CHANNEL_MAX); - -// Forward declare class types -class FramingContent; -class FieldTable; -class SequenceNumberSet; -class SequenceSet; -struct Uuid; - -// Enum types -enum DeliveryMode { TRANSIENT = 1, PERSISTENT = 2}; - -}} // namespace qpid::framing -#endif diff --git a/cpp/include/qpid/framing/amqp_types_full.h b/cpp/include/qpid/framing/amqp_types_full.h deleted file mode 100644 index c5d84dedea..0000000000 --- a/cpp/include/qpid/framing/amqp_types_full.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef _framing_amqp_types_decl_h -#define _framing_amqp_types_decl_h - -/* - * - * Copyright (c) 2006 The Apache Software Foundation - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -/** \file - * Definitions and full declarations of all types used - * in AMQP messages. - * - * It's better to include amqp_types.h in another header instead of this file - * unless the header actually needs the full declarations. Including - * full declarations when forward declarations would increase compile - * times. - */ - -#include "qpid/framing/amqp_types.h" -#include "qpid/framing/Array.h" -#include "qpid/framing/FieldTable.h" -#include "qpid/framing/SequenceSet.h" -#include "qpid/framing/Uuid.h" - -#endif /*!_framing_amqp_types_decl_h*/ |
