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-2014 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 _SERVER_H
18 #define _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, const CString& sPass = "", bool bSSL = false);
26  ~CServer();
27 
28  const CString& GetName() const;
29  unsigned short GetPort() const;
30  const CString& GetPass() const;
31  bool IsSSL() const;
32  CString GetString(bool bIncludePassword = true) const;
33  static bool IsValidHostName(const CString& sHostName);
34 private:
35 protected:
37  unsigned short m_uPort;
39  bool m_bSSL;
40 };
41 
42 #endif // !_SERVER_H
CString m_sPass
Definition: Server.h:38
unsigned short GetPort() const
static bool IsValidHostName(const CString &sHostName)
const CString & GetName() const
CString m_sName
Definition: Server.h:36
CServer(const CString &sName, unsigned short uPort=6667, const CString &sPass="", bool bSSL=false)
String class that is used inside ZNC.
Definition: ZNCString.h:67
const CString & GetPass() const
CString GetString(bool bIncludePassword=true) const
unsigned short m_uPort
Definition: Server.h:37
bool m_bSSL
Definition: Server.h:39
bool IsSSL() const
Definition: Server.h:23