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; }
117 void setName(
const std::string& name )
127 const std::string&
name()
const {
return m_name; }
134 void setSubscription(
const std::string& subscription,
const std::string& ask )
136 m_sub = subscription;
139 if( subscription ==
"from" && ask.empty() )
141 else if( subscription ==
"from" && !ask.empty() )
143 else if( subscription ==
"to" && ask.empty() )
145 else if( subscription ==
"to" && !ask.empty() )
147 else if( subscription ==
"none" && ask.empty() )
149 else if( subscription ==
"none" && !ask.empty() )
151 else if( subscription ==
"both" )
188 bool remove()
const {
return m_remove; }
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) );
232 #endif // ROSTERITEMBASE_H__