KVIrc 5.2.6
Developer APIs
KviIrcConnectionRequestQueue Class Reference

Class to enqueue commands to IRC server. More...

#include <KviIrcConnectionRequestQueue.h>

+ Inheritance diagram for KviIrcConnectionRequestQueue:

Public Member Functions

void clearAll ()
 Clears the queue stack.
 
void dequeueChannel (KviChannelWindow *pChan)
 Removes the channel from the queue stack.
 
void enqueueChannel (KviChannelWindow *pChan)
 Enqueues the channel in the queue stack.
 
bool isQueued (KviChannelWindow *pChan) const
 Checks if a channel is in the queue stack.
 
 KviIrcConnectionRequestQueue ()
 Constructs the request queue objects.
 
 ~KviIrcConnectionRequestQueue ()
 Destroys the request queue objects.
 

Protected Types

enum  RequestTypes {
  Mode = 0 , BanException = 1 , Invite = 2 , Who = 3 ,
  QuietBan = 4 , Ban = 5
}
 

Protected Attributes

QQueue< KviChannelWindow * > m_channels
 
RequestTypes m_curType = Mode
 
QTimer m_timer
 

Private Slots

void timerSlot ()
 Performs time based requests.
 

Detailed Description

Class to enqueue commands to IRC server.

This class is designed to delay channel requests like MODE and WHO to avoid excess floods on some servers

Member Enumeration Documentation

◆ RequestTypes

Warning
MODE s b MUST BE THE LAST AUTOMATIC CHANNEL QUERY so we get RPL_ENDOFBANLIST as the last reply and we know that the channel is in sync
Enumerator
Mode 

Channel modes request

BanException 

Ban exceptions request

Invite 

Invites request

Who 

Who request

QuietBan 

Quiet ban request

Ban 

Ban request

Constructor & Destructor Documentation

◆ KviIrcConnectionRequestQueue()

KviIrcConnectionRequestQueue::KviIrcConnectionRequestQueue ( )

Constructs the request queue objects.

Returns
KviIrcConnectionRequestQueue

References connect(), m_timer, and timerSlot().

◆ ~KviIrcConnectionRequestQueue()

KviIrcConnectionRequestQueue::~KviIrcConnectionRequestQueue ( )

Destroys the request queue objects.

References m_timer, and timerSlot().

Member Function Documentation

◆ clearAll()

void KviIrcConnectionRequestQueue::clearAll ( )

Clears the queue stack.

Returns
void

References m_channels, m_curType, m_timer, and Mode.

Referenced by KviIrcContext::connectionTerminated(), and timerSlot().

◆ dequeueChannel()

void KviIrcConnectionRequestQueue::dequeueChannel ( KviChannelWindow * pChan)

Removes the channel from the queue stack.

Parameters
pChanThe channel to dequeue
Returns
void

References m_channels, and m_timer.

Referenced by KviIrcConnection::unregisterChannel().

◆ enqueueChannel()

void KviIrcConnectionRequestQueue::enqueueChannel ( KviChannelWindow * pChan)

Enqueues the channel in the queue stack.

Parameters
pChanThe channel to enqueue
Returns
void

References KVI_OPTION_UINT, KviOption_uintOnJoinRequestsDelay, m_channels, and m_timer.

Referenced by KviIrcServerParser::parseLiteralJoin().

◆ isQueued()

bool KviIrcConnectionRequestQueue::isQueued ( KviChannelWindow * pChan) const
inline

Checks if a channel is in the queue stack.

Parameters
pChanThe channel to check
Returns
bool

◆ timerSlot

Member Data Documentation

◆ m_channels

QQueue<KviChannelWindow *> KviIrcConnectionRequestQueue::m_channels
protected

◆ m_curType

RequestTypes KviIrcConnectionRequestQueue::m_curType = Mode
protected

Referenced by clearAll(), and timerSlot().

◆ m_timer

QTimer KviIrcConnectionRequestQueue::m_timer
protected

The documentation for this class was generated from the following files: