ZNC
trunk
Toggle main menu visibility
Loading...
Searching...
No Matches
include
znc
Server.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2004-2025 ZNC, see the NOTICE file for details.
3
*
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
7
*
8
* http://www.apache.org/licenses/LICENSE-2.0
9
*
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
15
*/
16
17
#ifndef ZNC_SERVER_H
18
#define ZNC_SERVER_H
19
20
#include <znc/zncconfig.h>
21
#include <
znc/ZNCString.h
>
22
23
class
CServer
{
24
public
:
25
CServer
(
const
CString
& sName,
unsigned
short
uPort = 6667,
26
const
CString
& sPass =
""
,
bool
bSSL =
false
,
27
bool
bUnixSocket =
false
);
28
~CServer
();
29
30
// TODO: use C++20's =default and <=>
31
bool
operator==
(
const
CServer
&)
const
;
32
bool
operator<
(
const
CServer
&)
const
;
33
34
static
CServer
Parse
(
CString
sLine);
35
36
const
CString
&
GetName
()
const
;
37
unsigned
short
GetPort
()
const
;
38
const
CString
&
GetPass
()
const
;
39
bool
IsSSL
()
const
;
40
bool
IsUnixSocket
()
const
;
41
CString
GetString
(
bool
bIncludePassword =
true
)
const
;
42
static
bool
IsValidHostName
(
const
CString
& sHostName);
43
44
private
:
45
protected
:
46
CString
m_sName
;
47
unsigned
short
m_uPort
;
48
CString
m_sPass
;
49
bool
m_bSSL
;
50
bool
m_bUnixSocket
;
51
};
52
53
#endif
// !ZNC_SERVER_H
ZNCString.h
CServer::m_sName
CString m_sName
Definition
Server.h:46
CServer::CServer
CServer(const CString &sName, unsigned short uPort=6667, const CString &sPass="", bool bSSL=false, bool bUnixSocket=false)
CServer::GetName
const CString & GetName() const
CServer::GetString
CString GetString(bool bIncludePassword=true) const
CServer::IsSSL
bool IsSSL() const
CServer::operator==
bool operator==(const CServer &) const
CServer::IsValidHostName
static bool IsValidHostName(const CString &sHostName)
CServer::Parse
static CServer Parse(CString sLine)
CServer::operator<
bool operator<(const CServer &) const
CServer::GetPort
unsigned short GetPort() const
CServer::m_bSSL
bool m_bSSL
Definition
Server.h:49
CServer::IsUnixSocket
bool IsUnixSocket() const
CServer::m_uPort
unsigned short m_uPort
Definition
Server.h:47
CServer::m_bUnixSocket
bool m_bUnixSocket
Definition
Server.h:50
CServer::m_sPass
CString m_sPass
Definition
Server.h:48
CServer::~CServer
~CServer()
CServer::GetPass
const CString & GetPass() const
CString
String class that is used inside ZNC.
Definition
ZNCString.h:50
Generated by
1.17.0