# HG changeset patch # User Christian Hammond # Date 1048456814 0 # Node ID 249382064693c494b05849f7f8a4c3fda59b3f77 # Parent 9567b13d0e984b40fc10b62ad49d95afd12cb8bf [gaim-migrate @ 5207] s/plugin_//g committer: Tailor Script diff -r 9567b13d0e98 -r 249382064693 src/conversation.c --- a/src/conversation.c Sun Mar 23 21:56:18 2003 +0000 +++ b/src/conversation.c Sun Mar 23 22:00:14 2003 +0000 @@ -874,7 +874,7 @@ conv->title = g_strdup(name); conv->send_history = g_list_append(NULL, NULL); conv->history = g_string_new(""); - conv->plugin_data = g_hash_table_new_full(g_str_hash, g_str_equal, + conv->data = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL); if (type == GAIM_CONV_IM) @@ -1041,7 +1041,7 @@ chats = g_list_remove(chats, conv); } - g_hash_table_destroy(conv->plugin_data); + g_hash_table_destroy(conv->data); if (win != NULL) { gaim_window_remove_conversation(win, @@ -1313,23 +1313,22 @@ } void -gaim_conversation_set_plugin_data(struct gaim_conversation *conv, - const char *key, gpointer data) +gaim_conversation_set_data(struct gaim_conversation *conv, const char *key, + gpointer data) { if (conv == NULL || key == NULL) return; - g_hash_table_replace(conv->plugin_data, g_strdup(key), data); + g_hash_table_replace(conv->data, g_strdup(key), data); } gpointer -gaim_conversation_get_plugin_data(struct gaim_conversation *conv, - const char *key) +gaim_conversation_get_data(struct gaim_conversation *conv, const char *key) { if (conv == NULL || key == NULL) return NULL; - return g_hash_table_lookup(conv->plugin_data, key); + return g_hash_table_lookup(conv->data, key); } GList * diff -r 9567b13d0e98 -r 249382064693 src/conversation.h --- a/src/conversation.h Sun Mar 23 21:56:18 2003 +0000 +++ b/src/conversation.h Sun Mar 23 22:00:14 2003 +0000 @@ -223,7 +223,7 @@ struct gaim_conversation_ui_ops *ui_ops; /**< UI-specific operations. */ void *ui_data; /**< UI-specific data. */ - GHashTable *plugin_data; /**< Plugin-specific data. */ + GHashTable *data; /**< Plugin-specific data. */ }; typedef void (*gaim_conv_placement_fnc)(struct gaim_conversation *); @@ -655,28 +655,25 @@ #define GAIM_CHAT(c) (gaim_conversation_get_chat_data(c)) /** - * Sets a conversation's plugin-specific data. + * Sets extra data for a conversation. * - * To minimize key conflicts, the key should be in the form of - * @c pluginname/keyname. - * * @param conv The conversation. * @param key The unique key. * @param data The data to assign. */ -void gaim_conversation_set_plugin_data(struct gaim_conversation *conv, - const char *key, gpointer data); +void gaim_conversation_set_data(struct gaim_conversation *conv, + const char *key, gpointer data); /** - * Returns a conversation's plugin-specific data. + * Returns extra data in a conversation. * * @param conv The conversation. * @param key The unqiue key. * * @return The data associated with the key. */ -gpointer gaim_conversation_get_plugin_data(struct gaim_conversation *conv, - const char *key); +gpointer gaim_conversation_get_data(struct gaim_conversation *conv, + const char *key); /** * Returns a list of all conversations.