QVariantList CoreIrcListHelper::requestChannelList(const NetworkId &netId, const QStringList &channelFilters) { if(_finishedChannelLists.contains(netId)) return _finishedChannelLists.take(netId); if(_channelLists.contains(netId)) { _queuedQuery[netId] = channelFilters.join(","); } else { dispatchQuery(netId, channelFilters.join(",")); } return QVariantList(); }
bool CoreIrcListHelper::endOfChannelList(const NetworkId &netId) { if(_queuedQuery.contains(netId)) { // we're no longer interessted in the current data. drop it and issue a new request. return dispatchQuery(netId, _queuedQuery.take(netId)); } else if(_channelLists.contains(netId)) { QVariantList channelList; foreach(ChannelDescription channel, _channelLists[netId]) { QVariantList channelVariant; channelVariant << channel.channelName << channel.userCount << channel.topic; channelList << qVariantFromValue<QVariant>(channelVariant); }
bool CoreIrcListHelper::endOfChannelList(const NetworkId& netId) { if (_queryTimeoutByNetId.contains(netId)) { // If we recieved an actual RPL_LISTEND, remove the timer int timerId = _queryTimeoutByNetId.take(netId)->timerId(); _queryTimeoutByTimerId.remove(timerId); } if (_queuedQuery.contains(netId)) { // we're no longer interessted in the current data. drop it and issue a new request. return dispatchQuery(netId, _queuedQuery.take(netId)); } else if (_channelLists.contains(netId)) { QVariantList channelList; foreach (ChannelDescription channel, _channelLists[netId]) { QVariantList channelVariant; channelVariant << channel.channelName << channel.userCount << channel.topic; channelList << qVariantFromValue<QVariant>(channelVariant); }