| 1 | /* |
| 2 | * Copyright (C) 2007 Colin DIDIER |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 2 as |
| 6 | * published by the Free Software Foundation. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | * |
| 13 | * You should have received a copy of the GNU General Public License along |
| 14 | * with this program; if not, write to the Free Software Foundation, Inc., |
| 15 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. |
| 16 | */ |
| 17 | |
| 18 | #include "module.h" |
| 19 | #include "formats.h" |
| 20 | #include "signals.h" |
| 21 | |
| 22 | static void |
| 23 | sig_strip_codes(const char *in, const char **out) |
| 24 | { |
| 25 | if (out != NULL) |
| 26 | *out = strip_codes(in); |
| 27 | } |
| 28 | |
| 29 | void |
| 30 | xmpp_formats_init(void) |
| 31 | { |
| 32 | signal_add("xmpp formats strip codes", sig_strip_codes); |
| 33 | } |
| 34 | |
| 35 | void |
| 36 | xmpp_formats_deinit(void) |
| 37 | { |
| 38 | signal_remove("xmpp formats strip codes", sig_strip_codes); |
| 39 | } |