Mercurial > pidgin.yaz
annotate plugins/ipc-test-server.c @ 9427:66b3f54527e6
[gaim-migrate @ 10245]
" As discussed on #gaim
(15:02:02) Paco-Paco: the ugliness of this feature
trumps compatability, unless there is some pretty
important functionality to be lost
(15:04:02) aatharuv: Paco-Paco: Because zephyr is a
silly UDP based protocol, and sometimes subscriptions
(chats you've registered for) get lost, and you can
tell a user to a cli tool 'zctl' which will restore the
subs.
(15:04:32) aatharuv: Paco-Paco: Of course, I should
just add this as a protocol option, so users don't have
to do that.
(15:04:39) Paco-Paco: yes
(15:04:50) Paco-Paco: that would be the appropriate answer
(15:06:05) LSchiere: okay, so rather then messing with
anoncvs delays, i'm going to leave this in for now, and
aatharuv can just change to to a account option in place
Okay, here's a patch to reload subscriptions incase the
server loses track of them, as a protocol action. Since
my anoncvs hasn't even gotten the original zephyr patch
yet, you might as well reverse the original patch, and
apply this new one." --Arun A Tharuvai
committer: Tailor Script <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Tue, 29 Jun 2004 20:35:30 +0000 |
parents | 294ae6548d4e |
children | a9fb4493ae22 |
rev | line source |
---|---|
6822 | 1 /* |
2 * IPC test server plugin. | |
3 * | |
4 * Copyright (C) 2003 Christian Hammond. | |
5 * | |
6 * This program is free software; you can redistribute it and/or | |
7 * modify it under the terms of the GNU General Public License as | |
8 * published by the Free Software Foundation; either version 2 of the | |
9 * License, or (at your option) any later version. | |
10 * | |
11 * This program is distributed in the hope that it will be useful, but | |
12 * WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 * General Public License for more details. | |
15 * | |
16 * You should have received a copy of the GNU General Public License | |
17 * along with this program; if not, write to the Free Software | |
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA | |
19 * 02111-1307, USA. | |
20 */ | |
21 #define IPC_TEST_SERVER_PLUGIN_ID "core-ipc-test-server" | |
22 | |
23 #include "internal.h" | |
24 #include "debug.h" | |
25 #include "plugin.h" | |
26 | |
27 static int | |
28 add_func(int i1, int i2) | |
29 { | |
30 gaim_debug_misc("ipc-test-server", "Got %d, %d, returning %d\n", | |
31 i1, i2, i1 + i2); | |
32 return i1 + i2; | |
33 } | |
34 | |
35 static int | |
36 sub_func(int i1, int i2) | |
37 { | |
38 gaim_debug_misc("ipc-test-server", "Got %d, %d, returning %d\n", | |
39 i1, i2, i1 - i2); | |
40 return i1 - i2; | |
41 } | |
42 | |
43 static gboolean | |
44 plugin_load(GaimPlugin *plugin) | |
45 { | |
46 gaim_plugin_ipc_register(plugin, "add", GAIM_CALLBACK(add_func), | |
47 gaim_marshal_INT__INT_INT, | |
48 gaim_value_new(GAIM_TYPE_INT), 2, | |
49 gaim_value_new(GAIM_TYPE_INT), | |
50 gaim_value_new(GAIM_TYPE_INT)); | |
51 | |
52 gaim_plugin_ipc_register(plugin, "sub", GAIM_CALLBACK(sub_func), | |
53 gaim_marshal_INT__INT_INT, | |
54 gaim_value_new(GAIM_TYPE_INT), 2, | |
55 gaim_value_new(GAIM_TYPE_INT), | |
56 gaim_value_new(GAIM_TYPE_INT)); | |
57 | |
58 return TRUE; | |
59 } | |
60 | |
61 static GaimPluginInfo info = | |
62 { | |
8749
d7b8eb1f0a18
[gaim-migrate @ 9504]
Christian Hammond <chipx86@chipx86.com>
parents:
6822
diff
changeset
|
63 GAIM_PLUGIN_API_VERSION, /**< api_version */ |
6822 | 64 GAIM_PLUGIN_STANDARD, /**< type */ |
65 NULL, /**< ui_requirement */ | |
66 0, /**< flags */ | |
67 NULL, /**< dependencies */ | |
68 GAIM_PRIORITY_DEFAULT, /**< priority */ | |
69 | |
70 IPC_TEST_SERVER_PLUGIN_ID, /**< id */ | |
71 N_("IPC Test Server"), /**< name */ | |
72 VERSION, /**< version */ | |
73 /** summary */ | |
74 N_("Test plugin IPC support, as a server."), | |
75 /** description */ | |
76 N_("Test plugin IPC support, as a server. This registers the IPC " | |
77 "commands."), | |
78 "Christian Hammond <chipx86@gnupdate.org>", /**< author */ | |
79 GAIM_WEBSITE, /**< homepage */ | |
80 | |
81 plugin_load, /**< load */ | |
82 NULL, /**< unload */ | |
83 NULL, /**< destroy */ | |
84 | |
85 NULL, /**< ui_info */ | |
8993 | 86 NULL, /**< extra_info */ |
87 NULL, | |
88 NULL | |
6822 | 89 }; |
90 | |
91 static void | |
92 init_plugin(GaimPlugin *plugin) | |
93 { | |
94 } | |
95 | |
96 GAIM_INIT_PLUGIN(ipctestserver, init_plugin, info) |