KVIrc  4.9.2
DeveloperAPIs
Public Member Functions | Protected Attributes | Friends | List of all members
KviIrcNetwork Class Reference

Network handling class. More...

#include <KviIrcNetwork.h>

+ Inheritance diagram for KviIrcNetwork:

Public Member Functions

const QString & alternativeNickName () const
 Returns the alternative nickname of the user associated to the network. More...
 
bool autoConnect () const
 Returns true if the network has the autoconnect state on. More...
 
QStringList * autoJoinChannelList ()
 Returns the list of channels with autojoin flag. More...
 
const QString autoJoinChannelListAsString ()
 Returns the list of channels with autojoin flag as a string. More...
 
void copyFrom (const KviIrcNetwork &net)
 Carbon copy. More...
 
KviIrcServercurrentServer ()
 Returns the current server. More...
 
const QString & description () const
 Returns the description of the network. More...
 
const QString & encoding () const
 Returns the encoding of the network. More...
 
KviIrcServerfindServer (const QString &szHostname)
 Searches for a server in the network. More...
 
KviIrcServerfindServer (const KviIrcServer *pServer)
 Searches for a server in the network. More...
 
void insertServer (KviIrcServer *pServer)
 Adds a new server to the network. More...
 
 KviIrcNetwork (const QString &name)
 Construct the network object. More...
 
 KviIrcNetwork (const KviIrcNetwork &src)
 Carbon copy. More...
 
const QString & name () const
 Returns the name of the network. More...
 
const QString & nickName () const
 Returns the nickname of the user associated to the network. More...
 
KviNickServRuleSetnickServRuleSet ()
 Returns a set of rules for the NickServ. More...
 
const QString & onConnectCommand () const
 Returns the commands to run on network connect. More...
 
const QString & onLoginCommand () const
 Returns the commands to run on network login. More...
 
const QString & password () const
 Returns the password of the user associated to the network. More...
 
const QString & realName () const
 Returns the realname of the user associated to the network. More...
 
KviPointerList< KviIrcServer > * serverList ()
 Returns a list of servers associated to the network. More...
 
void setAlternativeNickName (const QString &szNick)
 Sets the alternative nickname of the user associated to the network. More...
 
void setAutoConnect (bool bAutoConnect)
 Sets the autoconnect flag. More...
 
void setAutoJoinChannelList (QStringList *pNewChannelList)
 Sets the list of channels to mark for autojoin. More...
 
void setAutoJoinChannelList (const QString &szNewChannelList)
 Sets the list of channels to mark for autojoin. More...
 
void setCurrentServer (KviIrcServer *pServer)
 Sets the current server. More...
 
void setDescription (const QString &szDescription)
 Sets the description of the network. More...
 
void setEncoding (const QString &szEncoding)
 Sets the encondig of the network. More...
 
void setName (const QString &szName)
 Sets the name of the network. More...
 
void setNickName (const QString &szNick)
 Sets the nickname of the user associated to the network. More...
 
void setNickServRuleSet (KviNickServRuleSet *pSet)
 Sets the rules for NickServ. More...
 
void setOnConnectCommand (const QString &szCmd)
 Sets the list of commands to run on network connection. More...
 
void setOnLoginCommand (const QString &szCmd)
 Sets the list of commands to run on network login. More...
 
void setPassword (const QString &szPass)
 Sets the password of the user associated to the network. More...
 
void setRealName (const QString &szReal)
 Sets the realname of the user associated to the network. More...
 
void setTextEncoding (const QString &szEncoding)
 Sets the text encondig of the network. More...
 
void setUserIdentityId (const QString &szUserIdentityId)
 Sets the user identity id of the user associated to the network. More...
 
void setUserName (const QString &szUser)
 Sets the username of the user associated to the network. More...
 
const QString & textEncoding () const
 Returns the text encoding of the network. More...
 
const QString & userIdentityId () const
 Returns the user identity of the user associated to the network. More...
 
const QString & userName () const
 Returns the username of the user associated to the network. More...
 
 ~KviIrcNetwork ()
 Destroys the network object. More...
 

Protected Attributes

bool m_bAutoConnect
 
QStringList * m_pChannelList
 
KviIrcServerm_pCurrentServer
 
KviNickServRuleSetm_pNickServRuleSet
 
KviPointerList< KviIrcServer > * m_pServerList
 
QString m_szAlternativeNickName
 
QString m_szDescription
 
