]> sjero.net Git - linphone/blob - tools/lpc2xml.h
Update ms2
[linphone] / tools / lpc2xml.h
1 /*
2 linphone
3 Copyright (C) 2012 Belledonne Communications SARL
4
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
18 */
19
20 #ifndef LPC2XML_H_
21 #define LPC2XML_H_
22
23 #include "lpconfig.h"
24
25 typedef struct _lpc2xml_context lpc2xml_context;
26
27 typedef enum _lpc2xml_log_level {
28         LPC2XML_DEBUG = 0,
29         LPC2XML_MESSAGE,
30         LPC2XML_WARNING,
31         LPC2XML_ERROR
32 } lpc2xml_log_level;
33
34 typedef void(*lpc2xml_function)(void *ctx, lpc2xml_log_level level, const char *fmt, va_list list);
35
36 lpc2xml_context* lpc2xml_context_new(lpc2xml_function cbf, void *ctx);
37 void lpc2xml_context_destroy(lpc2xml_context*);
38
39 int lpc2xml_set_lpc(lpc2xml_context* context, const LpConfig *lpc);
40
41 int lpc2xml_convert_file(lpc2xml_context* context, const char *filename);
42 int lpc2xml_convert_fd(lpc2xml_context* context, int fd);
43 int lpc2xml_convert_string(lpc2xml_context* context, char **content);
44
45
46 #endif //LPC2XML_H_