/home/aconway/svn/qpid/cpp/src/qpid/client/ClientMessage.h

00001 #ifndef _client_ClientMessage_h
00002 #define _client_ClientMessage_h
00003 
00004 /*
00005  *
00006  * Licensed to the Apache Software Foundation (ASF) under one
00007  * or more contributor license agreements.  See the NOTICE file
00008  * distributed with this work for additional information
00009  * regarding copyright ownership.  The ASF licenses this file
00010  * to you under the Apache License, Version 2.0 (the
00011  * "License"); you may not use this file except in compliance
00012  * with the License.  You may obtain a copy of the License at
00013  * 
00014  *   http://www.apache.org/licenses/LICENSE-2.0
00015  * 
00016  * Unless required by applicable law or agreed to in writing,
00017  * software distributed under the License is distributed on an
00018  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
00019  * KIND, either express or implied.  See the License for the
00020  * specific language governing permissions and limitations
00021  * under the License.
00022  *
00023  */
00024 #include <string>
00025 #include "qpid/framing/BasicHeaderProperties.h"
00026 
00027 namespace qpid {
00028 namespace client {
00029 
00036 // FIXME aconway 2007-04-05: Should be based on MessageTransfer properties not
00037 // basic header properties.
00038 class Message : public framing::BasicHeaderProperties {
00039   public:
00040     Message(const std::string& data_=std::string()) : data(data_) {}
00041 
00042     std::string getData() const { return data; }
00043     void setData(const std::string& _data) { data = _data; }
00044 
00045     std::string getDestination() const { return destination; }
00046     void setDestination(const std::string& dest) { destination = dest; }
00047 
00048     // TODO aconway 2007-03-22: only needed for Basic.deliver support.
00049     uint64_t getDeliveryTag() const { return deliveryTag; }
00050     void setDeliveryTag(uint64_t dt) { deliveryTag = dt; }
00051 
00052     bool isRedelivered() const { return redelivered; }
00053     void setRedelivered(bool _redelivered){  redelivered = _redelivered; }
00054 
00055   private:
00056     std::string data;
00057     std::string destination;
00058     bool redelivered;
00059     uint64_t deliveryTag;
00060 };
00061 
00062 }}
00063 
00064 #endif  

Generated on Tue Apr 17 14:22:03 2007 for Qpid by  doxygen 1.4.7