protocols/ircv3/purpleircv3source.h

Thu, 11 Apr 2024 21:32:59 -0500

author
Gary Kramlich <grim@reaperworld.com>
date
Thu, 11 Apr 2024 21:32:59 -0500
changeset 42692
12506cd6fa96
parent 42652
225762d4e206
permissions
-rw-r--r--

Remove PurpleConnectionUiOps as they are no longer used

Testing Done:
Checked in with the turtles.

Reviewed at https://reviews.imfreedom.org/r/3090/

42336
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Purple - Internet Messaging Library
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
42568
31e8c7c92e2f Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents: 42472
diff changeset
5 * Purple is the legal property of its developers, whose names are too numerous
31e8c7c92e2f Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents: 42472
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
31e8c7c92e2f Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents: 42472
diff changeset
7 * source distribution.
31e8c7c92e2f Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents: 42472
diff changeset
8 *
31e8c7c92e2f Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents: 42472
diff changeset
9 * This library is free software; you can redistribute it and/or modify
42336
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * (at your option) any later version.
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 *
42568
31e8c7c92e2f Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents: 42472
diff changeset
14 * This library is distributed in the hope that it will be useful,
42336
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 * GNU General Public License for more details.
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18 *
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
42568
31e8c7c92e2f Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents: 42472
diff changeset
20 * along with this library; if not, see <https://www.gnu.org/licenses/>.
42336
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 */
42568
31e8c7c92e2f Make sure all of the license headers for IRCv3 are GPLv2
Gary Kramlich <grim@reaperworld.com>
parents: 42472
diff changeset
22
42336
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #if !defined(PURPLE_IRCV3_GLOBAL_HEADER_INSIDE) && \
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 !defined(PURPLE_IRCV3_COMPILATION)
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25 # error "only <libpurple/protocols/ircv3.h> may be included directly"
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26 #endif
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 #ifndef PURPLE_IRCV3_SOURCE_H
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29 #define PURPLE_IRCV3_SOURCE_H
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 #include <glib.h>
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 #include <glib-object.h>
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
33
42472
409148c5c5b7 Add symbol visibility on IRCv3 protocol plugin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42336
diff changeset
34 #include "purpleircv3version.h"
409148c5c5b7 Add symbol visibility on IRCv3 protocol plugin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42336
diff changeset
35
42336
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 G_BEGIN_DECLS
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38 /**
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39 * purple_ircv3_source_parse:
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 * @source: The source to parse.
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 * @nick: (out) (transfer full): A return address for the nick.
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42 * @user: (out) (transfer full): A return address for the user.
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43 * @host: (out) (transfer full): A return address for the host.
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 *
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45 * Parses a `source` string like `pidgy!~u@53unc8n42i868.irc` into its nick,
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 * user, and host parts per https://modern.ircdocs.horse/#source.
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47 *
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48 * If the user or host aren't present in @source, but a return address is
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49 * provided for them, that pointer will be set to %NULL.
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50 *
42619
3dd7cd0eabf1 Remove the micro version from Since tags in IRCv3 prpl
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42568
diff changeset
51 * Since: 3.0
42336
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 */
42472
409148c5c5b7 Add symbol visibility on IRCv3 protocol plugin
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42336
diff changeset
53 PURPLE_IRCV3_AVAILABLE_IN_ALL
42336
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54 void purple_ircv3_source_parse(const char *source, char **nick, char **user, char **host);
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 G_END_DECLS
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57
14c850aeee79 IRCv3: add ircv3_source_parse to parse sources into nick, user, and host
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 #endif /* PURPLE_IRCV3_SOURCE_H */

mercurial