/src/opensips/strcommon.h
Line | Count | Source (jump to first uncovered line) |
1 | | /* |
2 | | * Copyright (C) 2007 voice-system.ro |
3 | | * |
4 | | * This file is part of opensips, a free SIP server. |
5 | | * |
6 | | * opensips 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 | | * opensips 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, write to the Free Software |
18 | | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
19 | | * |
20 | | */ |
21 | | /*! |
22 | | * \file |
23 | | * \brief Common string handling functions |
24 | | */ |
25 | | |
26 | | #ifndef _STRCOMMON_H_ |
27 | | #define _STRCOMMON_H_ |
28 | | |
29 | | #include "str.h" |
30 | | #include "md5.h" |
31 | | #include "crc.h" |
32 | | #include "lib/str2const.h" |
33 | | |
34 | | /* |
35 | | * add backslashes to special characters |
36 | | */ |
37 | | int escape_common(char *dst, const char *src, int src_len); |
38 | | /* |
39 | | * remove backslashes to special characters |
40 | | */ |
41 | | int unescape_common(char *dst, const char *src, int src_len); |
42 | | |
43 | | int unescape_xml(char *dst, const char *src, int src_len); |
44 | | |
45 | | void compute_md5(char *dst, const char *src, int src_len); |
46 | | |
47 | | int _escape_user(const str_const *sin, str *sout); |
48 | 0 | static inline int _escape_userSS(const str *sin, str *sout){return _escape_user(str2const(sin), sout);} Unexecuted instantiation: parse_uri.c:_escape_userSS Unexecuted instantiation: strcommon.c:_escape_userSS Unexecuted instantiation: transformations.c:_escape_userSS |
49 | | |
50 | | int _unescape_user(const str_const *sin, str *sout); |
51 | 0 | static inline int _unescape_userSS(const str *sin, str *sout){return _unescape_user(str2const(sin), sout);} Unexecuted instantiation: parse_uri.c:_unescape_userSS Unexecuted instantiation: strcommon.c:_unescape_userSS Unexecuted instantiation: transformations.c:_unescape_userSS |
52 | | |
53 | | int _escape_param(const str_const *sin, str *sout); |
54 | 0 | static inline int _escape_paramSS(const str *sin, str *sout){return _escape_param(str2const(sin), sout);} Unexecuted instantiation: parse_uri.c:_escape_paramSS Unexecuted instantiation: strcommon.c:_escape_paramSS Unexecuted instantiation: transformations.c:_escape_paramSS |
55 | | |
56 | | int _unescape_param(const str_const *sin, str *sout); |
57 | 0 | static inline int _unescape_paramSS(const str *sin, str *sout){return _unescape_param(str2const(sin), sout);} Unexecuted instantiation: parse_uri.c:_unescape_paramSS Unexecuted instantiation: strcommon.c:_unescape_paramSS Unexecuted instantiation: transformations.c:_unescape_paramSS |
58 | | |
59 | | #endif |