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

#include </tmp/quassel/src/core/coresession.h>

Collaboration diagram for CoreSession:

Public Slots

void addClient (RemotePeer *peer)
void addClient (InternalPeer *peer)
void msgFromClient (BufferInfo, QString message)
void createIdentity (const Identity &identity, const QVariantMap &additional)
 Create an identity and propagate the changes to the clients.
void createIdentity (const CoreIdentity &identity)
void removeIdentity (IdentityId identity)
 Remove identity and propagate that fact to the clients.
void createNetwork (const NetworkInfo &info, const QStringList &persistentChannels=QStringList())
 Create a network and propagate the changes to the clients.
void removeNetwork (NetworkId network)
 Remove network and propagate that fact to the clients.
void renameBuffer (const NetworkId &networkId, const QString &newName, const QString &oldName)
 Rename a Buffer for a given network.
void changePassword (PeerPtr peer, const QString &userName, const QString &oldPassword, const QString &newPassword)
QHash< QString, QString > persistentChannels (NetworkId) const
void globalAway (const QString &msg=QString())
 Marks us away (or unaway) on all networks.

Signals

void initialized ()
void sessionState (const Protocol::SessionState &sessionState)
void displayMsg (Message message)
void displayStatusMsg (QString, QString)
void scriptResult (QString result)
void identityCreated (const Identity &identity)
 Identity has been created.
void identityRemoved (IdentityId identity)
 Identity has been removed.
void networkCreated (NetworkId)
void networkRemoved (NetworkId)
void networkDisconnected (NetworkId)
void passwordChanged (PeerPtr peer, bool success)

Public Member Functions

 CoreSession (UserId, bool restoreState, QObject *parent=0)
 ~CoreSession ()
QList< BufferInfobuffers () const
UserId user () const
CoreNetworknetwork (NetworkId) const
CoreIdentityidentity (IdentityId) const
CoreNetworkConfignetworkConfig () const
NetworkConnection * networkConnection (NetworkId) const
Protocol::SessionState sessionState () const
SignalProxysignalProxy () const
const AliasManageraliasManager () const
AliasManageraliasManager ()
EventManagereventManager () const
EventStringifiereventStringifier () const
CoreSessionEventProcessorsessionEventProcessor () const
CtcpParserctcpParser () const
IrcParserircParser () const
CoreIrcListHelperircListHelper () const
CoreIgnoreListManagerignoreListManager ()
CoreTransferManagertransferManager () const
void restoreSessionState ()
 Return necessary data for restoring the session after restarting the core.

Protected Member Functions

virtual void customEvent (QEvent *event)

Private Slots

void removeClient (Peer *peer)
void recvStatusMsgFromServer (QString msg)
void recvMessageFromServer (NetworkId networkId, Message::Type, BufferInfo::Type, const QString &target, const QString &text, const QString &sender="", Message::Flags flags=Message::None)
void destroyNetwork (NetworkId)
void scriptRequest (QString script)
void clientsConnected ()
void clientsDisconnected ()
void updateIdentityBySender ()
void saveSessionState () const

Private Member Functions

void processMessages ()
void loadSettings ()
void initScriptEngine ()
Q_INVOKABLE void processMessageEvent (MessageEvent *event)
 Hook for converting events to the old displayMsg() handlers.

Private Attributes

UserId _user
SignalProxy_signalProxy
CoreAliasManager _aliasManager
QHash< NetworkId, CoreNetwork * > _networks
QHash< IdentityId, CoreIdentity * > _identities
CoreBufferSyncer_bufferSyncer
CoreBacklogManager_backlogManager
CoreBufferViewManager_bufferViewManager
CoreIrcListHelper_ircListHelper
CoreNetworkConfig_networkConfig
CoreCoreInfo _coreInfo
CoreTransferManager_transferManager
EventManager_eventManager
EventStringifier_eventStringifier
CoreSessionEventProcessor_sessionEventProcessor
CtcpParser_ctcpParser
IrcParser_ircParser
QScriptEngine * scriptEngine
QList< RawMessage_messageQueue
bool _processMessages
CoreIgnoreListManager _ignoreListManager

Detailed Description

Definition at line 58 of file coresession.h.

Constructor & Destructor Documentation

Definition at line 137 of file coresession.cpp.

References _networks, and saveSessionState().

Member Function Documentation

QList< BufferInfo > buffers ( ) const

Definition at line 300 of file coresession.cpp.

References Core::requestBuffers(), and user().

Referenced by sessionState().

CoreNetworkConfig* networkConfig ( ) const
inline
NetworkConnection* networkConnection ( NetworkId  ) const
Protocol::SessionState sessionState ( ) const

