void FacebookAccount::setOnlineStatus(const Kopete::OnlineStatus& status, const Kopete::StatusMessage &reason, const OnlineStatusOptions& options) { Q_UNUSED(options); if ( status.status() == Kopete::OnlineStatus::Online && myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline ) slotGoOnline(); else if (status.status() == Kopete::OnlineStatus::Online && myself()->onlineStatus().status() == Kopete::OnlineStatus::Away ) setAway( false, reason.message() ); else if ( status.status() == Kopete::OnlineStatus::Offline ) slotGoOffline(); else if ( status.status() == Kopete::OnlineStatus::Away ) slotGoAway( /* reason */ ); }
void IRCAccount::setOnlineStatus(const Kopete::OnlineStatus& status, const Kopete::StatusMessage &reason, const OnlineStatusOptions& /*options*/) { if ( status.status() == Kopete::OnlineStatus::Online && myself()->onlineStatus().status() == Kopete::OnlineStatus::Offline ) slotGoOnline(); else if (status.status() == Kopete::OnlineStatus::Online && (myself()->onlineStatus().status() == Kopete::OnlineStatus::Away || myself()->onlineStatus().status() == Kopete::OnlineStatus::Busy) ) setAway( false, reason.message() ); else if ( status.status() == Kopete::OnlineStatus::Offline ) slotGoOffline(); else if ( status.status() == Kopete::OnlineStatus::Away ) slotGoAway( /* reason */ ); else if ( status.status() == Kopete::OnlineStatus::Busy ) slotGoBusy( /* reason */ ); }
void MeanwhileSession::setStatus(Kopete::OnlineStatus status, const Kopete::StatusMessage &msg) { HERE; mwDebug() << "setStatus: " << status.description() << '(' << status.internalStatus() << ')' << endl; if (status.internalStatus() == 0) return; struct mwUserStatus stat; mwUserStatus_clone(&stat, mwSession_getUserStatus(session)); free(stat.desc); stat.status = (mwStatusType)status.internalStatus(); if (msg.isEmpty()) stat.desc = ::strdup(status.description().toUtf8().constData()); else stat.desc = ::strdup(msg.message().toUtf8().constData()); mwSession_setUserStatus(session, &stat); /* will free stat.desc */ mwUserStatus_clear(&stat); }