6 * Copyright (C) 2005, Thomas Butter <butter@uni-mannheim.de>
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
23 #ifndef _PURPLE_SIMPLE_H
24 #define _PURPLE_SIMPLE_H
30 #include "circbuffer.h"
39 #define SIMPLE_BUF_INC 1024
40 #define SIMPLE_REGISTER_RETRY_MAX 2
42 #define SIMPLE_REGISTER_SENT 1
43 #define SIMPLE_REGISTER_RETRY 2
44 #define SIMPLE_REGISTER_COMPLETE 3
46 #define PUBLISH_EXPIRATION 600
47 #define SUBSCRIBE_EXPIRATION 1200
55 struct simple_watcher
{
58 struct sip_dialog dialog
;
65 struct sip_dialog
*dialog
;
69 int type
; /* 1 = Digest / 2 = NTLM */
76 gchar
*digest_session_key
;
80 struct simple_account_data
{
85 PurpleDnsQueryData
*query_data
;
86 PurpleSrvTxtQueryData
*srv_query_data
;
87 PurpleNetworkListenData
*listen_data
;
92 int registerstatus
; /* 0 nothing, 1 first registration send, 2 auth received, 3 registered */
93 struct sip_auth registrar
;
94 struct sip_auth proxy
;
100 guint registertimeout
;
103 PurpleAccount
*account
;
104 PurpleCircBuffer
*txbuf
;
107 GSList
*transactions
;
111 struct sockaddr_in serveraddr
;
114 int realport
; /* port and hostname from SRV record */
118 struct sip_connection
{
128 typedef gboolean (*TransCallback
) (struct simple_account_data
*, struct sipmsg
*, struct transaction
*);
133 int transport
; /* 0 = tcp, 1 = udp */
137 TransCallback callback
;
140 #endif /* _PURPLE_SIMPLE_H */