KVIrc 5.2.0
Developer APIs
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.
 
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, name(), and KviPointerList< T >::setAutoDelete().

◆ KviIrcNetwork() [2/2]

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::~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 &

Referenced by KviIrcConnection::pickNextLoginNickName().

◆ autoConnect()

bool KviIrcNetwork::autoConnect ( ) const
inline

Returns true if the network has the autoconnect state on.

Returns
bool

◆ autoJoinChannelList()

QStringList * KviIrcNetwork::autoJoinChannelList ( )
inline

Returns the list of channels with autojoin flag.

Returns
QStringList *

Referenced by KviIrcConnection::loginComplete().

◆ autoJoinChannelListAsString()

const QString KviIrcNetwork::autoJoinChannelListAsString ( )
inline

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

Returns
const QString &

◆ copyFrom()

void KviIrcNetwork::copyFrom ( const KviIrcNetwork net)

◆ currentServer()

KviIrcServer * KviIrcNetwork::currentServer ( )

Returns the current server.

Returns
KviIrcServer

References KviPointerList< T >::first(), 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 &

Referenced by OptionsWidget_servers::updateFilter(), and IrcServerOptionsTreeWidgetItem::updateVisibleStrings().

◆ 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 &

Referenced by KviIrcConnection::setupSrvCodec().

◆ findServer() [1/2]

KviIrcServer * KviIrcNetwork::findServer ( const KviIrcServer pServer)

◆ 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(), KviPointerList< T >::first(), m_pServerList, KviPointerList< T >::next(), 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 KviPointerList< T >::append(), and m_pServerList.

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

◆ name()

const QString & KviIrcNetwork::name ( ) const
inline

◆ nickName()

const QString & KviIrcNetwork::nickName ( ) const
inline

Returns the nickname of the user associated to the network.

Returns
const QString &

Referenced by KviIrcConnection::pickNextLoginNickName().

◆ nickServRuleSet()

KviNickServRuleSet * KviIrcNetwork::nickServRuleSet ( )
inline

Returns a set of rules for the NickServ.

Returns
KviNickServRuleSet *

Referenced by KviIrcServerParser::parseLiteralNotice().

◆ onConnectCommand()

const QString & KviIrcNetwork::onConnectCommand ( ) const
inline

Returns the commands to run on network connect.

Returns
const QString &

Referenced by KviIrcConnection::loginToIrcServer().

◆ onLoginCommand()

const QString & KviIrcNetwork::onLoginCommand ( ) const
inline

Returns the commands to run on network login.

Returns
const QString &

Referenced by KviIrcConnection::loginComplete().

◆ password()

const QString & KviIrcNetwork::password ( ) const
inline

Returns the password of the user associated to the network.

Returns
const QString &

Referenced by KviIrcConnection::loginToIrcServer().

◆ realName()

const QString & KviIrcNetwork::realName ( ) const
inline

Returns the realname of the user associated to the network.

Returns
const QString &

Referenced by KviIrcConnection::loginToIrcServer().

◆ serverList()

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

Returns a list of servers associated to the network.

Returns
KviPointerList<KviIrcServer> *

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

◆ setAutoConnect()

void KviIrcNetwork::setAutoConnect ( bool  bAutoConnect)
inline

Sets the autoconnect flag.

Parameters
bAutoConnectThe state of the autoconnect flag
Returns
void

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)

◆ setDescription()

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

Sets the description of the network.

Parameters
szDescriptionThe description of the network
Returns
void

◆ 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

◆ setName()

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

◆ setNickName()

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

Sets the nickname of the user associated to the network.

Parameters
szNickThe nickname
Returns
void

◆ 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

◆ 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

◆ setPassword()

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

Sets the password of the user associated to the network.

Parameters
szPassThe password
Returns
void

◆ setRealName()

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

Sets the realname of the user associated to the network.

Parameters
szRealThe realname
Returns
void

◆ 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

◆ 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

◆ setUserName()

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

Sets the username of the user associated to the network.

Parameters
szUserThe username
Returns
void

◆ 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 &

Referenced by KviIrcConnection::setupTextCodec().

◆ userIdentityId()

const QString & KviIrcNetwork::userIdentityId ( ) const
inline

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

Returns
const QString &

Referenced by KviIrcContext::connectToCurrentServer().

◆ userName()

const QString & KviIrcNetwork::userName ( ) const
inline

Returns the username of the user associated to the network.

Returns
const QString &

Referenced by KviIrcConnection::loginToIrcServer().

Friends And Related Symbol Documentation

◆ KviIrcServerDataBase

friend class KviIrcServerDataBase
friend

Member Data Documentation

◆ m_bAutoConnect

bool KviIrcNetwork::m_bAutoConnect
protected

autoconnect

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

◆ m_pChannelList

QStringList* KviIrcNetwork::m_pChannelList
protected

◆ m_pCurrentServer

KviIrcServer* KviIrcNetwork::m_pCurrentServer = nullptr
protected

◆ m_pNickServRuleSet

KviNickServRuleSet* KviIrcNetwork::m_pNickServRuleSet
protected

◆ m_pServerList

KviPointerList<KviIrcServer>* KviIrcNetwork::m_pServerList
protected

◆ m_szAlternativeNickName

QString KviIrcNetwork::m_szAlternativeNickName
protected

alternative nick name

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

◆ m_szDescription

QString KviIrcNetwork::m_szDescription
protected

◆ m_szEncoding

QString KviIrcNetwork::m_szEncoding
protected

if empty, use system default

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

◆ m_szName

QString KviIrcNetwork::m_szName
protected

Referenced by copyFrom(), and KviIrcNetwork().

◆ m_szNickName

QString KviIrcNetwork::m_szNickName
protected

preferred nick name

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

◆ m_szOnConnectCommand

QString KviIrcNetwork::m_szOnConnectCommand
protected

the command to run on connect

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

◆ m_szOnLoginCommand

QString KviIrcNetwork::m_szOnLoginCommand
protected

the command to run after login

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

◆ m_szPass

QString KviIrcNetwork::m_szPass
protected

special password

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

◆ m_szRealName

QString KviIrcNetwork::m_szRealName
protected

preferred real name

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

◆ m_szTextEncoding

QString KviIrcNetwork::m_szTextEncoding
protected

if empty, use system default

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

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

◆ m_szUserName

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: