ZNC  trunk
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Server.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2004-2018 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  ~CServer();
28 
29  const CString& GetName() const;
30  unsigned short GetPort() const;
31  const CString& GetPass() const;
32  bool IsSSL() const;
33  CString GetString(bool bIncludePassword = true) const;
34  static bool IsValidHostName(const CString& sHostName);
35 
36  private:
37  protected:
39  unsigned short m_uPort;
41  bool m_bSSL;
42 };
43 
44 #endif // !ZNC_SERVER_H
CString m_sPass
Definition: Server.h:40
unsigned short GetPort() const
static bool IsValidHostName(const CString &sHostName)
const CString & GetName() const
CString m_sName
Definition: Server.h:38
CServer(const CString &sName, unsigned short uPort=6667, const CString &sPass="", bool bSSL=false)
String class that is used inside ZNC.
Definition: ZNCString.h:68
const CString & GetPass() const
CString GetString(bool bIncludePassword=true) const
unsigned short m_uPort
Definition: Server.h:39
bool m_bSSL
Definition: Server.h:41
bool IsSSL() const
Definition: Server.h:23