client/qos/SubscribeReturnQos.cpp

Go to the documentation of this file.
00001 /*------------------------------------------------------------------------------
00002 Name:      SubscribeReturnQos.cpp
00003 Project:   xmlBlaster.org
00004 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
00005 ------------------------------------------------------------------------------*/
00006 
00026 #include <client/qos/SubscribeReturnQos.h>
00027 #include <util/Global.h>
00028 
00029 using namespace org::xmlBlaster::util;
00030 using namespace org::xmlBlaster::util::qos;
00031 using namespace std;
00032 
00033 namespace org { namespace xmlBlaster { namespace client { namespace qos {
00034 
00035    SubscribeReturnQos::SubscribeReturnQos(Global& global, const StatusQosData& data)
00036       : ME("SubscribeReturnQos"), global_(global), data_(data)
00037    {
00038    }
00039 
00040    SubscribeReturnQos::SubscribeReturnQos(Global& global)
00041       : ME("SubscribeReturnQos"), global_(global), data_(global)
00042    {
00043    }
00044 
00045    SubscribeReturnQos::SubscribeReturnQos(const SubscribeReturnQos& data)
00046      : ME(data.ME), global_(data.global_), data_(data.data_)
00047    {
00048    }
00049 
00050    SubscribeReturnQos SubscribeReturnQos::operator =(const SubscribeReturnQos& other)
00051    {
00052       if (this != &other) data_ = other.data_;
00053       return *this;
00054    }
00055 
00056    string SubscribeReturnQos::getState() const
00057    {
00058       return data_.getState();
00059    }
00060 
00061    string SubscribeReturnQos::getStateInfo() const
00062    {
00063       return data_.getStateInfo();
00064    }
00065 
00066    string SubscribeReturnQos::getSubscriptionId() const
00067    {
00068       return data_.getSubscriptionId();
00069    }
00070 
00071    string SubscribeReturnQos::toXml(const string& extraOffset) const
00072    {
00073       return data_.toXml(extraOffset);
00074    }
00075 
00076    StatusQosData& SubscribeReturnQos::getData()
00077    {
00078       return data_;
00079    }
00080 
00081    bool SubscribeReturnQos::isPersistent() const {
00082       return data_.isPersistent();
00083    }    
00084 
00085    bool SubscribeReturnQos::isFakedReturn() const {
00086       return data_.getStateInfo().find(Constants::INFO_QUEUED) == 0;
00087    }    
00088 }}}} // namespace