14 #ifndef ROSTERITEMBASE_H__
15 #define ROSTERITEMBASE_H__
48 : m_jid( jid.full() ), m_jidJID( jid ), m_name( name ), m_groups( groups ),
49 m_subscription(
S10nNone ), m_changed( false ), m_remove( false )
57 : m_jid( jid.full() ), m_jidJID( jid ), m_subscription(
S10nNone ), m_changed( false ),
66 : m_jid( right.m_jid ), m_jidJID( right.m_jidJID ), m_name( right.m_name ),
67 m_groups( right.m_groups ), m_subscription( right.m_subscription ),
68 m_changed( right.m_changed ), m_remove( right.m_remove )
78 GLOOX_DEPRECATED_CTOR
RosterItemData(
const std::string& jid,
const std::string& name,
80 : m_jid( jid ), m_jidJID( jid), m_name( name ), m_groups( groups ),
81 m_subscription(
S10nNone ), m_changed( false ), m_remove( false )
90 : m_jid( jid ), m_jidJID( jid), m_subscription(
S10nNone ), m_changed( false ),
104 GLOOX_DEPRECATED
const std::string&
jid()
const {
return m_jid; }
127 const std::string&
name()
const {
return m_name; }
136 m_sub = subscription.empty() ?
"none" : subscription;
139 if( m_sub ==
"from" && ask.empty() )
141 else if( m_sub ==
"from" && !ask.empty() )
143 else if( m_sub ==
"to" && ask.empty() )
145 else if( m_sub ==
"to" && !ask.empty() )
147 else if( m_sub ==
"none" && ask.empty() )
149 else if( m_sub ==
"none" && !ask.empty() )
151 else if( m_sub ==
"both" )
201 Tag* i =
new Tag(
"item" );
208 StringList::const_iterator it = m_groups.begin();
209 for( ; it != m_groups.end(); ++it )
210 new Tag( i,
"group", (*it) );
A class holding roster item data.
RosterItemData(const JID &jid)
GLOOX_DEPRECATED std::string m_jid
RosterItemData(const JID &jid, const std::string &name, const StringList &groups)
void setGroups(const StringList &groups)
SubscriptionType subscription() const
RosterItemData(const RosterItemData &right)
void setSubscription(const std::string &subscription, const std::string &ask)
void setName(const std::string &name)
virtual ~RosterItemData()
GLOOX_DEPRECATED const std::string & jid() const
GLOOX_DEPRECATED_CTOR RosterItemData(const std::string &jid, const std::string &name, const StringList &groups)
const std::string & name() const
GLOOX_DEPRECATED_CTOR RosterItemData(const std::string &jid)
const StringList & groups() const
const JID & jidJID() const
This is an abstraction of an XML element.
bool addAttribute(Attribute *attr)
The namespace for the gloox library.
std::list< std::string > StringList