Mercurial > pidgin
annotate src/protocols/simple/simple.h @ 14069:d594f0466585
[gaim-migrate @ 16690]
Fix CID 221
I also fixed an imperial ton of leaks. It was quite amazing, actually.
There is also some other cleanup stuff in here too.
committer: Tailor Script <tailor@pidgin.im>
| author | Daniel Atallah <daniel.atallah@gmail.com> |
|---|---|
| date | Thu, 10 Aug 2006 23:42:17 +0000 |
| parents | 614c56622453 |
| children |
| 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 |
| 13951 | 29 #include "cipher.h" |
| 30 #include "circbuffer.h" | |
| 31 #include "prpl.h" | |
|
12382
cfc808463763
[gaim-migrate @ 14688]
Richard Laager <rlaager@wiktel.com>
parents:
12196
diff
changeset
|
32 |
| 11181 | 33 #include "sipmsg.h" |
| 34 | |
| 35 #define SIMPLE_BUF_INC 1024 | |
| 36 | |
| 37 struct sip_dialog { | |
| 38 gchar *ourtag; | |
| 39 gchar *theirtag; | |
| 40 gchar *callid; | |
| 41 }; | |
| 42 | |
| 43 struct simple_watcher { | |
| 44 gchar *name; | |
| 45 time_t expire; | |
| 46 struct sip_dialog dialog; | |
|
14069
d594f0466585
[gaim-migrate @ 16690]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
13951
diff
changeset
|
47 gboolean needsxpidf; |
| 11181 | 48 }; |
| 49 | |
| 50 struct simple_buddy { | |
| 51 gchar *name; | |
| 52 time_t resubscribe; | |
| 53 }; | |
| 54 | |
| 55 struct sip_auth { | |
| 11346 | 56 int type; /* 1 = Digest / 2 = NTLM */ |
|
12382
cfc808463763
[gaim-migrate @ 14688]
Richard Laager <rlaager@wiktel.com>
parents:
12196
diff
changeset
|
57 gchar *nonce; |
| 13084 | 58 gchar *opaque; |
|
12382
cfc808463763
[gaim-migrate @ 14688]
Richard Laager <rlaager@wiktel.com>
parents:
12196
diff
changeset
|
59 gchar *realm; |
| 11424 | 60 gchar *target; |
| 13084 | 61 guint32 flags; |
| 11181 | 62 int nc; |
|
12382
cfc808463763
[gaim-migrate @ 14688]
Richard Laager <rlaager@wiktel.com>
parents:
12196
diff
changeset
|
63 gchar *digest_session_key; |
| 11346 | 64 int retries; |
| 11181 | 65 }; |
| 66 | |
| 67 struct simple_account_data { | |
| 68 GaimConnection *gc; | |
| 69 gchar *servername; | |
| 70 gchar *username; | |
| 71 gchar *password; | |
| 72 int fd; | |
| 73 int cseq; | |
| 74 time_t reregister; | |
| 75 time_t republish; | |
|
11829
4669e7461968
[gaim-migrate @ 14120]
Richard Laager <rlaager@wiktel.com>
parents:
11424
diff
changeset
|
76 int registerstatus; /* 0 nothing, 1 first registration send, 2 auth received, 3 registered */ |
| 11181 | 77 struct sip_auth registrar; |
| 78 struct sip_auth proxy; | |
| 79 int listenfd; | |
| 80 int listenport; | |
| 11409 | 81 int listenpa; |
| 11181 | 82 gchar *status; |
| 83 GHashTable *buddies; | |
| 84 guint registertimeout; | |
| 11194 | 85 guint resendtimeout; |
|
13058
256abf4dd912
[gaim-migrate @ 15420]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
12760
diff
changeset
|
86 gboolean connecting; |
| 11181 | 87 GaimAccount *account; |
|
13200
33bef17125c2
[gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
13177
diff
changeset
|
88 GaimCircBuffer *txbuf; |
|
33bef17125c2
[gaim-migrate @ 15563]
Daniel Atallah <daniel.atallah@gmail.com>
parents:
13177
diff
changeset
|
89 guint tx_handler; |
| 12196 | 90 gchar *regcallid; |
| 11181 | 91 GSList *transactions; |
| 92 GSList *watcher; | |
| 93 GSList *openconns; | |
| 11189 | 94 gboolean udp; |
| 95 struct sockaddr_in serveraddr; | |
| 11194 | 96 int registerexpire; |
| 11383 | 97 gchar *realhostname; |
| 98 int realport; /* port and hostname from SRV record */ | |
| 11181 | 99 }; |
| 100 | |
| 101 struct sip_connection { | |
| 102 int fd; | |
| 103 gchar *inbuf; | |
| 104 int inbuflen; | |
| 105 int inbufused; | |
| 106 int inputhandler; | |
| 107 }; | |
| 108 | |
| 109 struct transaction; | |
| 110 | |
| 111 typedef gboolean (*TransCallback) (struct simple_account_data *, struct sipmsg *, struct transaction *); | |
| 112 | |
| 113 struct transaction { | |
| 114 time_t time; | |
| 115 int retries; | |
|
11829
4669e7461968
[gaim-migrate @ 14120]
Richard Laager <rlaager@wiktel.com>
parents:
11424
diff
changeset
|
116 int transport; /* 0 = tcp, 1 = udp */ |
| 11181 | 117 int fd; |
| 118 gchar *cseq; | |
| 119 struct sipmsg *msg; | |
| 120 TransCallback callback; | |
| 121 }; | |
| 122 | |
| 123 #endif /* _GAIM_SIMPLE_H */ |
