forked from sd007/SimpleSipClient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
defines.h
88 lines (73 loc) · 1.73 KB
/
defines.h
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
#ifndef DEFINES_H
#define DEFINES_H
/* Include all headers. */
#include <pjlib.h>
#include <pjsip.h>
#include <stdlib.h>
#include <pjsip-simple/publish.h>
#include <pjlib-util.h>
#include <pjsip_ua.h>
#include <pjsip/sip_uri.h>
#include <pjsip/sip_transport.h>
#include <pjsip/sip_types.h>
#include <pjmedia.h>
#include <pjmedia/sdp_neg.h>
#include <pjmedia/sdp.h>
#include <stdlib.h>
#include <QString>
typedef struct
{
QString fromID;
QString fromIP;
unsigned short fromPort;
QString toID;
QString toIP;
unsigned short toPort;
QString contactID;
QString contactIP;
unsigned short contactPort;
}TransportContext;
typedef struct tagSIPServer
{
QString sipserverID;
QString sipserverDomain;
QString sipserverPasswd;
unsigned short sipserverPort;
unsigned int heartbeatInterval;
unsigned int maxTimeoutCount;
tagSIPServer(){
sipserverPort = 5060;
heartbeatInterval = 60;
maxTimeoutCount = 5;
}
}SIPServer;
typedef struct tagSIPClient
{
QString sipserverID;
QString sipserverDomain;
QString sipserverAddress; //ip
unsigned short sipserverPort;
QString localDeviceID;
QString localAddress; //ip
unsigned short localSipPort;
QString localPasswd;
unsigned long regValidSeconds; //s
unsigned int heartbeatInterval;
unsigned int maxTimeoutCount;
tagSIPClient(){
sipserverAddress = "172.0.0.1";
localPasswd = "12345678";
sipserverPort = 5060;
localSipPort = 5060;
regValidSeconds = 86400;
heartbeatInterval = 60;
maxTimeoutCount = 3;
}
}SIPClient;
typedef enum{
TYPE_None,
TYPE_SIPServer,
TYPE_SIPClient,
TYPE_Other
}LocalSipType;
#endif // DEFINES_H