comparison libpurple/plugins/ipc-test-client.c @ 15822: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
15821:84b0f9b23ede 15822:32c366eeeb99
24 #include "version.h" 24 #include "version.h"
25 25
26 #define IPC_TEST_CLIENT_PLUGIN_ID "core-ipc-test-client" 26 #define IPC_TEST_CLIENT_PLUGIN_ID "core-ipc-test-client"
27 27
28 static gboolean 28 static gboolean
29 plugin_load(GaimPlugin *plugin) 29 plugin_load(PurplePlugin *plugin)
30 { 30 {
31 GaimPlugin *server_plugin; 31 PurplePlugin *server_plugin;
32 gboolean ok; 32 gboolean ok;
33 int result; 33 int result;
34 34
35 server_plugin = gaim_plugins_find_with_id("core-ipc-test-server"); 35 server_plugin = purple_plugins_find_with_id("core-ipc-test-server");
36 36
37 if (server_plugin == NULL) 37 if (server_plugin == NULL)
38 { 38 {
39 gaim_debug_error("ipc-test-client", 39 purple_debug_error("ipc-test-client",
40 "Unable to locate plugin core-ipc-test-server, " 40 "Unable to locate plugin core-ipc-test-server, "
41 "needed for IPC.\n"); 41 "needed for IPC.\n");
42 42
43 return TRUE; 43 return TRUE;
44 } 44 }
45 45
46 result = (int)gaim_plugin_ipc_call(server_plugin, "add", &ok, 36, 6); 46 result = (int)purple_plugin_ipc_call(server_plugin, "add", &ok, 36, 6);
47 47
48 if (!ok) 48 if (!ok)
49 { 49 {
50 gaim_debug_error("ipc-test-client", 50 purple_debug_error("ipc-test-client",
51 "Unable to call IPC function 'add' in " 51 "Unable to call IPC function 'add' in "
52 "core-ipc-test-server plugin."); 52 "core-ipc-test-server plugin.");
53 53
54 return TRUE; 54 return TRUE;
55 } 55 }
56 56
57 gaim_debug_info("ipc-test-client", "36 + 6 = %d\n", result); 57 purple_debug_info("ipc-test-client", "36 + 6 = %d\n", result);
58 58
59 result = (int)gaim_plugin_ipc_call(server_plugin, "sub", &ok, 50, 8); 59 result = (int)purple_plugin_ipc_call(server_plugin, "sub", &ok, 50, 8);
60 60
61 if (!ok) 61 if (!ok)
62 { 62 {
63 gaim_debug_error("ipc-test-client", 63 purple_debug_error("ipc-test-client",
64 "Unable to call IPC function 'sub' in " 64 "Unable to call IPC function 'sub' in "
65 "core-ipc-test-server plugin."); 65 "core-ipc-test-server plugin.");
66 66
67 return TRUE; 67 return TRUE;
68 } 68 }
69 69
70 gaim_debug_info("ipc-test-client", "50 - 8 = %d\n", result); 70 purple_debug_info("ipc-test-client", "50 - 8 = %d\n", result);
71 71
72 return TRUE; 72 return TRUE;
73 } 73 }
74 74
75 static GaimPluginInfo info = 75 static PurplePluginInfo info =
76 { 76 {
77 GAIM_PLUGIN_MAGIC, 77 PURPLE_PLUGIN_MAGIC,
78 GAIM_MAJOR_VERSION, 78 PURPLE_MAJOR_VERSION,
79 GAIM_MINOR_VERSION, 79 PURPLE_MINOR_VERSION,
80 GAIM_PLUGIN_STANDARD, /**< type */ 80 PURPLE_PLUGIN_STANDARD, /**< type */
81 NULL, /**< ui_requirement */ 81 NULL, /**< ui_requirement */
82 0, /**< flags */ 82 0, /**< flags */
83 NULL, /**< dependencies */ 83 NULL, /**< dependencies */
84 GAIM_PRIORITY_DEFAULT, /**< priority */ 84 PURPLE_PRIORITY_DEFAULT, /**< priority */
85 85
86 IPC_TEST_CLIENT_PLUGIN_ID, /**< id */ 86 IPC_TEST_CLIENT_PLUGIN_ID, /**< id */
87 N_("IPC Test Client"), /**< name */ 87 N_("IPC Test Client"), /**< name */
88 VERSION, /**< version */ 88 VERSION, /**< version */
89 /** summary */ 89 /** summary */
90 N_("Test plugin IPC support, as a client."), 90 N_("Test plugin IPC support, as a client."),
91 /** description */ 91 /** description */
92 N_("Test plugin IPC support, as a client. This locates the server " 92 N_("Test plugin IPC support, as a client. This locates the server "
93 "plugin and calls the commands registered."), 93 "plugin and calls the commands registered."),
94 "Christian Hammond <chipx86@gnupdate.org>", /**< author */ 94 "Christian Hammond <chipx86@gnupdate.org>", /**< author */
95 GAIM_WEBSITE, /**< homepage */ 95 PURPLE_WEBSITE, /**< homepage */
96 96
97 plugin_load, /**< load */ 97 plugin_load, /**< load */
98 NULL, /**< unload */ 98 NULL, /**< unload */
99 NULL, /**< destroy */ 99 NULL, /**< destroy */
100 100
103 NULL, 103 NULL,
104 NULL 104 NULL
105 }; 105 };
106 106
107 static void 107 static void
108 init_plugin(GaimPlugin *plugin) 108 init_plugin(PurplePlugin *plugin)
109 { 109 {
110 info.dependencies = g_list_append(info.dependencies, 110 info.dependencies = g_list_append(info.dependencies,
111 "core-ipc-test-server"); 111 "core-ipc-test-server");
112 } 112 }
113 113
114 GAIM_INIT_PLUGIN(ipctestclient, init_plugin, info) 114 PURPLE_INIT_PLUGIN(ipctestclient, init_plugin, info)