libpurple/purplepath.h

Fri, 10 Mar 2023 16:37:41 -0600

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Fri, 10 Mar 2023 16:37:41 -0600
changeset 42139
c053558f1236
parent 41680
fcd5838ffd18
child 42391
090b03385984
permissions
-rw-r--r--

Make PurpleRequestFieldChoice into a GObject

This also does an `hg cp`, though with all the renaming of the parameter names, maybe that wasn't as useful for tracking the diff.

I wonder if this should implement `GListModel`, but the values are currently arbitrary pointers, so it won't work right now.

Testing Done:
Compiled and opened Request Fields from Demo protocol.

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

41237
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
1 /*
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
2 * Purple - Internet Messaging Library
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
4 *
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
5 * This library is free software; you can redistribute it and/or
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
6 * modify it under the terms of the GNU Lesser General Public
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
7 * License as published by the Free Software Foundation; either
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
8 * version 2 of the License, or (at your option) any later version.
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
9 *
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
10 * This library is distributed in the hope that it will be useful,
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
13 * Lesser General Public License for more details.
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
14 *
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
15 * You should have received a copy of the GNU Lesser General Public
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
16 * License along with this library; if not, see <https://www.gnu.org/licenses/>.
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
17 */
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
18
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
19 #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
20 # error "only <purple.h> may be included directly"
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
21 #endif
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
22
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
23 #ifndef PURPLE_PATH_H
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
24 #define PURPLE_PATH_H
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
25
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
26 #include <glib.h>
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
27
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
28 G_BEGIN_DECLS
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
29
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
30 /**
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
31 * purple_home_dir:
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
32 *
41680
fcd5838ffd18 remove purple_user_dir which has been deprecated
Gary Kramlich <grim@reaperworld.com>
parents: 41237
diff changeset
33 * Gets the user's home directory.
41237
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
34 *
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
35 * Returns: The user's home directory.
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
36 */
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
37 const gchar *purple_home_dir(void);
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
38
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
39 /**
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
40 * purple_cache_dir:
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
41 *
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
42 * Returns the purple cache directory according to XDG Base Directory Specification.
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
43 * This is usually $HOME/.cache/purple.
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
44 * If custom user dir was specified then this is cache
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
45 * sub-directory of DIR argument passed to -c option.
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
46 *
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
47 * Returns: The purple cache directory.
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
48 */
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
49 const gchar *purple_cache_dir(void);
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
50
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
51 /**
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
52 * purple_config_dir:
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
53 *
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
54 * Returns the purple configuration directory according to XDG Base Directory Specification.
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
55 * This is usually $HOME/.config/purple.
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
56 * If custom user dir was specified then this is config
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
57 * sub-directory of DIR argument passed to -c option.
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
58 *
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
59 * Returns: The purple configuration directory.
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
60 */
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
61 const gchar *purple_config_dir(void);
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
62
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
63 /**
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
64 * purple_data_dir:
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
65 *
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
66 * Returns the purple data directory according to XDG Base Directory Specification.
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
67 * This is usually $HOME/.local/share/purple.
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
68 * If custom user dir was specified then this is data
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
69 * sub-directory of DIR argument passed to -c option.
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
70 *
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
71 * Returns: The purple data directory.
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
72 */
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
73 const gchar *purple_data_dir(void);
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
74
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
75 /**
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
76 * purple_util_set_user_dir:
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
77 * @dir: The custom settings directory
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
78 *
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
79 * Define a custom purple settings directory, overriding the default (user's home directory/.purple)
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
80 */
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
81 void purple_util_set_user_dir(const gchar *dir);
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
82
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
83 G_END_DECLS
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
84
5098e0dd3a09 Move the path based functions from util.c to their own file.
Gary Kramlich <grim@reaperworld.com>
parents:
diff changeset
85 #endif /* PURPLE_PATH_H */

mercurial