Mercurial > pidgin
annotate src/protocols/simple/simple.h @ 13177:891be2f09b5c
[gaim-migrate @ 15540]
adding support for xpidf used by windows messenger and changing Contact headers to be accepted by LCS
committer: Tailor Script <tailor@pidgin.im>
author | Thomas Butter <tbutter> |
---|---|
date | Wed, 08 Feb 2006 05:53:52 +0000 |
parents | 31a3a9af1494 |
children | 33bef17125c2 |
rev | line source |
---|---|
11181 | 1 /** |
2 * @file simple.h | |
3 * | |
4 * gaim | |
5 * | |
6 * Copyright (C) 2005, Thomas Butter <butter@uni-mannheim.de> | |
7 * | |
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. | |
12 * | |
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. | |
17 * | |
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | |
21 */ | |
22 | |
23 #ifndef _GAIM_SIMPLE_H | |
24 #define _GAIM_SIMPLE_H | |
25 | |
26 #include <glib.h> | |
27 #include <time.h> | |
12382
cfc808463763
[gaim-migrate @ 14688]
Richard Laager <rlaager@wiktel.com>
parents:
12196
diff
changeset
|
28 |
cfc808463763
[gaim-migrate @ 14688]
Richard Laager <rlaager@wiktel.com>
parents:
12196
diff
changeset
|
29 #include <cipher.h> |
11181 | 30 #include <prpl.h> |
12382
cfc808463763
[gaim-migrate @ 14688]
Richard Laager <rlaager@wiktel.com>
parents:
12196
diff
changeset
|
31 |
11181 | 32 #include "sipmsg.h" |
33 | |
34 #define SIMPLE_BUF_INC 1024 | |
35 | |
36 struct sip_dialog { | |
37 gchar *ourtag; | |
38 gchar *theirtag; | |
39 gchar *callid; | |
40 }; | |
41 | |
42 struct simple_watcher { | |
43 gchar *name; | |
44 time_t expire; | |
45 struct sip_dialog dialog; | |
13177 | 46 int needsxpidf; |
11181 | 47 }; |
48 | |
49 struct simple_buddy { | |
50 gchar *name; | |
51 time_t resubscribe; | |
52 }; | |
53 | |
54 struct sip_auth { | |
11346 | 55 int type; /* 1 = Digest / 2 = NTLM */ |
12382
cfc808463763
[gaim-migrate @ 14688]
Richard Laager <rlaager@wiktel.com>
parents:
12196
diff
changeset
|
56 gchar *nonce; |
13084 | 57 gchar *opaque; |
12382
cfc808463763
[gaim-migrate @ 14688]
Richard Laager <rlaager@wiktel.com>
parents:
12196
diff
changeset
|
58 gchar *realm; |
11424 | 59 gchar *target; |
13084 | 60 guint32 flags; |
11181 | 61 int nc; |
12382
cfc808463763
[gaim-migrate @ 14688]
Richard Laager <rlaager@wiktel.com>
parents:
12196
diff
changeset
|
62 gchar *digest_session_key; |
11346 | 63 int retries; |
11181 | 64 }; |
65 | |
66 struct simple_account_data { | |
67 GaimConnection *gc; | |
68 gchar *servername; | |
69 gchar *username; | |
70 gchar *password; | |
71 int fd; | |
72 int cseq; | |
73 time_t reregister; | |
74 time_t republish; | |
11829
4669e7461968
[gaim-migrate @ 14120]
Richard Laager <rlaager@wiktel.com>
parents:
11424
diff
changeset
|
75 int registerstatus; /* 0 nothing, 1 first registration send, 2 auth received, 3 registered */ |
11181 | 76 struct sip_auth registrar; |
77 struct sip_auth proxy; | |
78 int listenfd; | |
79 int listenport; | |
11409 | 80 int listenpa; |
11181 | 81 gchar *status; |
82 GHashTable *buddies; | |
83 guint registertimeout; | |
11194 | 84 guint resendtimeout; |
13058
256abf4dd912
[gaim-migrate @ 15420]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
12760
diff
changeset
|
85 gboolean connecting; |
11181 | 86 GaimAccount *account; |
87 gchar *sendlater; | |
12196 | 88 gchar *regcallid; |
11181 | 89 GSList *transactions; |
90 GSList *watcher; | |
91 GSList *openconns; | |
11189 | 92 gboolean udp; |
93 struct sockaddr_in serveraddr; | |
11194 | 94 int registerexpire; |
11383 | 95 gchar *realhostname; |
96 int realport; /* port and hostname from SRV record */ | |
11181 | 97 }; |
98 | |
99 struct sip_connection { | |
100 int fd; | |
101 gchar *inbuf; | |
102 int inbuflen; | |
103 int inbufused; | |
104 int inputhandler; | |
105 }; | |
106 | |
107 struct transaction; | |
108 | |
109 typedef gboolean (*TransCallback) (struct simple_account_data *, struct sipmsg *, struct transaction *); | |
110 | |
111 struct transaction { | |
112 time_t time; | |
113 int retries; | |
11829
4669e7461968
[gaim-migrate @ 14120]
Richard Laager <rlaager@wiktel.com>
parents:
11424
diff
changeset
|
114 int transport; /* 0 = tcp, 1 = udp */ |
11181 | 115 int fd; |
116 gchar *cseq; | |
117 struct sipmsg *msg; | |
118 TransCallback callback; | |
119 }; | |
120 | |
121 #endif /* _GAIM_SIMPLE_H */ |