annotate src/protocols/zephyr/init_et.c @ 9478:0efa260e384f

[gaim-migrate @ 10303] " This patch adds the following features for zephyr, in order of usefulness :-) Protocol action (Retrieve subscriptions from server) to list user's subscriptions (chats) in a popup window. Typing notification - (both sending and receiving -- using zephyrs with opcode ping). Correct interpretation of %host% and %canon% entries in .zephyr.subs . These are often used to subscribe to system messages concerning a specific machine (by hostname and canonical hostname, respectively). An updated .todo list." --Arun A Tharuvai committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Wed, 07 Jul 2004 21:56:57 +0000
parents 43dec50d8d51
children 64895571248f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
1 /*
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
2 * $Header$
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
3 * $Source$
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
4 * $Locker$
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
5 *
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
6 * Copyright 1986, 1987, 1988 by MIT Information Systems and
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
7 * the MIT Student Information Processing Board.
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
8 *
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
9 * For copyright info, see mit-sipb-copyright.h.
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
10 */
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
11
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
12 #include <sysdep.h>
8354
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
13 /* #include "error_table.h" */
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
14 #include "mit-sipb-copyright.h"
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
15
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
16 #ifndef lint
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
17 static const char rcsid_init_et_c[] =
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
18 "$Header$";
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
19 #endif
8354
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
20 /*
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
21 struct foobar {
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
22 struct et_list etl;
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
23 struct error_table et;
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
24 };
8354
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
25 */
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
26 extern struct et_list * _et_list;
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
27
8354
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
28 /* int init_error_table(msgs, base, count) */
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
29 /* const char * const * msgs; */
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
30 /* int base; */
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
31 /* int count; */
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
32 /* { */
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
33 /* struct foobar * new_et; */
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
34
8354
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
35 /* if (!base || !count || !msgs) */
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
36 /* return 0; */
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
37
8354
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
38 /* new_et = (struct foobar *) malloc(sizeof(struct foobar)); */
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
39 /* if (!new_et) */
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
40 /* return errno; /\* oops *\/ */
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
41 /* new_et->etl.table = &new_et->et; */
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
42 /* new_et->et.msgs = msgs; */
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
43 /* new_et->et.base = base; */
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
44 /* new_et->et.n_msgs= count; */
2086
424a40f12a6c [gaim-migrate @ 2096]
Eric Warmenhoven <eric@warmenhoven.org>
parents:
diff changeset
45
8354
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
46 /* new_et->etl.next = _et_list; */
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
47 /* _et_list = &new_et->etl; */
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
48 /* return 0; */
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
49 /* } */
43dec50d8d51 [gaim-migrate @ 9078]
Luke Schierer <lschiere@pidgin.im>
parents: 2086
diff changeset
50