Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET | Apache Qpid Documentation |
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 #ifndef _TransferContent_ 00022 #define _TransferContent_ 00023 00024 #include "FrameSet.h" 00025 #include "MethodContent.h" 00026 #include "qpid/Exception.h" 00027 #include "qpid/framing/MessageProperties.h" 00028 #include "qpid/framing/DeliveryProperties.h" 00029 #include "qpid/CommonImportExport.h" 00030 00031 namespace qpid { 00032 namespace framing { 00033 00035 class TransferContent : public MethodContent 00036 { 00037 AMQHeaderBody header; 00038 std::string data; 00039 public: 00040 QPID_COMMON_EXTERN TransferContent(const std::string& data = std::string(), const std::string& key=std::string()); 00041 00043 QPID_COMMON_EXTERN AMQHeaderBody getHeader() const; 00044 00045 QPID_COMMON_EXTERN void setData(const std::string&); 00046 QPID_COMMON_EXTERN const std::string& getData() const; 00047 QPID_COMMON_EXTERN std::string& getData(); 00048 00049 QPID_COMMON_EXTERN void appendData(const std::string&); 00050 00051 QPID_COMMON_EXTERN bool hasMessageProperties() const; 00052 QPID_COMMON_EXTERN MessageProperties& getMessageProperties(); 00053 QPID_COMMON_EXTERN const MessageProperties& getMessageProperties() const; 00054 00055 QPID_COMMON_EXTERN bool hasDeliveryProperties() const; 00056 QPID_COMMON_EXTERN DeliveryProperties& getDeliveryProperties(); 00057 QPID_COMMON_EXTERN const DeliveryProperties& getDeliveryProperties() const; 00058 00060 QPID_COMMON_EXTERN void populate(const FrameSet& frameset); 00061 }; 00062 00063 }} 00064 #endif