Mercurial > ~mikael > mcabber > hg
diff mcabber/modules/fifo/fifo.c @ 2079:8da280d34b48
Rename FIFO module file name
Module: fifo_module.c -> fifo.c
Code: fifo.c -> fifo_internal.c
Previous scheme didn't seem go well along with new autotools since they were
expecting fifo_module.* object files.
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Sun, 29 Sep 2013 14:31:14 +0200 |
parents | mcabber/modules/fifo/fifo_module.c@2256d0626730 |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mcabber/modules/fifo/fifo.c Sun Sep 29 14:31:14 2013 +0200 @@ -0,0 +1,53 @@ +/* + * Module "fifo" -- Reads and executes command from FIFO pipe + * + * Copyright 2009, 2010 Myhailo Danylenko + * + * This file is part of mcabber. + * + * mcabber 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, see <http://www.gnu.org/licenses/>. */ + +#include <glib.h> +#include <gmodule.h> + +#include <mcabber/fifo.h> +#include <mcabber/modules.h> +#include <mcabber/config.h> + +module_info_t info_fifo = { + .branch = MCABBER_BRANCH, + .api = MCABBER_API_VERSION, + .version = MCABBER_VERSION, + .requires = NULL, + .init = NULL, + .uninit = NULL, + .description = "Reads and executes command from FIFO pipe\n" + "Recognizes options fifo_name (required), fifo_hide_commands and fifo_ignore.", + .next = NULL, +}; + +gchar *g_module_check_init(GModule *module) +{ + if (fifo_init() == -1) + return "FIFO initialization failed"; + else + return NULL; +} + +void g_module_unload(GModule *module) +{ + fifo_deinit(); +} + +/* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */