KVIrc 5.2.6
Developer APIs
KviIrcConnectionTarget.h
Go to the documentation of this file.
1#ifndef _KVI_IRCCONNECTIONTARGET_H_
2#define _KVI_IRCCONNECTIONTARGET_H_
3//=============================================================================
4//
5// File : KviIrcConnectionTarget.h
6// Creation date : Tue 08 Jun 2004 14:11:59 by Szymon Stefanek
7//
8// This file is part of the KVIrc IRC client distribution
9// Copyright (C) 2004-2010 Szymon Stefanek <pragma at kvirc dot net>
10//
11// This program is FREE software. You can redistribute it and/or
12// modify it under the terms of the GNU General Public License
13// as published by the Free Software Foundation; either version 2
14// of the License, or (at your option) any later version.
15//
16// This program is distributed in the HOPE that it will be USEFUL,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19// See the GNU General Public License for more details.
20//
21// You should have received a copy of the GNU General Public License
22// along with this program. If not, write to the Free Software Foundation,
23// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24//
25//=============================================================================
26
27#include "kvi_settings.h"
28#include "KviQString.h"
29#include "KviHeapObject.h"
30
31class KviIrcNetwork;
32class KviIrcServer;
33class KviProxy;
34
36{
38
39public:
40 // pServer is a shallow pointer: this class makes a copy of it internally, must NOT be null
41 // pProxy may be null if a proxy is not desired. this class makes a copy of it internally
43 const KviIrcNetwork * pNetwork,
44 const KviIrcServer * pServer,
45 const KviProxy * pProxy = nullptr,
46 const QString & szBindAddress = {});
48
49private:
50 KviIrcNetwork * m_pNetwork; // owned, never null, it's a COPY of the entry in the db
51 KviIrcServer * m_pServer; // owned, never null, it's a COPY of the entry in the db
52 KviProxy * m_pProxy = nullptr; // owned, may be null, it's a COPY of the entry in the db
53 QString m_szBindAddress; // forced bind address
54
55public:
56 KviIrcServer * server() const { return m_pServer; }
57 KviIrcNetwork * network() const { return m_pNetwork; }
58 KviProxy * proxy() const { return m_pProxy; }
59 const QString & bindAddress() const { return m_szBindAddress; }
60 bool hasBindAddress() const { return !m_szBindAddress.isEmpty(); }
61
62protected:
63 // this is for KviIrcConnectionTargetResolver only
64 void clearProxy();
65 void setBindAddress(const QString & szBindAddress) { m_szBindAddress = szBindAddress; }
66};
67
68#endif
Heap Object.
Helper functions for the QString class.
m_pServer
Definition KvsObject_socket.cpp:317
Definition KviHeapObject.h:119
Definition KviIrcConnectionTargetResolver.h:53
Definition KviIrcConnectionTarget.h:36
KviIrcServer * server() const
Definition KviIrcConnectionTarget.h:56
const QString & bindAddress() const
Definition KviIrcConnectionTarget.h:59
KviIrcNetwork * network() const
Definition KviIrcConnectionTarget.h:57
void setBindAddress(const QString &szBindAddress)
Definition KviIrcConnectionTarget.h:65
KviIrcServer * m_pServer
Definition KviIrcConnectionTarget.h:51
QString m_szBindAddress
Definition KviIrcConnectionTarget.h:53
bool hasBindAddress() const
Definition KviIrcConnectionTarget.h:60
KviIrcNetwork * m_pNetwork
Definition KviIrcConnectionTarget.h:50
KviProxy * proxy() const
Definition KviIrcConnectionTarget.h:58
Network handling class.
Definition KviIrcNetwork.h:48
The class which manages the irc servers.
Definition KviIrcServer.h:52
Definition KviProxy.h:37
This file contains compile time settings.
#define KVIRC_API
Definition kvi_settings.h:127