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

Protected Attributes

bool m_bAutoConnect
 
QStringList * m_pChannelList
 
KviIrcServerm_pCurrentServer = nullptr
 
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() [1/2]

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, and name().

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

◆ KviIrcNetwork() [2/2]

KviIrcNetwork::KviIrcNetwork ( const KviIrcNetwork & src)

Carbon copy.

Parameters
srcThe source network
Returns
KviIrcNetwork

References copyFrom(), KviIrcNetwork(), m_pChannelList, m_pNickServRuleSet, and m_pServerList.

◆ ~KviIrcNetwork()

KviIrcNetwork::~KviIrcNetwork ( )

Destroys the network object.

References m_pChannelList, m_pNickServRuleSet, and m_pServerList.

Member Function Documentation

◆ alternativeNickName()

const QString & KviIrcNetwork::alternativeNickName ( ) const
inline

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

Returns
const QString &

References m_szAlternativeNickName.

Referenced by KviIrcConnection::pickNextLoginNickName().

◆ autoConnect()

bool KviIrcNetwork::autoConnect ( ) const
inline

Returns true if the network has the autoconnect state on.

Returns
bool

References m_bAutoConnect.

◆ autoJoinChannelList()

QStringList * KviIrcNetwork::autoJoinChannelList ( )
inline

Returns the list of channels with autojoin flag.

Returns
QStringList *

References m_pChannelList.

Referenced by KviIrcConnection::loginComplete().

◆ autoJoinChannelListAsString()

const QString KviIrcNetwork::autoJoinChannelListAsString ( )
inline

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

Returns
const QString &

References m_pChannelList.

◆ copyFrom()

◆ currentServer()

KviIrcServer * KviIrcNetwork::currentServer ( )

Returns the current server.

Returns
KviIrcServer

References m_pCurrentServer, and m_pServerList.

Referenced by KviIrcContext::connectToCurrentServer().

◆ description()

const QString & KviIrcNetwork::description ( ) const
inline

Returns the description of the network.

Returns
const QString &

References m_szDescription.

Referenced by OptionsWidget_servers::updateFilter().

◆ encoding()

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 &

References m_szEncoding.

◆ findServer() [1/2]

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

Searches for a server in the network.

Parameters
pServerThe server to find
Returns
KviIrcServer

References KviQString::equalCI(), KviIrcServer::hostName(), KviIrcServer::id(), KviIrcServer::isIPv6(), m_pServerList, KviIrcServer::port(), s, and KviIrcServer::useSSL().

◆ findServer() [2/2]

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(), m_pServerList, and s.

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

◆ insertServer()

void KviIrcNetwork::insertServer ( KviIrcServer * pServer)

Adds a new server to the network.

Parameters
pServerThe source server to add
Returns
void

References m_pServerList.

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

◆ name()

◆ nickName()

const QString & KviIrcNetwork::nickName ( ) const
inline

Returns the nickname of the user associated to the network.

Returns
const QString &

References m_szNickName.

Referenced by KviIrcConnection::pickNextLoginNickName().

◆ nickServRuleSet()

KviNickServRuleSet * KviIrcNetwork::nickServRuleSet ( )
inline

Returns a set of rules for the NickServ.

Returns
KviNickServRuleSet *

References m_pNickServRuleSet.

Referenced by KviIrcServerParser::parseLiteralNotice().

◆ onConnectCommand()

const QString & KviIrcNetwork::onConnectCommand ( ) const
inline

Returns the commands to run on network connect.

Returns
const QString &

References m_szOnConnectCommand.

Referenced by KviIrcConnection::loginToIrcServer().

◆ onLoginCommand()

const QString & KviIrcNetwork::onLoginCommand ( ) const
inline

Returns the commands to run on network login.

Returns
const QString &

References m_szOnLoginCommand.

Referenced by KviIrcConnection::loginComplete().

◆ password()

const QString & KviIrcNetwork::password ( ) const
inline

Returns the password of the user associated to the network.

Returns
const QString &

References m_szPass.

Referenced by KviIrcConnection::loginToIrcServer().

◆ realName()

const QString & KviIrcNetwork::realName ( ) const
inline

Returns the realname of the user associated to the network.

Returns
const QString &

References m_szRealName.

Referenced by KviIrcConnection::loginToIrcServer().

◆ serverList()

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

Returns a list of servers associated to the network.

Returns
KviPointerList<KviIrcServer> *

References m_pServerList.

Referenced by KviIrcServerDataBase::makeCurrentServer().

◆ setAlternativeNickName()

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

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

Parameters
szNickThe nickname
Returns
void

References m_szAlternativeNickName.

◆ setAutoConnect()

