Mercurial > pidgin
comparison src/protocols/simple/simple.h @ 11181:e5bbe5070e04
[gaim-migrate @ 13292]
first import sip/simple prpl files.
still buggy and deactivated by default.
committer: Tailor Script <tailor@pidgin.im>
author | Thomas Butter <tbutter> |
---|---|
date | Tue, 02 Aug 2005 20:24:51 +0000 |
parents | |
children | 5f79dfde334c |
comparison
equal
deleted
inserted
replaced
11180:5d103f550f6a | 11181:e5bbe5070e04 |
---|---|
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> | |
28 #include <prpl.h> | |
29 #include <digcalc.h> | |
30 #include "sipmsg.h" | |
31 | |
32 #define SIMPLE_BUF_INC 1024 | |
33 | |
34 struct sip_dialog { | |
35 gchar *ourtag; | |
36 gchar *theirtag; | |
37 gchar *callid; | |
38 }; | |
39 | |
40 struct simple_watcher { | |
41 gchar *name; | |
42 time_t expire; | |
43 struct sip_dialog dialog; | |
44 }; | |
45 | |
46 struct simple_buddy { | |
47 gchar *name; | |
48 time_t resubscribe; | |
49 }; | |
50 | |
51 struct sip_auth { | |
52 gchar *nonce; | |
53 gchar *realm; | |
54 int nc; | |
55 HASHHEX HA1; | |
56 int fouroseven; | |
57 }; | |
58 | |
59 struct simple_account_data { | |
60 GaimConnection *gc; | |
61 gchar *servername; | |
62 gchar *username; | |
63 gchar *password; | |
64 int fd; | |
65 int cseq; | |
66 time_t reregister; | |
67 time_t republish; | |
68 int registerstatus; // 0 nothing, 1 first registration send, 2 auth received, 3 registered | |
69 struct sip_auth registrar; | |
70 struct sip_auth proxy; | |
71 int listenfd; | |
72 int listenport; | |
73 gchar *ip; | |
74 gchar *status; | |
75 GHashTable *buddies; | |
76 guint registertimeout; | |
77 int connecting; | |
78 GaimAccount *account; | |
79 gchar *sendlater; | |
80 GSList *transactions; | |
81 GSList *watcher; | |
82 GSList *openconns; | |
83 }; | |
84 | |
85 struct sip_connection { | |
86 int fd; | |
87 gchar *inbuf; | |
88 int inbuflen; | |
89 int inbufused; | |
90 int inputhandler; | |
91 }; | |
92 | |
93 struct transaction; | |
94 | |
95 typedef gboolean (*TransCallback) (struct simple_account_data *, struct sipmsg *, struct transaction *); | |
96 | |
97 struct transaction { | |
98 time_t time; | |
99 int retries; | |
100 int transport; // 0 = tcp, 1 = udp | |
101 int fd; | |
102 gchar *cseq; | |
103 struct sipmsg *msg; | |
104 TransCallback callback; | |
105 }; | |
106 | |
107 #endif /* _GAIM_SIMPLE_H */ |