QString m_szEncoding
 
QString m_szName
 
QString m_szNickName
 
QString m_szOnConnectCommand
 
QString m_szOnLoginCommand
 
QString m_szPass
 
QString m_szRealName
 
QString m_szTextEncoding
 
QString m_szUserIdentityId
 
QString m_szUserName
 

Friends

class KviIrcServerDataBase
 

Detailed Description

Network handling class.

Constructor & Destructor Documentation

KviIrcNetwork::KviIrcNetwork ( const QString &  name)

Construct the network object.

Parameters
nameThe name of the network
Returns
KviIrcNetwork

References m_bAutoConnect, m_pChannelList, m_pCurrentServer, m_pNickServRuleSet, m_pServerList, m_szName, name(), and KviPointerList< T >::setAutoDelete().

KviIrcNetwork::KviIrcNetwork ( const KviIrcNetwork src)

Carbon copy.

Parameters
srcThe source network
Returns
KviIrcNetwork

References copyFrom(), m_pChannelList, m_pNickServRuleSet, m_pServerList, and KviPointerList< T >::setAutoDelete().

KviIrcNetwork::~KviIrcNetwork ( )

Destroys the network object.

References m_pChannelList, m_pNickServRuleSet, and m_pServerList.

Member Function Documentation

const QString& KviIrcNetwork::alternativeNickName ( ) const
inline

Returns the alternative nickname of the user associated to the network.

Returns
const QString &

Referenced by IrcNetworkDetailsWidget::IrcNetworkDetailsWidget(), and KviIrcConnection::pickNextLoginNickName().

bool KviIrcNetwork::autoConnect ( ) const
inline

Returns true if the network has the autoconnect state on.

Returns
bool

Referenced by IrcNetworkDetailsWidget::IrcNetworkDetailsWidget().

QStringList* KviIrcNetwork::autoJoinChannelList ( )
inline

Returns the list of channels with autojoin flag.

Returns
QStringList *

Referenced by IrcNetworkDetailsWidget::IrcNetworkDetailsWidget(), and KviIrcConnection::loginComplete().

const QString KviIrcNetwork::autoJoinChannelListAsString ( )
inline

Returns the list of channels with autojoin flag as a string.

Returns
const QString &
void KviIrcNetwork::copyFrom ( const KviIrcNetwork net)
KviIrcServer * KviIrcNetwork::currentServer ( )

Returns the current server.

Returns
KviIrcServer

References KviPointerList< T >::first(), m_pCurrentServer, and m_pServerList.

Referenced by KviIrcContext::connectToCurrentServer().

const QString& KviIrcNetwork::description ( ) const
inline
const QString& KviIrcNetwork::encoding ( ) const
inline

Returns the encoding of the network.

Some information as nickname and channel names are encoded when communicating with the server

Returns
const QString &

Referenced by IrcNetworkDetailsWidget::IrcNetworkDetailsWidget(), and KviIrcConnection::setupSrvCodec().

KviIrcServer * KviIrcNetwork::findServer ( const QString &  szHostname)

Searches for a server in the network.

Parameters
szHostnameThe hostname of the server to find
Returns
KviIrcServer

References KviQString::equalCI(), KviPointerList< T >::first(), m_pServerList, KviPointerList< T >::next(), and s.

Referenced by OptionsWidget_servers::commit(), serverdb_kvs_cmd_addServer(), and serverdb_kvs_fnc_serverExists().

KviIrcServer * KviIrcNetwork::findServer ( const KviIrcServer pServer)
void KviIrcNetwork::insertServer ( KviIrcServer pServer)

Adds a new server to the network.

Parameters
pServerThe source server to add
Returns
void

References KviPointerList< T >::append(), and m_pServerList.

Referenced by OptionsWidget_servers::commit(), and serverdb_kvs_cmd_addServer().

const QString& KviIrcNetwork::name ( ) const
inline
const QString& KviIrcNetwork::nickName ( ) const
inline

Returns the nickname of the user associated to the network.

Returns
const QString &

Referenced by IrcNetworkDetailsWidget::IrcNetworkDetailsWidget(), and KviIrcConnection::pickNextLoginNickName().

KviNickServRuleSet* KviIrcNetwork::nickServRuleSet ( )
inline

Returns a set of rules for the NickServ.

Returns
KviNickServRuleSet *

