client/qos/SubscribeQos.h

Go to the documentation of this file.
00001 /*------------------------------------------------------------------------------
00002 Name:      SubscribeQos.h
00003 Project:   xmlBlaster.org
00004 Copyright: xmlBlaster.org, see xmlBlaster-LICENSE file
00005 ------------------------------------------------------------------------------*/
00006 
00007 #ifndef _CLIENT_QOS_SUBSCRIBEQOS_H
00008 #define _CLIENT_QOS_SUBSCRIBEQOS_H
00009 
00010 #include <util/xmlBlasterDef.h>
00011 #include <client/qos/GetQos.h>
00012 #include <util/SessionName.h>
00013 #include <client/key/SubscribeKey.h>
00014 
00015 namespace org { namespace xmlBlaster { namespace client { namespace qos {
00016 
00041 class Dll_Export SubscribeQos : public GetQos
00042 {
00043 public:
00044    SubscribeQos(org::xmlBlaster::util::Global& global);
00045 
00046    SubscribeQos(org::xmlBlaster::util::Global& global, const org::xmlBlaster::util::qos::QueryQosData& data);
00047 
00048    SubscribeQos(const SubscribeQos& qos);
00049 
00050    SubscribeQos& operator =(const SubscribeQos& qos);
00051 
00060    void setWantInitialUpdate(bool initialUpdate);
00061 
00069    void setWantUpdateOneway(bool updateOneway);
00070 
00075    void setMultiSubscribe(bool multiSubscribe);
00076    
00077    bool getMultiSubscribe() const;
00078 
00082    void setWantLocal(bool local);
00083 
00088    void setWantNotify(bool notifyOnErase);
00089 
00096    void setSubscriptionId(const std::string& subscriptionId) const;
00097 
00107    std::string generateSubscriptionId(org::xmlBlaster::util::SessionNameRef sessionName, const org::xmlBlaster::client::key::SubscribeKey& subscribeKey);
00108 
00109    bool hasSubscriptionId() const;
00110 
00117    void setPersistent(bool persistent);
00118 
00125    template <typename T_VALUE> void addClientProperty(
00126             const std::string& name,
00127             const T_VALUE& value,
00128             const std::string& type="",
00129             const std::string& encoding="") {
00130       data_.addClientProperty(name, value, type, encoding);
00131    }
00132 
00133 };
00134 
00135 }}}} // namespace
00136 
00137 #endif
00138