14 #ifndef ROSTERITEMBASE_H__
15 #define ROSTERITEMBASE_H__
48 : m_jid( jid ), m_name( name ), m_groups( groups ),
49 m_subscription(
S10nNone ), m_changed( false ), m_remove( false )
57 : m_jid( jid ), m_subscription(
S10nNone ), m_changed( false ),
70 const std::string&
jid()
const {
return m_jid; }
76 void setName(
const std::string& name )
86 const std::string&
name()
const {
return m_name; }
93 void setSubscription(
const std::string& subscription,
const std::string& ask )
98 if( subscription ==
"from" && ask.empty() )
100 else if( subscription ==
"from" && !ask.empty() )
102 else if( subscription ==
"to" && ask.empty() )
104 else if( subscription ==
"to" && !ask.empty() )
106 else if( subscription ==
"none" && ask.empty() )
108 else if( subscription ==
"none" && !ask.empty() )
110 else if( subscription ==
"both" )
147 bool remove()
const {
return m_remove; }
160 Tag* i =
new Tag(
"item" );
167 StringList::const_iterator it = m_groups.begin();
168 for( ; it != m_groups.end(); ++it )
169 new Tag( i,
"group", (*it) );
190 #endif // ROSTERITEMBASE_H__