Referenced by IrcNetworkDetailsWidget::IrcNetworkDetailsWidget(), and KviIrcServerParser::parseLiteralNotice().

const QString& KviIrcNetwork::onConnectCommand ( ) const
inline

Returns the commands to run on network connect.

Returns
const QString &

Referenced by IrcNetworkDetailsWidget::IrcNetworkDetailsWidget(), and KviIrcConnection::loginToIrcServer().

const QString& KviIrcNetwork::onLoginCommand ( ) const
inline

Returns the commands to run on network login.

Returns
const QString &

Referenced by IrcNetworkDetailsWidget::IrcNetworkDetailsWidget(), and KviIrcConnection::loginComplete().

const QString& KviIrcNetwork::password ( ) const
inline

Returns the password of the user associated to the network.

Returns
const QString &

Referenced by IrcNetworkDetailsWidget::IrcNetworkDetailsWidget(), and KviIrcConnection::loginToIrcServer().

const QString& KviIrcNetwork::realName ( ) const
inline

Returns the realname of the user associated to the network.

Returns
const QString &

Referenced by IrcNetworkDetailsWidget::IrcNetworkDetailsWidget(), and KviIrcConnection::loginToIrcServer().

KviPointerList<KviIrcServer>* KviIrcNetwork::serverList ( )
inline

Returns a list of servers associated to the network.

Returns
KviPointerList<KviIrcServer> *

Referenced by KviIrcServerDataBase::makeCurrentServer().

void KviIrcNetwork::setAlternativeNickName ( const QString &  szNick)
inline

Sets the alternative nickname of the user associated to the network.

Parameters
szNickThe nickname
Returns
void

Referenced by IrcNetworkDetailsWidget::fillData().

void KviIrcNetwork::setAutoConnect ( bool  bAutoConnect)
inline

Sets the autoconnect flag.

Parameters
bAutoConnectThe state of the autoconnect flag
Returns
void

Referenced by IrcNetworkDetailsWidget::fillData(), and serverdb_kvs_cmd_addNetwork().

void KviIrcNetwork::setAutoJoinChannelList ( QStringList *  pNewChannelList)

Sets the list of channels to mark for autojoin.

Parameters
pNewChannelListThe channel list
Returns
void

References m_pChannelList.

Referenced by IrcNetworkDetailsWidget::fillData(), and KviIrcServerDataBase::load().

void KviIrcNetwork::setAutoJoinChannelList ( const QString &  szNewChannelList)

Sets the list of channels to mark for autojoin.

Parameters
szNewChannelListA comma separated list of channels
Returns
void

References m_pChannelList.

void KviIrcNetwork::setCurrentServer ( KviIrcServer pServer)
void KviIrcNetwork::setDescription ( const QString &  szDescription)
inline

Sets the description of the network.

Parameters
szDescriptionThe description of the network
Returns
void

Referenced by IrcNetworkDetailsWidget::fillData().

void KviIrcNetwork::setEncoding ( const QString &  szEncoding)
inline

Sets the encondig of the network.

Some information as nickname and channel names are encoded when communicating with the server

Parameters
szEncodingThe encoding of the network
Returns
void

Referenced by IrcNetworkDetailsWidget::fillData().

void KviIrcNetwork::setName ( const QString &  szName)
inline

Sets the name of the network.

Parameters
szNameThe name of the network
Returns
void

Referenced by OptionsWidget_servers::saveLastItem().

void KviIrcNetwork::setNickName ( const QString &  szNick)
inline

Sets the nickname of the user associated to the network.

Parameters
szNickThe nickname
Returns
void

Referenced by IrcNetworkDetailsWidget::fillData().

void KviIrcNetwork::setNickServRuleSet ( KviNickServRuleSet pSet)

Sets the rules for NickServ.

Parameters
pSetThe rule set where to add rules
Returns
void

References m_pNickServRuleSet, and s.

Referenced by IrcNetworkDetailsWidget::fillData().

void KviIrcNetwork::setOnConnectCommand ( const QString &  szCmd)
inline

Sets the list of commands to run on network connection.

Parameters
szCmdThe commands list to run
Returns
void

Referenced by IrcNetworkDetailsWidget::fillData().

void KviIrcNetwork::setOnLoginCommand ( const QString &  szCmd)
inline

Sets the list of commands to run on network login.

Parameters
szCmdThe commands list to run
Returns
void

Referenced by IrcNetworkDetailsWidget::fillData().

