Logo Search packages:      
Sourcecode: gabber version File versions  Download package

bool PresenceDB::available ( const string &  jid  )  const

Whether the default Presence for user is available.

Definition at line 211 of file jabberoo-presencedb.cc.

References jabberoo::JID::getUserHost(), and jabberoo::Presence::ptAvailable.

     db::const_iterator it = _DB.find(JID::getUserHost(jid));
     // it->second is a list that could be empty so we need to check
     // if there is actually an item in the list before we call getType
     // on the first iitem
     if (it != _DB.end() && it->second.begin() != it->second.end())
        return (it->second.begin()->getType() == Presence::ptAvailable);
        return false;

Generated by  Doxygen 1.6.0   Back to index