Mercurial > pidgin
annotate plugins/ipc-test-client.c @ 8866:c2dff943e240
[gaim-migrate @ 9634]
(14:10:22) Faceprint: the timestamp plugin will now mislead users
(14:10:54) Me: which way does ichat behave?
(14:10:58) Me: i think the new way
(14:11:05) Me: but its been some time since i've seen it
(14:11:09) Faceprint: i don't know or care, the new behavior will confuse
the hell out of people
(14:11:22) Faceprint: lets say we have a conversation
(14:11:25) Faceprint: 2:00 gets printed by the plugin
(14:11:36) Faceprint: then we say nothing for 3 hours
(14:11:42) Faceprint: and then one of us says something
(14:12:04) Faceprint: that will be printed, and then as many as 5 minutes
later, the plugin will print 5:05
(14:12:23) Me: yes yes yes, i see both sides of this one. i tend to think
the new behavior is better, but i'll revert it
(14:12:36) Faceprint: since "normal" timestamps are turned off, it appears
as though what was just said was said around 2
(14:12:43) Faceprint: no, don't revert, fix
(14:12:53) Faceprint: preferably, make the patch writer fix
(14:12:57) Me: *nods*
(14:13:06) Me: which requires reverting since otherwise he won't be
motivated
(14:13:13) Faceprint: if something is said and we've gone more than 5 min
w/o printing a timestamp, print a timestamp before writing to the conv
committer: Tailor Script <tailor@pidgin.im>
| author | Luke Schierer <lschiere@pidgin.im> |
|---|---|
| date | Mon, 03 May 2004 18:13:39 +0000 |
| parents | d7b8eb1f0a18 |
| children | 294ae6548d4e |
| rev | line source |
|---|---|
| 6822 | 1 /* |
| 2 * IPC test client 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 #include "internal.h" | |
| 22 #include "debug.h" | |
| 23 #include "plugin.h" | |
| 24 | |
| 25 #define IPC_TEST_CLIENT_PLUGIN_ID "core-ipc-test-client" | |
| 26 | |
| 27 static gboolean | |
| 28 plugin_load(GaimPlugin *plugin) | |
| 29 { | |
| 30 GaimPlugin *server_plugin; | |
| 31 gboolean ok; | |
| 32 int result; | |
| 33 | |
| 34 server_plugin = gaim_plugins_find_with_id("core-ipc-test-server"); | |
| 35 | |
| 36 if (server_plugin == NULL) | |
| 37 { | |
| 38 gaim_debug_error("ipc-test-client", | |
| 39 "Unable to locate plugin core-ipc-test-server, " | |
| 40 "needed for IPC.\n"); | |
| 41 | |
| 42 return TRUE; | |
| 43 } | |
| 44 | |
| 45 result = (int)gaim_plugin_ipc_call(server_plugin, "add", &ok, 36, 6); | |
| 46 | |
| 47 if (!ok) | |
| 48 { | |
| 49 gaim_debug_error("ipc-test-client", | |
| 50 "Unable to call IPC function 'add' in " | |
| 51 "core-ipc-test-server plugin."); | |
| 52 | |
| 53 return TRUE; | |
| 54 } | |
| 55 | |
| 56 gaim_debug_info("ipc-test-client", "36 + 6 = %d\n", result); | |
| 57 | |
| 58 result = (int)gaim_plugin_ipc_call(server_plugin, "sub", &ok, 50, 8); | |
| 59 | |
| 60 if (!ok) | |
| 61 { | |
| 62 gaim_debug_error("ipc-test-client", | |
| 63 "Unable to call IPC function 'sub' in " | |
| 64 "core-ipc-test-server plugin."); | |
| 65 | |
| 66 return TRUE; | |
| 67 } | |
| 68 | |
| 69 gaim_debug_info("ipc-test-client", "50 - 8 = %d\n", result); | |
| 70 | |
| 71 return TRUE; | |
| 72 } | |
| 73 | |
| 74 static GaimPluginInfo info = | |
| 75 { | |
|
8749
d7b8eb1f0a18
[gaim-migrate @ 9504]
Christian Hammond <chipx86@chipx86.com>
parents:
6822
diff
changeset
|
76 GAIM_PLUGIN_API_VERSION, /**< api_version */ |
| 6822 | 77 GAIM_PLUGIN_STANDARD, /**< type */ |
| 78 NULL, /**< ui_requirement */ | |
| 79 0, /**< flags */ | |
| 80 NULL, /**< dependencies */ | |
| 81 GAIM_PRIORITY_DEFAULT, /**< priority */ | |
| 82 | |
| 83 IPC_TEST_CLIENT_PLUGIN_ID, /**< id */ | |
| 84 N_("IPC Test Client"), /**< name */ | |
| 85 VERSION, /**< version */ | |
| 86 /** summary */ | |
| 87 N_("Test plugin IPC support, as a client."), | |
| 88 /** description */ | |
| 89 N_("Test plugin IPC support, as a client. This locates the server " | |
| 90 "plugin and calls the commands registered."), | |
| 91 "Christian Hammond <chipx86@gnupdate.org>", /**< author */ | |
| 92 GAIM_WEBSITE, /**< homepage */ | |
| 93 | |
| 94 plugin_load, /**< load */ | |
| 95 NULL, /**< unload */ | |
| 96 NULL, /**< destroy */ | |
| 97 | |
| 98 NULL, /**< ui_info */ | |
| 99 NULL /**< extra_info */ | |
| 100 }; | |
| 101 | |
| 102 static void | |
| 103 init_plugin(GaimPlugin *plugin) | |
| 104 { | |
| 105 info.dependencies = g_list_append(info.dependencies, | |
| 106 "core-ipc-test-server"); | |
| 107 } | |
| 108 | |
| 109 GAIM_INIT_PLUGIN(ipctestclient, init_plugin, info) |