Definition at line 382 of file coresession.cpp.

References _identities, _networks, and buffers().

Referenced by addClient().

const AliasManager& aliasManager ( ) const
inline

Definition at line 77 of file coresession.h.

References _aliasManager.

Referenced by CoreSession(), and CoreUserInputHandler::handleUserInput().

AliasManager& aliasManager ( )
inline

Definition at line 78 of file coresession.h.

References _aliasManager.

EventStringifier* eventStringifier ( ) const
inline

Definition at line 81 of file coresession.h.

References _eventStringifier.

Referenced by CoreSession().

CoreSessionEventProcessor* sessionEventProcessor ( ) const
inline

Definition at line 82 of file coresession.h.

References _sessionEventProcessor.

Referenced by CoreSession().

CtcpParser* ctcpParser ( ) const
inline
IrcParser* ircParser ( ) const
inline

Definition at line 84 of file coresession.h.

References _ircParser.

Referenced by CoreSession().

CoreIrcListHelper* ircListHelper ( ) const
inline

Definition at line 86 of file coresession.h.

References _ircListHelper.

Referenced by CoreSession().

CoreIgnoreListManager* ignoreListManager ( )
inline

Definition at line 88 of file coresession.h.

References _ignoreListManager.

Referenced by CoreNetwork::ignoreListManager().

CoreTransferManager* transferManager ( ) const
inline

Definition at line 89 of file coresession.h.

References _transferManager.

Referenced by CoreSession(), and CoreSessionEventProcessor::handleCtcpDcc().

void restoreSessionState ( )

Return necessary data for restoring the session after restarting the core.

Definition at line 203 of file coresession.cpp.

References Core::connectedNetworks(), CoreNetwork::connectToIrc(), network(), and user().

Referenced by CoreSession().

void addClient ( RemotePeer peer)
slot
void addClient ( InternalPeer peer)
slot

Definition at line 222 of file coresession.cpp.

References SignalProxy::addPeer(), sessionState(), and signalProxy().

void msgFromClient ( BufferInfo  bufinfo,
QString  message 
)
slot

Definition at line 244 of file coresession.cpp.

References network(), BufferInfo::networkId(), and CoreNetwork::userInput().

Referenced by CoreSession().

void createIdentity ( const Identity identity,
const QVariantMap &  additional 
)
slot

Create an identity and propagate the changes to the clients.

Parameters
identityThe identity to be created.

Definition at line 417 of file coresession.cpp.

References user().

Referenced by CoreSession(), and loadSettings().

void createIdentity ( const CoreIdentity identity)
slot
void removeIdentity ( IdentityId  identity)
slot

Remove identity and propagate that fact to the clients.

Parameters
identityThe identity to be removed.

Definition at line 459 of file coresession.cpp.

References _identities, identity(), identityRemoved(), and user().

Referenced by CoreSession().

void createNetwork ( const NetworkInfo info,
const QStringList &  persistentChannels = QStringList() 
)
slot
void removeNetwork ( NetworkId  network)
slot

Remove network and propagate that fact to the clients.

Parameters
networkThe id of the network to be removed.

Definition at line 519 of file coresession.cpp.

References destroyNetwork(), CoreNetwork::disconnectFromIrc(), displayMsg(), displayStatusMsg(), and network().

Referenced by CoreSession().

void renameBuffer ( const NetworkId networkId,
const QString &  newName,
const QString &  oldName 
)
slot
void changePassword ( PeerPtr  peer,
const QString &  userName,
const QString &  oldPassword,
const QString &  newPassword 
)
slot
QHash< QString, QString > persistentChannels ( NetworkId  id) const
slot

Definition at line 237 of file coresession.cpp.

References user().

Referenced by CoreNetwork::sendPerform().

void globalAway ( const QString &  msg = QString())
slot

Marks us away (or unaway) on all networks.

Definition at line 630 of file coresession.cpp.

References _networks, CoreUserInputHandler::issueAway(), and CoreNetwork::userInputHandler().

Referenced by CoreUserInputHandler::handleAway().

void initialized ( )
signal

Referenced by CoreSession().

void sessionState ( const Protocol::SessionState sessionState)
signal
void displayMsg ( Message  message)
signal
void displayStatusMsg ( QString  ,
QString   
)
signal
void scriptResult ( QString  result)
signal

Referenced by initScriptEngine(), and scriptRequest().

void identityCreated ( const Identity identity)
signal

Identity has been created.

This signal is propagated to the clients to tell them that the given identity has been created.

Parameters
identityThe new identity.

Referenced by CoreSession(), and createIdentity().

