|
1 |
|
2 /* Copyright 2009,2010 Myhailo Danylenko |
|
3 * |
|
4 * This file is part of mcabber |
|
5 * |
|
6 * mcabber is free software: you can redistribute it and/or modify |
|
7 * it under the terms of the GNU General Public License as published by |
|
8 * the Free Software Foundation, either version 2 of the License, or |
|
9 * (at your option) any later version. |
|
10 * |
|
11 * This program is distributed in the hope that it will be useful, |
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
14 * GNU 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, see <http://www.gnu.org/licenses/>. */ |
|
18 |
|
19 #include <glib.h> |
|
20 #include <gmodule.h> |
|
21 |
|
22 #include <mcabber/fifo.h> |
|
23 #include <mcabber/modules.h> |
|
24 #include <mcabber/config.h> |
|
25 |
|
26 module_info_t info_fifo = { |
|
27 .branch = MCABBER_BRANCH, |
|
28 .api = MCABBER_API_VERSION, |
|
29 .version = MCABBER_VERSION, |
|
30 .requires = NULL, |
|
31 .init = NULL, |
|
32 .uninit = NULL, |
|
33 .description = "Reads and executes command from FIFO pipe\n" |
|
34 "Recognizes options fifo_name (required), fifo_hide_commands and fifo_ignore.", |
|
35 .next = NULL, |
|
36 }; |
|
37 |
|
38 gchar *g_module_check_init(GModule *module) |
|
39 { |
|
40 if (fifo_init() == -1) |
|
41 return "FIFO initialization failed"; |
|
42 else |
|
43 return NULL; |
|
44 } |
|
45 |
|
46 void g_module_unload(GModule *module) |
|
47 { |
|
48 fifo_deinit(); |
|
49 } |
|
50 |
|
51 /* vim: set expandtab cindent cinoptions=>2\:2(0: For Vim users... */ |