Mercurial > pidgin.yaz
comparison libpurple/plugins/ipc-test-server.c @ 15823:32c366eeeb99
sed -ie 's/gaim/purple/g'
| author | Sean Egan <seanegan@gmail.com> |
|---|---|
| date | Mon, 19 Mar 2007 07:01:17 +0000 |
| parents | 5fe8042783c1 |
| children | 44b4e8bd759b |
comparison
equal
deleted
inserted
replaced
| 15822:84b0f9b23ede | 15823:32c366eeeb99 |
|---|---|
| 26 #include "version.h" | 26 #include "version.h" |
| 27 | 27 |
| 28 static int | 28 static int |
| 29 add_func(int i1, int i2) | 29 add_func(int i1, int i2) |
| 30 { | 30 { |
| 31 gaim_debug_misc("ipc-test-server", "Got %d, %d, returning %d\n", | 31 purple_debug_misc("ipc-test-server", "Got %d, %d, returning %d\n", |
| 32 i1, i2, i1 + i2); | 32 i1, i2, i1 + i2); |
| 33 return i1 + i2; | 33 return i1 + i2; |
| 34 } | 34 } |
| 35 | 35 |
| 36 static int | 36 static int |
| 37 sub_func(int i1, int i2) | 37 sub_func(int i1, int i2) |
| 38 { | 38 { |
| 39 gaim_debug_misc("ipc-test-server", "Got %d, %d, returning %d\n", | 39 purple_debug_misc("ipc-test-server", "Got %d, %d, returning %d\n", |
| 40 i1, i2, i1 - i2); | 40 i1, i2, i1 - i2); |
| 41 return i1 - i2; | 41 return i1 - i2; |
| 42 } | 42 } |
| 43 | 43 |
| 44 static gboolean | 44 static gboolean |
| 45 plugin_load(GaimPlugin *plugin) | 45 plugin_load(PurplePlugin *plugin) |
| 46 { | 46 { |
| 47 gaim_plugin_ipc_register(plugin, "add", GAIM_CALLBACK(add_func), | 47 purple_plugin_ipc_register(plugin, "add", PURPLE_CALLBACK(add_func), |
| 48 gaim_marshal_INT__INT_INT, | 48 purple_marshal_INT__INT_INT, |
| 49 gaim_value_new(GAIM_TYPE_INT), 2, | 49 purple_value_new(PURPLE_TYPE_INT), 2, |
| 50 gaim_value_new(GAIM_TYPE_INT), | 50 purple_value_new(PURPLE_TYPE_INT), |
| 51 gaim_value_new(GAIM_TYPE_INT)); | 51 purple_value_new(PURPLE_TYPE_INT)); |
| 52 | 52 |
| 53 gaim_plugin_ipc_register(plugin, "sub", GAIM_CALLBACK(sub_func), | 53 purple_plugin_ipc_register(plugin, "sub", PURPLE_CALLBACK(sub_func), |
| 54 gaim_marshal_INT__INT_INT, | 54 purple_marshal_INT__INT_INT, |
| 55 gaim_value_new(GAIM_TYPE_INT), 2, | 55 purple_value_new(PURPLE_TYPE_INT), 2, |
| 56 gaim_value_new(GAIM_TYPE_INT), | 56 purple_value_new(PURPLE_TYPE_INT), |
| 57 gaim_value_new(GAIM_TYPE_INT)); | 57 purple_value_new(PURPLE_TYPE_INT)); |
| 58 | 58 |
| 59 return TRUE; | 59 return TRUE; |
| 60 } | 60 } |
| 61 | 61 |
| 62 static GaimPluginInfo info = | 62 static PurplePluginInfo info = |
| 63 { | 63 { |
| 64 GAIM_PLUGIN_MAGIC, | 64 PURPLE_PLUGIN_MAGIC, |
| 65 GAIM_MAJOR_VERSION, | 65 PURPLE_MAJOR_VERSION, |
| 66 GAIM_MINOR_VERSION, | 66 PURPLE_MINOR_VERSION, |
| 67 GAIM_PLUGIN_STANDARD, /**< type */ | 67 PURPLE_PLUGIN_STANDARD, /**< type */ |
| 68 NULL, /**< ui_requirement */ | 68 NULL, /**< ui_requirement */ |
| 69 0, /**< flags */ | 69 0, /**< flags */ |
| 70 NULL, /**< dependencies */ | 70 NULL, /**< dependencies */ |
| 71 GAIM_PRIORITY_DEFAULT, /**< priority */ | 71 PURPLE_PRIORITY_DEFAULT, /**< priority */ |
| 72 | 72 |
| 73 IPC_TEST_SERVER_PLUGIN_ID, /**< id */ | 73 IPC_TEST_SERVER_PLUGIN_ID, /**< id */ |
| 74 N_("IPC Test Server"), /**< name */ | 74 N_("IPC Test Server"), /**< name */ |
| 75 VERSION, /**< version */ | 75 VERSION, /**< version */ |
| 76 /** summary */ | 76 /** summary */ |
| 77 N_("Test plugin IPC support, as a server."), | 77 N_("Test plugin IPC support, as a server."), |
| 78 /** description */ | 78 /** description */ |
| 79 N_("Test plugin IPC support, as a server. This registers the IPC " | 79 N_("Test plugin IPC support, as a server. This registers the IPC " |
| 80 "commands."), | 80 "commands."), |
| 81 "Christian Hammond <chipx86@gnupdate.org>", /**< author */ | 81 "Christian Hammond <chipx86@gnupdate.org>", /**< author */ |
| 82 GAIM_WEBSITE, /**< homepage */ | 82 PURPLE_WEBSITE, /**< homepage */ |
| 83 | 83 |
| 84 plugin_load, /**< load */ | 84 plugin_load, /**< load */ |
| 85 NULL, /**< unload */ | 85 NULL, /**< unload */ |
| 86 NULL, /**< destroy */ | 86 NULL, /**< destroy */ |
| 87 | 87 |
| 90 NULL, | 90 NULL, |
| 91 NULL | 91 NULL |
| 92 }; | 92 }; |
| 93 | 93 |
| 94 static void | 94 static void |
| 95 init_plugin(GaimPlugin *plugin) | 95 init_plugin(PurplePlugin *plugin) |
| 96 { | 96 { |
| 97 } | 97 } |
| 98 | 98 |
| 99 GAIM_INIT_PLUGIN(ipctestserver, init_plugin, info) | 99 PURPLE_INIT_PLUGIN(ipctestserver, init_plugin, info) |