void identityRemoved ( IdentityId  identity)
signal

Identity has been removed.

This signal is propagated to the clients to inform them about the removal of the given identity.

Parameters
identityThe identity that has been removed.

Referenced by CoreSession(), and removeIdentity().

void networkCreated ( NetworkId  )
signal

Referenced by CoreSession(), and createNetwork().

void networkRemoved ( NetworkId  )
signal

Referenced by CoreSession(), and destroyNetwork().

void networkDisconnected ( NetworkId  )
signal

Referenced by createNetwork().

void passwordChanged ( PeerPtr  peer,
bool  success 
)
signal

Referenced by changePassword(), and CoreSession().

void customEvent ( QEvent *  event)
protectedvirtual

Definition at line 306 of file coresession.cpp.

References processMessages().

void removeClient ( Peer peer)
privateslot

Definition at line 229 of file coresession.cpp.

References RemotePeer::description(), toInt(), and user().

Referenced by CoreSession().

void recvStatusMsgFromServer ( QString  msg)
privateslot

Definition at line 282 of file coresession.cpp.

References displayStatusMsg().

Referenced by createNetwork().

void recvMessageFromServer ( NetworkId  networkId,
Message::Type  type,
BufferInfo::Type  bufferType,
const QString &  target,
const QString &  text,
const QString &  sender = "",
Message::Flags  flags = Message::None 
)
privateslot
void scriptRequest ( QString  script)
privateslot

Definition at line 410 of file coresession.cpp.

References scriptEngine, and scriptResult().

Referenced by initScriptEngine().

void updateIdentityBySender ( )
privateslot

Definition at line 450 of file coresession.cpp.

References identity(), Core::updateIdentity(), and user().

Referenced by createIdentity().

void initScriptEngine ( )
private
void processMessageEvent ( MessageEvent event)
private

Hook for converting events to the old displayMsg() handlers.

Definition at line 290 of file coresession.cpp.

References NetworkEvent::networkId(), and recvMessageFromServer().

Member Data Documentation

UserId _user
private

Definition at line 194 of file coresession.h.

Referenced by user().

SignalProxy* _signalProxy
private

Definition at line 196 of file coresession.h.

Referenced by signalProxy().

CoreAliasManager _aliasManager
private

Definition at line 197 of file coresession.h.

Referenced by aliasManager().

QHash<IdentityId, CoreIdentity *> _identities
private

Definition at line 201 of file coresession.h.

Referenced by createIdentity(), identity(), removeIdentity(), and sessionState().

CoreBufferSyncer* _bufferSyncer
private

Definition at line 203 of file coresession.h.

Referenced by CoreSession(), destroyNetwork(), renameBuffer(), and saveSessionState().

CoreBacklogManager* _backlogManager
private

Definition at line 204 of file coresession.h.

Referenced by CoreSession().

CoreBufferViewManager* _bufferViewManager
private

Definition at line 205 of file coresession.h.

Referenced by saveSessionState().

CoreIrcListHelper* _ircListHelper
private

Definition at line 206 of file coresession.h.

Referenced by ircListHelper().

CoreNetworkConfig* _networkConfig
private

Definition at line 207 of file coresession.h.

Referenced by networkConfig(), and saveSessionState().

CoreCoreInfo _coreInfo
private

Definition at line 208 of file coresession.h.

Referenced by CoreSession().

CoreTransferManager* _transferManager
private

Definition at line 209 of file coresession.h.

Referenced by transferManager().

EventManager* _eventManager
private

Definition at line 211 of file coresession.h.

Referenced by eventManager().

EventStringifier* _eventStringifier
private

Definition at line 212 of file coresession.h.

Referenced by eventStringifier().

CoreSessionEventProcessor* _sessionEventProcessor
private

Definition at line 213 of file coresession.h.

Referenced by sessionEventProcessor().

CtcpParser* _ctcpParser
private

Definition at line 214 of file coresession.h.

Referenced by ctcpParser().

IrcParser* _ircParser
private

Definition at line 215 of file coresession.h.

Referenced by ircParser().

QScriptEngine* scriptEngine
private

Definition at line 217 of file coresession.h.

Referenced by scriptRequest().

QList<RawMessage> _messageQueue
private

Definition at line 219 of file coresession.h.

Referenced by destroyNetwork(), processMessages(), and recvMessageFromServer().

bool _processMessages
private

Definition at line 220 of file coresession.h.

Referenced by processMessages(), and recvMessageFromServer().

CoreIgnoreListManager _ignoreListManager
private

Definition at line 221 of file coresession.h.

Referenced by CoreSession(), ignoreListManager(), and recvMessageFromServer().


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