void KviIrcNetwork::setAutoConnect ( bool bAutoConnect)
inline

Sets the autoconnect flag.

Parameters
bAutoConnectThe state of the autoconnect flag
Returns
void

References m_bAutoConnect.

Referenced by serverdb_kvs_cmd_addNetwork().

◆ setAutoJoinChannelList() [1/2]

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.

◆ setAutoJoinChannelList() [2/2]

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 KviIrcServerDataBase::load().

◆ setCurrentServer()

void KviIrcNetwork::setCurrentServer ( KviIrcServer * pServer)

Sets the current server.

Parameters
pServerThe source server
Returns
void

References m_pCurrentServer, and m_pServerList.

Referenced by OptionsWidget_servers::commit(), KviIrcServerDataBase::makeCurrentBestServerInNetwork(), and KviIrcServerDataBase::makeCurrentServer().

◆ setDescription()

void KviIrcNetwork::setDescription ( const QString & szDescription)
inline

Sets the description of the network.

Parameters
szDescriptionThe description of the network
Returns
void

References m_szDescription.

◆ setEncoding()

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

References m_szEncoding.

◆ setName()

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

Sets the name of the network.

Parameters
szNameThe name of the network
Returns
void

References m_szName.

◆ setNickName()

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

Sets the nickname of the user associated to the network.

Parameters
szNickThe nickname
Returns
void

References m_szNickName.

◆ setNickServRuleSet()

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.

◆ setOnConnectCommand()

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

References m_szOnConnectCommand.

◆ setOnLoginCommand()

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

References m_szOnLoginCommand.

◆ setPassword()

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

Sets the password of the user associated to the network.

Parameters
szPassThe password
Returns
void

References m_szPass.

◆ setRealName()

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

Sets the realname of the user associated to the network.

Parameters
szRealThe realname
Returns
void

References m_szRealName.

◆ setTextEncoding()

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

References m_szTextEncoding.

◆ setUserIdentityId()

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

References m_szUserIdentityId.

◆ setUserName()

void KviIrcNetwork::setUserName ( const QString & szUser)
inline

Sets the username of the user associated to the network.

Parameters
szUserThe username
Returns
void

References m_szUserName.

◆ textEncoding()

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 &

References m_szTextEncoding.

◆ userIdentityId()

const QString & KviIrcNetwork::userIdentityId ( ) const
inline

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

Returns
const QString &

References m_szUserIdentityId.

Referenced by KviIrcContext::connectToCurrentServer().

◆ userName()

const QString & KviIrcNetwork::userName ( ) const
inline

Returns the username of the user associated to the network.

Returns
const QString &

References m_szUserName.

Referenced by KviIrcConnection::loginToIrcServer().

Friends And Related Symbol Documentation

◆ KviIrcServerDataBase

friend class KviIrcServerDataBase
friend

Member Data Documentation

◆ m_bAutoConnect

bool KviIrcNetwork::m_bAutoConnect
protected

◆ m_pChannelList

QStringList* KviIrcNetwork::m_pChannelList
protected

◆ m_pCurrentServer

KviIrcServer* KviIrcNetwork::m_pCurrentServer = nullptr
protected

◆ m_pNickServRuleSet

KviNickServRuleSet* KviIrcNetwork::m_pNickServRuleSet
protected

◆ m_pServerList

◆ m_szAlternativeNickName

QString KviIrcNetwork::m_szAlternativeNickName
protected

◆ m_szDescription

QString KviIrcNetwork::m_szDescription
protected

◆ m_szEncoding

QString KviIrcNetwork::m_szEncoding
protected

if empty, use system default

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

◆ m_szName

QString KviIrcNetwork::m_szName
protected

Referenced by copyFrom(), KviIrcNetwork(), name(), and setName().

◆ m_szNickName

QString KviIrcNetwork::m_szNickName
protected

preferred nick name

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

◆ m_szOnConnectCommand

QString KviIrcNetwork::m_szOnConnectCommand
protected

the command to run on connect

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

◆ m_szOnLoginCommand

QString KviIrcNetwork::m_szOnLoginCommand
protected

the command to run after login

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

◆ m_szPass

QString KviIrcNetwork::m_szPass
protected

special password

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

◆ m_szRealName

QString KviIrcNetwork::m_szRealName
protected

preferred real name

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

◆ m_szTextEncoding

QString KviIrcNetwork::m_szTextEncoding
protected

if empty, use system default

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

◆ m_szUserIdentityId

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(), KviIrcServerDataBase::load(), setUserIdentityId(), and userIdentityId().

◆ m_szUserName

QString KviIrcNetwork::m_szUserName
protected

preferred user name

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


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