15 #include "rosteritem.h"
21 : m_subscription( S10nNone ), m_name( name ), m_jid( jid.bare() ), m_changed( false )
27 ResourceMap::iterator it = m_resources.begin();
28 for( ; it != m_resources.end(); ++it )
43 if( m_resources.find( resource ) == m_resources.end() )
48 m_resources[
resource]->setStatus( presence );
53 if( m_resources.find( resource ) == m_resources.end() )
58 m_resources[
resource]->setMessage( msg );
63 if( m_resources.find( resource ) == m_resources.end() )
68 m_resources[
resource]->setPriority( priority );
73 if( subscription ==
"from" && !ask )
75 else if( subscription ==
"from" && ask )
77 else if( subscription ==
"to" && !ask )
79 else if( subscription ==
"to" && ask )
81 else if( subscription ==
"none" && !ask )
83 else if( subscription ==
"none" && ask )
85 else if( subscription ==
"both" )
97 ResourceMap::iterator it = m_resources.find( resource );
98 if( it != m_resources.end() )
101 m_resources.erase( it );
107 return !m_resources.empty();
112 ResourceMap::const_iterator it = m_resources.find( res );
113 return it != m_resources.end() ? (*it).second : 0;