void KviIrcNetwork::setPassword ( const QString &  szPass)
inline

Sets the password of the user associated to the network.

Parameters
szPassThe password
Returns
void

Referenced by IrcNetworkDetailsWidget::fillData().

void KviIrcNetwork::setRealName ( const QString &  szReal)
inline

Sets the realname of the user associated to the network.

Parameters
szRealThe realname
Returns
void

Referenced by IrcNetworkDetailsWidget::fillData().

void KviIrcNetwork::setTextEncoding ( const QString &  szEncoding)
inline

Sets the text encondig of the network.

This is the default encoding when talking on channels or queries

Parameters
szEncodingThe text encoding of the network
Returns
void

Referenced by IrcNetworkDetailsWidget::fillData().

void KviIrcNetwork::setUserIdentityId ( const QString &  szUserIdentityId)
inline

Sets the user identity id of the user associated to the network.

Parameters
szUserIdentityIdThe user identity
Returns
void
void KviIrcNetwork::setUserName ( const QString &  szUser)
inline

Sets the username of the user associated to the network.

Parameters
szUserThe username
Returns
void

Referenced by IrcNetworkDetailsWidget::fillData().

const QString& KviIrcNetwork::textEncoding ( ) const
inline

Returns the text encoding of the network.

This is the default encoding when talking on channels or queries

Returns
const QString &

Referenced by IrcNetworkDetailsWidget::IrcNetworkDetailsWidget(), and KviIrcConnection::setupTextCodec().

const QString& KviIrcNetwork::userIdentityId ( ) const
inline

Returns the user identity of the user associated to the network.

Returns
const QString &

Referenced by KviIrcContext::connectToCurrentServer().

const QString& KviIrcNetwork::userName ( ) const
inline

Returns the username of the user associated to the network.

Returns
const QString &

Referenced by IrcNetworkDetailsWidget::IrcNetworkDetailsWidget(), and KviIrcConnection::loginToIrcServer().

Friends And Related Function Documentation

friend class KviIrcServerDataBase
friend

Member Data Documentation

bool KviIrcNetwork::m_bAutoConnect
protected

autoconnect

Referenced by copyFrom(), KviIrcNetwork(), and KviIrcServerDataBase::load().

QStringList* KviIrcNetwork::m_pChannelList
protected

Channels to auto join

Referenced by copyFrom(), KviIrcNetwork(), setAutoJoinChannelList(), and ~KviIrcNetwork().

KviIrcServer* KviIrcNetwork::m_pCurrentServer
protected
KviNickServRuleSet* KviIrcNetwork::m_pNickServRuleSet
protected
KviPointerList<KviIrcServer>* KviIrcNetwork::m_pServerList
protected
QString KviIrcNetwork::m_szAlternativeNickName
protected

alternative nick name

Referenced by copyFrom(), and KviIrcServerDataBase::load().

QString KviIrcNetwork::m_szDescription
protected
QString KviIrcNetwork::m_szEncoding
protected

if empty, use system default

Referenced by copyFrom(), and KviIrcServerDataBase::load().

QString KviIrcNetwork::m_szName
protected

Referenced by copyFrom(), and KviIrcNetwork().

QString KviIrcNetwork::m_szNickName
protected

preferred nick name

Referenced by copyFrom(), and KviIrcServerDataBase::load().

QString KviIrcNetwork::m_szOnConnectCommand
protected

the command to run on connect

Referenced by copyFrom(), and KviIrcServerDataBase::load().

QString KviIrcNetwork::m_szOnLoginCommand
protected

the command to run after login

Referenced by copyFrom(), and KviIrcServerDataBase::load().

QString KviIrcNetwork::m_szPass
protected

special password

Referenced by copyFrom(), and KviIrcServerDataBase::load().

QString KviIrcNetwork::m_szRealName
protected

preferred real name

Referenced by copyFrom(), and KviIrcServerDataBase::load().

QString KviIrcNetwork::m_szTextEncoding
protected

if empty, use system default

Referenced by copyFrom(), and KviIrcServerDataBase::load().

QString KviIrcNetwork::m_szUserIdentityId
protected

The user identity to use for this server: if empty then use the global primary identity moved from KviIrcServerDataBaseRecord

Referenced by copyFrom(), and KviIrcServerDataBase::load().

QString KviIrcNetwork::m_szUserName
protected

preferred user name

Referenced by copyFrom(), and KviIrcServerDataBase::load().


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