Status fromIrisStatus(XMPP::Status status)
	{
		Status newstatus;
		if (status.isAvailable())
			newstatus.setType("Online");
		else if (status.isInvisible())
			newstatus.setType("DoNotDisturb");
		else
			newstatus.setType("Offline");

		if (status.show() == "away")
			newstatus.setType("Away");
		else if (status.show() == "xa")
			newstatus.setType("NotAvailable");
		else if (status.show() == "dnd")
			newstatus.setType("DoNotDisturb");
		else if (status.show() == "chat")
			newstatus.setType("FreeForChat");

		QString description = status.status();
		description.replace("\r\n", "\n");
		description.replace('\r', '\n');
		newstatus.setDescription(description);

		return newstatus;
	}
Exemple #2
0
void KMessageJabber::slotGroupChatPresence(const XMPP::Jid& jid, const XMPP::Status& status)
{
  kDebug() << jid.full() << status.status();
  if (jid.full() == mPeerJid && !status.isAvailable())
  {
    emit connectionBroken();
  }
}