2 * IPC test server plugin.
4 * Copyright (C) 2003 Christian Hammond.
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.
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.
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., 51 Franklin Street, Fifth Floor, Boston, MA
21 #define IPC_TEST_SERVER_PLUGIN_ID "core-ipc-test-server"
29 add_func(int i1
, int i2
)
31 purple_debug_misc("ipc-test-server", "Got %d, %d, returning %d\n",
37 sub_func(int i1
, int i2
)
39 purple_debug_misc("ipc-test-server", "Got %d, %d, returning %d\n",
45 plugin_load(PurplePlugin
*plugin
)
47 purple_plugin_ipc_register(plugin
, "add", PURPLE_CALLBACK(add_func
),
48 purple_marshal_INT__INT_INT
,
49 purple_value_new(PURPLE_TYPE_INT
), 2,
50 purple_value_new(PURPLE_TYPE_INT
),
51 purple_value_new(PURPLE_TYPE_INT
));
53 purple_plugin_ipc_register(plugin
, "sub", PURPLE_CALLBACK(sub_func
),
54 purple_marshal_INT__INT_INT
,
55 purple_value_new(PURPLE_TYPE_INT
), 2,
56 purple_value_new(PURPLE_TYPE_INT
),
57 purple_value_new(PURPLE_TYPE_INT
));
62 static PurplePluginInfo info
=
67 PURPLE_PLUGIN_STANDARD
, /**< type */
68 NULL
, /**< ui_requirement */
70 NULL
, /**< dependencies */
71 PURPLE_PRIORITY_DEFAULT
, /**< priority */
73 IPC_TEST_SERVER_PLUGIN_ID
, /**< id */
74 N_("IPC Test Server"), /**< name */
75 DISPLAY_VERSION
, /**< version */
77 N_("Test plugin IPC support, as a server."),
79 N_("Test plugin IPC support, as a server. This registers the IPC "
81 "Christian Hammond <chipx86@gnupdate.org>", /**< author */
82 PURPLE_WEBSITE
, /**< homepage */
84 plugin_load
, /**< load */
89 NULL
, /**< extra_info */
95 init_plugin(PurplePlugin
*plugin
)
99 PURPLE_INIT_PLUGIN(ipctestserver
, init_plugin
, info
)