X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=src%2Fplugin.h;h=9f2d77154c135037f3107e79f9d92be41849ee10;hb=386ea7f72f2e08d037111bdb6272d91e7bba6ef3;hp=6681efdbda86e55ea1a2d5582a6ca56ab81a67c8;hpb=e67ad30e9bea8ce099b4a6311cf2b20ce6d86263;p=ncmpc.git diff --git a/src/plugin.h b/src/plugin.h index 6681efd..9f2d771 100644 --- a/src/plugin.h +++ b/src/plugin.h @@ -1,21 +1,21 @@ /* ncmpc (Ncurses MPD Client) - * (c) 2004-2009 The Music Player Daemon Project + * (c) 2004-2017 The Music Player Daemon Project * Project homepage: http://musicpd.org - + * * 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 02110-1301 USA. -*/ + */ #ifndef PLUGIN_H #define PLUGIN_H @@ -34,10 +34,16 @@ struct plugin_list { * When a plugin cycle is finished, this function is called. In any * case, plugin_stop() has to be called to free all memory. * - * @param result the plugin's output (stdout) on success; NULL on failure + * @param result the plugin's output (stdout) on success; summary of all error + * messages on failure as determined by success + * @param success result of the plugin cycle; true if result is meaningful + * output, false if result contains error messages + * @param plugin_name the name of the plugin which succeeded; becomes invalid + * when plugin_stop is called (i.e. strdup it if you need it afterwards). * @param data the caller defined pointer passed to plugin_run() */ -typedef void (*plugin_callback_t)(const GString *result, void *data); +typedef void (*plugin_callback_t)(const GString *result, const bool success, + const char *plugin_name, void *data); /** * This object represents a cycle through all available plugins, until