* Pidgin is the legal property of its developers, whose names are too numerous * to list here. Please refer to the COPYRIGHT file distributed with this * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA #define PREF_ROOT "/plugins" #define PREF_TEST "/plugins/tests" #define PREF_PREFIX "/plugins/tests/request-input" #define PREF_SINGLE PREF_PREFIX "/single" #define PREF_MULTIPLE PREF_PREFIX "/multiple" #define PREF_HTML PREF_PREFIX "/html" plugin_input_callback(const gchar *pref, const gchar *text) { purple_prefs_set_string(pref, text); plugin_input_single(PurplePluginAction *action) { _("Test request input single"), _("Test request input single"), purple_prefs_get_string(PREF_SINGLE), PURPLE_CALLBACK(plugin_input_callback), purple_request_cpar_new(), plugin_input_multiple(PurplePluginAction *action) { _("Test request input multiple"), _("Test request input multiple"), purple_prefs_get_string(PREF_MULTIPLE), PURPLE_CALLBACK(plugin_input_callback), purple_request_cpar_new(), plugin_input_html(PurplePluginAction *action) { _("Test request input HTML"), _("Test request input HTML"), purple_prefs_get_string(PREF_HTML), PURPLE_CALLBACK(plugin_input_callback), purple_request_cpar_new(), plugin_actions(PurplePlugin *plugin) { PurplePluginAction *action = NULL; action = purple_plugin_action_new(_("Input single"), plugin_input_single); l = g_list_append(l, action); action = purple_plugin_action_new(_("Input multiple"), plugin_input_multiple); l = g_list_append(l, action); action = purple_plugin_action_new(_("Input html"), plugin_input_html); l = g_list_append(l, action); static PurplePluginInfo * plugin_query(GError **error) { const gchar * const authors[] = { "Gary Kramlich <grim@reaperworld.com>", return purple_plugin_info_new( "id", "core-test_request_input", "name", N_("Test: request input"), "version", DISPLAY_VERSION, "category", N_("Testing"), "summary", N_("Test Request Input"), "description", N_("This plugin adds actions to test purple_request_input"), "website", "https://pidgin.im", "abi-version", PURPLE_ABI_VERSION, "actions-cb", plugin_actions, plugin_load(PurplePlugin *plugin, GError **error) { purple_prefs_add_none(PREF_ROOT); purple_prefs_add_none(PREF_TEST); purple_prefs_add_none(PREF_PREFIX); purple_prefs_add_string(PREF_SINGLE, ""); purple_prefs_add_string(PREF_MULTIPLE, ""); purple_prefs_add_string(PREF_HTML, ""); plugin_unload(PurplePlugin *plugin, GError **error) { PURPLE_PLUGIN_INIT(test_request_input, plugin_query, plugin_load, plugin_unload);