libpurple/protocols/ircv3/purpleircv3source.h

changeset 42336
14c850aeee79
child 42472
409148c5c5b7
equal deleted inserted replaced
42335:51df4b5bdba2 42336:14c850aeee79
1 /*
2 * Purple - Internet Messaging Library
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (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, see <https://www.gnu.org/licenses/>.
17 */
18 #if !defined(PURPLE_IRCV3_GLOBAL_HEADER_INSIDE) && \
19 !defined(PURPLE_IRCV3_COMPILATION)
20 # error "only <libpurple/protocols/ircv3.h> may be included directly"
21 #endif
22
23 #ifndef PURPLE_IRCV3_SOURCE_H
24 #define PURPLE_IRCV3_SOURCE_H
25
26 #include <glib.h>
27 #include <glib-object.h>
28
29 G_BEGIN_DECLS
30
31 /**
32 * purple_ircv3_source_parse:
33 * @source: The source to parse.
34 * @nick: (out) (transfer full): A return address for the nick.
35 * @user: (out) (transfer full): A return address for the user.
36 * @host: (out) (transfer full): A return address for the host.
37 *
38 * Parses a `source` string like `pidgy!~u@53unc8n42i868.irc` into its nick,
39 * user, and host parts per https://modern.ircdocs.horse/#source.
40 *
41 * If the user or host aren't present in @source, but a return address is
42 * provided for them, that pointer will be set to %NULL.
43 *
44 * Since: 3.0.0
45 */
46 void purple_ircv3_source_parse(const char *source, char **nick, char **user, char **host);
47
48 G_END_DECLS
49
50 #endif /* PURPLE_IRCV3_SOURCE_H */

mercurial