forked from YeeYoungHan/cppsipstack
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSipServerSetup.h
More file actions
97 lines (74 loc) · 2.61 KB
/
Copy pathSipServerSetup.h
File metadata and controls
97 lines (74 loc) · 2.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
/*
* Copyright (C) 2012 Yee Young Han <websearch@naver.com> (http://blog.naver.com/websearch)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _SIP_SERVER_SETUP_H_
#define _SIP_SERVER_SETUP_H_
#include "StringMap.h"
#include "XmlElement.h"
/**
* @ingroup SipLoadBalancer
* @brief SipLoadBalancer 설정 파일의 내용을 저장하는 클래스
*/
class CSipServerSetup
{
public:
CSipServerSetup();
~CSipServerSetup();
/** SIP 통신을 위한 UDP 포트 번호 */
int m_iUdpPort;
/** SIP 통신을 위한 로컬 IP 주소 */
std::string m_strLocalIp;
/** SIP 통신을 위한 UDP 수신 쓰레드 개수 */
int m_iUdpThreadCount;
/** SIP 통신을 위한 TCP 포트 번호 */
int m_iTcpPort;
/** SIP 통신을 위한 TCP 수신 쓰레드 개수 */
int m_iTcpThreadCount;
/** SIP 통신을 위한 TCP 수신 최대 대기 시간 ( 초단위 ) */
int m_iTcpRecvTimeout;
/** SIP 통신을 위한 TLS 포트 번호 */
int m_iTlsPort;
/** SIP 통신을 위한 TLS handshake timeout 시간 (초단위) */
int m_iTlsAcceptTimeout;
/** TLS 프로토콜을 위한 서버 인증서 + 키를 포함한 PEM 파일 full path */
std::string m_strCertFile;
/** 로그 폴더 */
std::string m_strLogFolder;
/** 로그 레벨 */
int m_iLogLevel;
/** 로그 파일의 최대 크기 */
int m_iLogMaxSize;
/** 모니터링 TCP 포트 번호 */
int m_iMonitorPort;
/** 모니터링 TCP 포트에 접속 허용할 IP 주소 리스트 */
CStringMap m_clsMonitorIpMap;
/** SIP transaction list 에 저장하지 않을 SIP User Agent 맵 */
CStringMap m_clsDenySipUserAgentMap;
bool Read( const char * pszFileName );
bool Read( );
bool IsMonitorIp( const char * pszIp );
bool IsChange();
private:
bool Read( CXmlElement & clsXml );
bool ReadSipServer( CXmlElement & clsXml );
void SetFileSizeTime( );
std::string m_strFileName; // 설정 파일 이름
time_t m_iFileTime; // 설정 파일 저장 시간
int m_iFileSize; // 설정 파일 크기
};
extern CSipServerSetup gclsSetup;
#endif