KVIrc  4.9.2
DeveloperAPIs
Public Member Functions | Protected Types | Protected Attributes | Private Slots | List of all members
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. More...
 
void dequeueChannel (KviChannelWindow *pChan)
 Removes the channel from the queue stack. More...
 
void enqueueChannel (KviChannelWindow *pChan)
 Enqueues the channel in the queue stack. More...
 
bool isQueued (KviChannelWindow *pChan)
 Checks if a channel is in the queue stack. More...
 
 KviIrcConnectionRequestQueue ()
 Constructs the request queue objects. More...
 
virtual ~KviIrcConnectionRequestQueue ()
 Destroys the request queue objects. More...
 

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
 
QTimer m_timer
 

Private Slots

void timerSlot ()
 Performs time based requests. More...
 

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

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 ( )

Constructs the request queue objects.

Returns
KviIrcConnectionRequestQueue

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

KviIrcConnectionRequestQueue::~KviIrcConnectionRequestQueue ( )
virtual

Destroys the request queue objects.

References m_timer, and timerSlot().

Member Function Documentation

void KviIrcConnectionRequestQueue::clearAll ( )

Clears the queue stack.

Returns
void

References m_channels, m_curType, m_timer, and Mode.

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

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().

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().

bool KviIrcConnectionRequestQueue::isQueued ( KviChannelWindow pChan)
inline

Checks if a channel is in the queue stack.

Parameters
pChanThe channel to check
Returns
bool
void KviIrcConnectionRequestQueue::timerSlot ( )
privateslot

Member Data Documentation

QQueue<KviChannelWindow *> KviIrcConnectionRequestQueue::m_channels
protected
RequestTypes KviIrcConnectionRequestQueue::m_curType
protected
QTimer KviIrcConnectionRequestQueue::m_timer
protected

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