Tue, 19 May 2020 10:29:23 +0000
Merged in default (pull request #697)
simple: Fix search for message headers
Approved-by: Gary Kramlich
|
11181
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
1 | /** |
| 15884 | 2 | * purple |
|
11181
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
3 | * |
|
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
4 | * Copyright (C) 2005, Thomas Butter <butter@uni-mannheim.de> |
|
31293
169eeb43b52c
Remove trailing whitespace
Richard Laager <rlaager@pidgin.im>
parents:
20287
diff
changeset
|
5 | * |
|
11181
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
6 | * This program is free software; you can redistribute it and/or modify |
|
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
7 | * it under the terms of the GNU General Public License as published by |
|
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
8 | * the Free Software Foundation; either version 2 of the License, or |
|
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
9 | * (at your option) any later version. |
|
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
10 | * |
|
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
11 | * This program is distributed in the hope that it will be useful, |
|
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
14 | * GNU General Public License for more details. |
|
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
15 | * |
|
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
16 | * You should have received a copy of the GNU General Public License |
|
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
17 | * along with this program; if not, write to the Free Software |
|
19859
71d37b57eff2
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
15884
diff
changeset
|
18 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
11181
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
19 | */ |
|
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
20 | |
|
39819
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31293
diff
changeset
|
21 | #ifndef PURPLE_SIMPLE_SIPMSG_H |
|
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31293
diff
changeset
|
22 | #define PURPLE_SIMPLE_SIPMSG_H |
|
11181
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
23 | |
|
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
24 | #include <glib.h> |
|
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
25 | |
|
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
26 | struct sipmsg { |
|
11829
8d89f3c00831
[gaim-migrate @ 14120]
Richard Laager <rlaager@pidgin.im>
parents:
11181
diff
changeset
|
27 | int response; /* 0 means request, otherwise response code */ |
|
11181
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
28 | gchar *method; |
|
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
29 | gchar *target; |
|
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
30 | GSList *headers; |
|
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
31 | int bodylen; |
|
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
32 | gchar *body; |
|
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
33 | }; |
|
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
34 | |
|
14131
2cd4ddea2f52
[gaim-migrate @ 16690]
Daniel Atallah <datallah@pidgin.im>
parents:
11829
diff
changeset
|
35 | struct sipmsg *sipmsg_parse_msg(const gchar *msg); |
|
2cd4ddea2f52
[gaim-migrate @ 16690]
Daniel Atallah <datallah@pidgin.im>
parents:
11829
diff
changeset
|
36 | struct sipmsg *sipmsg_parse_header(const gchar *header); |
|
2cd4ddea2f52
[gaim-migrate @ 16690]
Daniel Atallah <datallah@pidgin.im>
parents:
11829
diff
changeset
|
37 | void sipmsg_add_header(struct sipmsg *msg, const gchar *name, const gchar *value); |
|
11181
e872a55b9524
[gaim-migrate @ 13292]
Thomas Butter <tbutter@users.sourceforge.net>
parents:
diff
changeset
|
38 | void sipmsg_free(struct sipmsg *msg); |
|
20287
4a25d4144f16
applied changes from 20395453ab17cd8dd060d4d0794affda17e3272f
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
19859
diff
changeset
|
39 | const gchar *sipmsg_find_header(struct sipmsg *msg, const gchar *name); |
|
14131
2cd4ddea2f52
[gaim-migrate @ 16690]
Daniel Atallah <datallah@pidgin.im>
parents:
11829
diff
changeset
|
40 | void sipmsg_remove_header(struct sipmsg *msg, const gchar *name); |
|
2cd4ddea2f52
[gaim-migrate @ 16690]
Daniel Atallah <datallah@pidgin.im>
parents:
11829
diff
changeset
|
41 | void sipmsg_print(const struct sipmsg *msg); |
|
40416
54c050e07348
simple: De-duplicate sipmsg_to_string.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
40414
diff
changeset
|
42 | gchar *sipmsg_to_string(const struct sipmsg *msg, const gchar *status_text); |
|
39819
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31293
diff
changeset
|
43 | |
|
3554dac2991b
Standardize all protocol header guard macros.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents:
31293
diff
changeset
|
44 | #endif /* PURPLE_SIMPLE_SIPMSG_H */ |