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

gen/qpid/framing/MessageProperties.h

Go to the documentation of this file.
00001 #ifndef QPID_FRAMING_MESSAGEPROPERTIES_H
00002 #define QPID_FRAMING_MESSAGEPROPERTIES_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 #include "qpid/framing/ReplyTo.h"
00031 
00032 #include <ostream>
00033 #include "qpid/framing/amqp_types_full.h"
00034 
00035 namespace qpid {
00036 namespace framing {
00037 
00038 class MessageProperties  {
00039     uint64_t contentLength;
00040     Uuid messageId;
00041     string correlationId;
00042     ReplyTo replyTo;
00043     string contentType;
00044     string contentEncoding;
00045     string userId;
00046     string appId;
00047     FieldTable applicationHeaders;
00048     uint16_t flags;
00049 public:
00050     static const uint16_t TYPE = 1027;
00051     MessageProperties(
00052         uint64_t _contentLength,
00053         const Uuid& _messageId,
00054         const string& _correlationId,
00055         const ReplyTo& _replyTo,
00056         const string& _contentType,
00057         const string& _contentEncoding,
00058         const string& _userId,
00059         const string& _appId,
00060         const FieldTable& _applicationHeaders) : 
00061         contentLength(_contentLength),
00062         messageId(_messageId),
00063         correlationId(_correlationId),
00064         replyTo(_replyTo),
00065         contentType(_contentType),
00066         contentEncoding(_contentEncoding),
00067         userId(_userId),
00068         appId(_appId),
00069         applicationHeaders(_applicationHeaders),
00070         flags(0){
00071         flags |= (1 << 8);
00072         flags |= (1 << 9);
00073         flags |= (1 << 10);
00074         flags |= (1 << 11);
00075         flags |= (1 << 12);
00076         flags |= (1 << 13);
00077         flags |= (1 << 14);
00078         flags |= (1 << 15);
00079         flags |= (1 << 0);
00080     }
00081     MessageProperties()  : contentLength(0), flags(0) {}
00082     
00083     void setContentLength(uint64_t _contentLength);
00084     uint64_t getContentLength() const;
00085     bool hasContentLength() const;
00086     void clearContentLengthFlag();
00087     void setMessageId(const Uuid& _messageId);
00088     const Uuid& getMessageId() const;
00089     bool hasMessageId() const;
00090     void clearMessageIdFlag();
00091     void setCorrelationId(const string& _correlationId);
00092     const string& getCorrelationId() const;
00093     bool hasCorrelationId() const;
00094     void clearCorrelationIdFlag();
00095     void setReplyTo(const ReplyTo& _replyTo);
00096     const ReplyTo& getReplyTo() const;
00097     bool hasReplyTo() const;
00098     void clearReplyToFlag();
00099     void setContentType(const string& _contentType);
00100     const string& getContentType() const;
00101     bool hasContentType() const;
00102     void clearContentTypeFlag();
00103     void setContentEncoding(const string& _contentEncoding);
00104     const string& getContentEncoding() const;
00105     bool hasContentEncoding() const;
00106     void clearContentEncodingFlag();
00107     void setUserId(const string& _userId);
00108     const string& getUserId() const;
00109     bool hasUserId() const;
00110     void clearUserIdFlag();
00111     void setAppId(const string& _appId);
00112     const string& getAppId() const;
00113     bool hasAppId() const;
00114     void clearAppIdFlag();
00115     void setApplicationHeaders(const FieldTable& _applicationHeaders);
00116     const FieldTable& getApplicationHeaders() const;
00117     FieldTable& getApplicationHeaders();
00118     bool hasApplicationHeaders() const;
00119     void clearApplicationHeadersFlag();
00120     friend std::ostream& operator<<(std::ostream&, const MessageProperties&);
00121     void encode(Buffer&) const;
00122     void decode(Buffer&, uint32_t=0);
00123     void encodeStructBody(Buffer&) const;
00124     void decodeStructBody(Buffer&, uint32_t=0);
00125     uint32_t encodedSize() const;
00126     uint32_t bodySize() const;
00127     void print(std::ostream& out) const;
00128 }; /* class MessageProperties */
00129 
00130 }}
00131 #endif  

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