Quassel IRC  Pre-Release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros
ClientBacklogManager Class Reference

#include </tmp/quassel/src/client/clientbacklogmanager.h>

Inheritance diagram for ClientBacklogManager:
Collaboration diagram for ClientBacklogManager:

Public Slots

virtual QVariantList requestBacklog (BufferId bufferId, MsgId first=-1, MsgId last=-1, int limit=-1, int additional=0)
virtual void receiveBacklog (BufferId bufferId, MsgId first, MsgId last, int limit, int additional, QVariantList msgs)
virtual void receiveBacklogAll (MsgId first, MsgId last, int limit, int additional, QVariantList msgs)
void requestInitialBacklog ()
void checkForBacklog (BufferId bufferId)
void checkForBacklog (const BufferIdList &bufferIds)
virtual QVariantList requestBacklogAll (MsgId first=-1, MsgId last=-1, int limit=-1, int additional=0)
virtual void setInitialized ()
void requestUpdate (const QVariantMap &properties)
virtual void update (const QVariantMap &properties)

Signals

void messagesReceived (BufferId bufferId, int count) const
void messagesRequested (const QString &) const
void messagesProcessed (const QString &) const
void updateProgress (int, int)
void backlogRequested (BufferId, MsgId, MsgId, int, int)
void backlogAllRequested (MsgId, MsgId, int, int)
void initDone ()
void updatedRemotely ()
void updated ()

Public Member Functions

 ClientBacklogManager (QObject *parent=0)
void emitMessagesRequested (const QString &msg) const
void reset ()
virtual const QMetaObject * syncMetaObject () const
virtual QVariantMap toVariantMap ()
 Stores the object's state into a QVariantMap.
virtual void fromVariantMap (const QVariantMap &properties)
 Initialize the object's state from a given QVariantMap.
virtual bool isInitialized () const
void setAllowClientUpdates (bool allow)
bool allowClientUpdates () const

Protected Member Functions

void sync_call__ (SignalProxy::ProxyMode modeType, const char *funcname,...) const
void renameObject (const QString &newName)

Private Member Functions

bool isBuffering ()
BufferIdList filterNewBufferIds (const BufferIdList &bufferIds)
void dispatchMessages (const MessageList &messages, bool sort=false)

Private Attributes

BacklogRequester_requester
bool _initBacklogRequested
QSet< BufferId_buffersRequested

Detailed Description

Definition at line 29 of file clientbacklogmanager.h.

Constructor & Destructor Documentation

ClientBacklogManager ( QObject *  parent = 0)

Member Function Documentation

void reset ( )
QVariantList requestBacklog ( BufferId  bufferId,
MsgId  first = -1,
MsgId  last = -1,
int  limit = -1,
int  additional = 0 
)
virtualslot
void receiveBacklogAll ( MsgId  first,
MsgId  last,
int  limit,
int  additional,
QVariantList  msgs 
)
virtualslot
void checkForBacklog ( BufferId  bufferId)
inlineslot
void messagesReceived ( BufferId  bufferId,
int  count 
) const
signal

Referenced by receiveBacklog().

void messagesRequested ( const QString &  ) const
signal

Referenced by emitMessagesRequested().

void messagesProcessed ( const QString &  ) const
signal

Referenced by dispatchMessages().

void updateProgress ( int  ,
int   
)
signal
bool isBuffering ( )
private

Definition at line 159 of file clientbacklogmanager.cpp.

References _requester, and BacklogRequester::isBuffering().

Referenced by receiveBacklog().

BufferIdList filterNewBufferIds ( const BufferIdList bufferIds)
private
void dispatchMessages ( const MessageList messages,
bool  sort = false 
)
private
virtual const QMetaObject* syncMetaObject ( ) const
inlinevirtualinherited

Reimplemented from SyncableObject.

Definition at line 34 of file backlogmanager.h.

QVariantList requestBacklogAll ( MsgId  first = -1,
MsgId  last = -1,
int  limit = -1,
int  additional = 0 
)
virtualslotinherited

Definition at line 31 of file backlogmanager.cpp.

References ARG, and REQUEST.

Referenced by GlobalUnreadBacklogRequester::requestInitialBacklog().

void backlogRequested ( BufferId  ,
MsgId  ,
MsgId  ,
int  ,
int   
)
signalinherited
void backlogAllRequested ( MsgId  ,
MsgId  ,
int  ,
int   
)
signalinherited
QVariantMap toVariantMap ( )
virtualinherited

Stores the object's state into a QVariantMap.

The default implementation takes dynamic properties as well as getters that have names starting with "init" and stores them in a QVariantMap. Override this method in derived classes in order to store the object state in a custom form.

Note
This is used by SignalProxy to transmit the state of the object to clients that request the initial object state. Later updates use a different mechanism and assume that the state is completely covered by properties and init* getters. DO NOT OVERRIDE THIS unless you know exactly what you do!
Returns
The object's state in a QVariantMap

Definition at line 91 of file syncableobject.cpp.

References SignalProxy::ExtendedMetaObject::methodBaseName(), and SignalProxy::ExtendedMetaObject::methodName().

Referenced by BufferViewSettingsPage::cloneConfig(), AliasesModel::commit(), IgnoreListModel::commit(), ClientBufferViewConfig::ensureDecoration(), IrcConnectionWizard::finishClicked(), SignalProxy::initData(), CoreNetworkConfig::save(), BufferViewSettingsPage::save(), and ClientBufferViewManager::setInitialized().

void fromVariantMap ( const QVariantMap &  properties)
virtualinherited

Initialize the object's state from a given QVariantMap.

See Also
toVariantMap() for important information concerning this method.

Definition at line 135 of file syncableobject.cpp.

References SyncableObject::setInitValue().

Referenced by BufferViewConfig::BufferViewConfig(), BufferViewSettingsPage::cloneConfig(), Network::newIrcChannel(), Network::newIrcUser(), SignalProxy::setInitData(), and SyncableObject::update().

void setAllowClientUpdates ( bool  allow)
inlineinherited
bool allowClientUpdates ( ) const
inlineinherited

Definition at line 82 of file syncableobject.h.

References SyncableObject::_allowClientUpdates.

Referenced by SyncableObject::requestUpdate().

void update ( const QVariantMap &  properties)
virtualslotinherited
void sync_call__ ( SignalProxy::ProxyMode  modeType,
const char *  funcname,
  ... 
) const
protectedinherited
void renameObject ( const QString &  newName)
protectedinherited
void initDone ( )
signalinherited
void updatedRemotely ( )
signalinherited
void updated ( )
signalinherited

Member Data Documentation

BacklogRequester* _requester
private
bool _initBacklogRequested
private

Definition at line 66 of file clientbacklogmanager.h.

Referenced by checkForBacklog(), requestInitialBacklog(), and reset().

QSet<BufferId> _buffersRequested
private

Definition at line 67 of file clientbacklogmanager.h.

Referenced by filterNewBufferIds(), requestBacklog(), and reset().


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