6 * Copyright (C) 2008 Novell, Inc.
7 * Copyright (C) 2005, Thomas Butter <butter@uni-mannheim.de>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24 #ifndef _PURPLE_SIPMSG_H
25 #define _PURPLE_SIPMSG_H
30 int response
; /* 0 means request, otherwise response code */
42 struct siphdrelement
{
47 static gchar
* empty_string
= "";
49 struct sipmsg
*sipmsg_parse_msg(const gchar
*msg
);
50 struct sipmsg
*sipmsg_parse_header(const gchar
*header
);
51 void sipmsg_add_header(struct sipmsg
*msg
, const gchar
*name
, const gchar
*value
);
52 void sipmsg_add_header_pos(struct sipmsg
*msg
, const gchar
*name
, const gchar
*value
, int pos
);
53 void sipmsg_free(struct sipmsg
*msg
);
54 gchar
*sipmsg_find_header(struct sipmsg
*msg
, const gchar
*name
);
55 gchar
* sipmsg_find_part_of_header(const char *hdr
, const char * before
, const char * after
, const char * def
);
56 gchar
*sipmsg_find_auth_header(struct sipmsg
*msg
, const gchar
*name
);
57 void sipmsg_remove_header(struct sipmsg
*msg
, const gchar
*name
);
58 void sipmsg_print(const struct sipmsg
*msg
);
59 char *sipmsg_to_string(const struct sipmsg
*msg
);
60 #endif /* _PURPLE_SIPMSG_H */