libpurple/util.h

Mon, 13 Nov 2023 20:52:30 -0600

author
Elliott Sales de Andrade <quantum.analyst@gmail.com>
date
Mon, 13 Nov 2023 20:52:30 -0600
changeset 42486
594f84a2c97f
parent 42408
94151c4d26b5
child 42557
e868bfcc092a
permissions
-rw-r--r--

Fix some small doc issues

- `Return Value` is deprecated.
- `See Also` is not a valid tag, and does not appear anywhere. If placed in the
description, then it does appear, but just like a regular paragraph, so write
it like one.
- Fix a few typos.

Testing Done:
Built docs.

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

40584
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40564
diff changeset
1 /*
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40564
diff changeset
2 * Purple - Internet Messaging Library
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40564
diff changeset
3 * Copyright (C) Pidgin Developers <devel@pidgin.im>
4890
d87a9b5bbe57 [gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
4 *
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15707
diff changeset
5 * Purple is the legal property of its developers, whose names are too numerous
8046
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7889
diff changeset
6 * to list here. Please refer to the COPYRIGHT file distributed with this
c581b20a47d6 [gaim-migrate @ 8730]
Sean Egan <seanegan@pidgin.im>
parents: 7889
diff changeset
7 * source distribution.
7094
8f9588491993 [gaim-migrate @ 7659]
Christian Hammond <chipx86@chipx86.com>
parents: 6982
diff changeset
8 *
4890
d87a9b5bbe57 [gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
9 * This program is free software; you can redistribute it and/or modify
d87a9b5bbe57 [gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
10 * it under the terms of the GNU General Public License as published by
d87a9b5bbe57 [gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
11 * the Free Software Foundation; either version 2 of the License, or
d87a9b5bbe57 [gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
12 * (at your option) any later version.
d87a9b5bbe57 [gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
13 *
d87a9b5bbe57 [gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
14 * This program is distributed in the hope that it will be useful,
d87a9b5bbe57 [gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d87a9b5bbe57 [gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d87a9b5bbe57 [gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
17 * GNU General Public License for more details.
d87a9b5bbe57 [gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
18 *
d87a9b5bbe57 [gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
19 * You should have received a copy of the GNU General Public License
40584
6f198a69ac48 A bunch of documentation cleanups
Gary Kramlich <grim@reaperworld.com>
parents: 40564
diff changeset
20 * along with this program; if not, see <https://www.gnu.org/licenses/>.
4890
d87a9b5bbe57 [gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
21 */
35487
494f09f7f331 Move section blocks inside inclusion guards -- otherwise g-ir-scanner yells
Ankit Vani <a@nevitus.org>
parents: 35486
diff changeset
22
40474
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40350
diff changeset
23 #if !defined(PURPLE_GLOBAL_HEADER_INSIDE) && !defined(PURPLE_COMPILATION)
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40350
diff changeset
24 # error "only <purple.h> may be included directly"
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40350
diff changeset
25 #endif
1341be8e3402 Make it so only libpurple can directly include libpurple header files.
Gary Kramlich <grim@reaperworld.com>
parents: 40350
diff changeset
26
39659
e4dfb99b0cef Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39527
diff changeset
27 #ifndef PURPLE_UTIL_H
e4dfb99b0cef Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39527
diff changeset
28 #define PURPLE_UTIL_H
4890
d87a9b5bbe57 [gaim-migrate @ 5220]
Christian Hammond <chipx86@chipx86.com>
parents:
diff changeset
29
6474
12d3fe5e5b1b [gaim-migrate @ 6983]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
30 #include <stdio.h>
12d3fe5e5b1b [gaim-migrate @ 6983]
Christian Hammond <chipx86@chipx86.com>
parents: 5944
diff changeset
31
29553
5e7395ef6819 Include signals.h to provide PurpleCallback. I guess all the other places
Michael Ruprecht <maiku@pidgin.im>
parents: 29538
diff changeset
32 #include "signals.h"
10425
d82cef15da95 [gaim-migrate @ 11677]
Mark Doliner <markdoliner@pidgin.im>
parents: 10415
diff changeset
33 #include "xmlnode.h"
18101
3ce21b5a182c A patch from David Grohmann (dave1g) to log embedded images.
Richard Laager <rlaager@pidgin.im>
parents: 17389
diff changeset
34 #include "notify.h"
36581
09d5842255a2 Added missing includes and functions to headers
Ankit Vani <a@nevitus.org>
parents: 36544
diff changeset
35 #include "protocols.h"
42344
c51d37734155 Rename account.[ch] to purpleaccount.[ch]
Gary Kramlich <grim@reaperworld.com>
parents: 42307
diff changeset
36 #include "purpleaccount.h"
41155
922c9e70900c Rename protocol.[ch] to purpleprotocol.[ch]
Gary Kramlich <grim@reaperworld.com>
parents: 41083
diff changeset
37 #include "purpleprotocol.h"
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
38 #include "purpleversion.h"
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5943
diff changeset
39
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32737
diff changeset
40 G_BEGIN_DECLS
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32737
diff changeset
41
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
42 /**************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35471
diff changeset
43 /* Utility Subsystem */
21238
cd326828c870 Add and call a purple_util_uninit() to free user_dir and customer_home_dir
Richard Laager <rlaager@pidgin.im>
parents: 20226
diff changeset
44 /**************************************************************************/
cd326828c870 Add and call a purple_util_uninit() to free user_dir and customer_home_dir
Richard Laager <rlaager@pidgin.im>
parents: 20226
diff changeset
45
cd326828c870 Add and call a purple_util_uninit() to free user_dir and customer_home_dir
Richard Laager <rlaager@pidgin.im>
parents: 20226
diff changeset
46 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
47 * purple_util_init:
21238
cd326828c870 Add and call a purple_util_uninit() to free user_dir and customer_home_dir
Richard Laager <rlaager@pidgin.im>
parents: 20226
diff changeset
48 *
cd326828c870 Add and call a purple_util_uninit() to free user_dir and customer_home_dir
Richard Laager <rlaager@pidgin.im>
parents: 20226
diff changeset
49 * Initializes the utility subsystem.
42398
00178e755de6 Export symbols and add Since tags for 2.3 API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
50 *
00178e755de6 Export symbols and add Since tags for 2.3 API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
51 * Since: 2.3.0
21238
cd326828c870 Add and call a purple_util_uninit() to free user_dir and customer_home_dir
Richard Laager <rlaager@pidgin.im>
parents: 20226
diff changeset
52 */
42398
00178e755de6 Export symbols and add Since tags for 2.3 API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
53 PURPLE_AVAILABLE_IN_2_3
21238
cd326828c870 Add and call a purple_util_uninit() to free user_dir and customer_home_dir
Richard Laager <rlaager@pidgin.im>
parents: 20226
diff changeset
54 void purple_util_init(void);
cd326828c870 Add and call a purple_util_uninit() to free user_dir and customer_home_dir
Richard Laager <rlaager@pidgin.im>
parents: 20226
diff changeset
55
cd326828c870 Add and call a purple_util_uninit() to free user_dir and customer_home_dir
Richard Laager <rlaager@pidgin.im>
parents: 20226
diff changeset
56 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
57 * purple_util_uninit:
21238
cd326828c870 Add and call a purple_util_uninit() to free user_dir and customer_home_dir
Richard Laager <rlaager@pidgin.im>
parents: 20226
diff changeset
58 *
cd326828c870 Add and call a purple_util_uninit() to free user_dir and customer_home_dir
Richard Laager <rlaager@pidgin.im>
parents: 20226
diff changeset
59 * Uninitializes the util subsystem.
42398
00178e755de6 Export symbols and add Since tags for 2.3 API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
60 *
00178e755de6 Export symbols and add Since tags for 2.3 API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
61 * Since: 2.3.0
21238
cd326828c870 Add and call a purple_util_uninit() to free user_dir and customer_home_dir
Richard Laager <rlaager@pidgin.im>
parents: 20226
diff changeset
62 */
42398
00178e755de6 Export symbols and add Since tags for 2.3 API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42394
diff changeset
63 PURPLE_AVAILABLE_IN_2_3
21238
cd326828c870 Add and call a purple_util_uninit() to free user_dir and customer_home_dir
Richard Laager <rlaager@pidgin.im>
parents: 20226
diff changeset
64 void purple_util_uninit(void);
cd326828c870 Add and call a purple_util_uninit() to free user_dir and customer_home_dir
Richard Laager <rlaager@pidgin.im>
parents: 20226
diff changeset
65
cd326828c870 Add and call a purple_util_uninit() to free user_dir and customer_home_dir
Richard Laager <rlaager@pidgin.im>
parents: 20226
diff changeset
66 /**************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35471
diff changeset
67 /* Path/Filename Functions */
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
68 /**************************************************************************/
10414
6b10b76933e1 [gaim-migrate @ 11664]
Mark Doliner <markdoliner@pidgin.im>
parents: 10332
diff changeset
69
6b10b76933e1 [gaim-migrate @ 11664]
Mark Doliner <markdoliner@pidgin.im>
parents: 10332
diff changeset
70 /**
38872
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
71 * purple_util_write_data_to_cache_file:
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
72 * @filename: The basename of the file to write in the purple_cache_dir.
38891
f59bb8304c21 Fix some functions descriptions
qarkai <qarkai@gmail.com>
parents: 38890
diff changeset
73 * @data: A string of data to write.
38872
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
74 * @size: The size of the data to save. If data is
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
75 * null-terminated you can pass in -1.
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
76 *
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
77 * Write a string of data to a file of the given name in the Purple
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
78 * cache directory ($HOME/.cache/purple by default).
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
79 *
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
80 * See purple_util_write_data_to_file()
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
81 *
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
82 * Returns: TRUE if the file was written successfully. FALSE otherwise.
42391
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
83 *
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
84 * Since: 3.0.0
38872
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
85 */
42391
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
86 PURPLE_AVAILABLE_IN_3_0
38874
0fc4ba7fa2be Make XDG dir structure inside custom user dir
qarkai <qarkai@gmail.com>
parents: 38872
diff changeset
87 gboolean
0fc4ba7fa2be Make XDG dir structure inside custom user dir
qarkai <qarkai@gmail.com>
parents: 38872
diff changeset
88 purple_util_write_data_to_cache_file(const char *filename, const char *data, gssize size);
38872
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
89
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
90 /**
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
91 * purple_util_write_data_to_config_file:
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
92 * @filename: The basename of the file to write in the purple_config_dir.
38891
f59bb8304c21 Fix some functions descriptions
qarkai <qarkai@gmail.com>
parents: 38890
diff changeset
93 * @data: A string of data to write.
38872
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
94 * @size: The size of the data to save. If data is
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
95 * null-terminated you can pass in -1.
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
96 *
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
97 * Write a string of data to a file of the given name in the Purple
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
98 * config directory ($HOME/.config/purple by default).
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
99 *
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
100 * See purple_util_write_data_to_file()
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
101 *
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
102 * Returns: TRUE if the file was written successfully. FALSE otherwise.
42391
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
103 *
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
104 * Since: 3.0.0
38872
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
105 */
42391
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
106 PURPLE_AVAILABLE_IN_3_0
38874
0fc4ba7fa2be Make XDG dir structure inside custom user dir
qarkai <qarkai@gmail.com>
parents: 38872
diff changeset
107 gboolean
0fc4ba7fa2be Make XDG dir structure inside custom user dir
qarkai <qarkai@gmail.com>
parents: 38872
diff changeset
108 purple_util_write_data_to_config_file(const char *filename, const char *data, gssize size);
38872
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
109
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
110 /**
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
111 * purple_util_write_data_to_data_file:
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
112 * @filename: The basename of the file to write in the purple_data_dir.
38891
f59bb8304c21 Fix some functions descriptions
qarkai <qarkai@gmail.com>
parents: 38890
diff changeset
113 * @data: A string of data to write.
38872
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
114 * @size: The size of the data to save. If data is
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
115 * null-terminated you can pass in -1.
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
116 *
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
117 * Write a string of data to a file of the given name in the Purple
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
118 * data directory ($HOME/.local/share/purple by default).
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
119 *
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
120 * See purple_util_write_data_to_file()
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
121 *
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
122 * Returns: TRUE if the file was written successfully. FALSE otherwise.
42391
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
123 *
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
124 * Since: 3.0.0
38872
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
125 */
42391
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
126 PURPLE_AVAILABLE_IN_3_0
38874
0fc4ba7fa2be Make XDG dir structure inside custom user dir
qarkai <qarkai@gmail.com>
parents: 38872
diff changeset
127 gboolean
0fc4ba7fa2be Make XDG dir structure inside custom user dir
qarkai <qarkai@gmail.com>
parents: 38872
diff changeset
128 purple_util_write_data_to_data_file(const char *filename, const char *data, gssize size);
38872
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
129
af422a3fb924 Add purple_util_write_data_to_*_file declarations
qarkai <qarkai@gmail.com>
parents: 38870
diff changeset
130 /**
38877
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
131 * purple_util_read_xml_from_cache_file:
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
132 * @filename: The basename of the file to open in the purple_cache_dir.
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
133 * @description: A very short description of the contents of this
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
134 * file. This is used in error messages shown to the
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
135 * user when the file can not be opened. For example,
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
136 * "preferences," or "buddy pounces."
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
137 *
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
138 * Read the contents of a given file and parse the results into an
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
139 * PurpleXmlNode tree structure. This is intended to be used to read
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
140 * Purple's cache xml files (xmpp-caps.xml, etc.)
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
141 *
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
142 * Returns: An PurpleXmlNode tree of the contents of the given file. Or NULL, if
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
143 * the file does not exist or there was an error reading the file.
42391
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
144 *
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
145 * Since: 3.0.0
38877
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
146 */
42391
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
147 PURPLE_AVAILABLE_IN_3_0
38877
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
148 PurpleXmlNode *
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
149 purple_util_read_xml_from_cache_file(const char *filename, const char *description);
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
150
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
151 /**
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
152 * purple_util_read_xml_from_config_file:
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
153 * @filename: The basename of the file to open in the purple_config_dir.
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
154 * @description: A very short description of the contents of this
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
155 * file. This is used in error messages shown to the
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
156 * user when the file can not be opened. For example,
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
157 * "preferences," or "buddy pounces."
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
158 *
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
159 * Read the contents of a given file and parse the results into an
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
160 * PurpleXmlNode tree structure. This is intended to be used to read
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
161 * Purple's config xml files (prefs.xml, pounces.xml, etc.)
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
162 *
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
163 * Returns: An PurpleXmlNode tree of the contents of the given file. Or NULL, if
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
164 * the file does not exist or there was an error reading the file.
42391
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
165 *
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
166 * Since: 3.0.0
38877
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
167 */
42391
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
168 PURPLE_AVAILABLE_IN_3_0
38877
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
169 PurpleXmlNode *
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
170 purple_util_read_xml_from_config_file(const char *filename, const char *description);
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
171
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
172 /**
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
173 * purple_util_read_xml_from_data_file:
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
174 * @filename: The basename of the file to open in the purple_data_dir.
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
175 * @description: A very short description of the contents of this
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
176 * file. This is used in error messages shown to the
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
177 * user when the file can not be opened. For example,
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
178 * "preferences," or "buddy pounces."
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
179 *
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
180 * Read the contents of a given file and parse the results into an
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
181 * PurpleXmlNode tree structure. This is intended to be used to read
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
182 * Purple's cache xml files (accounts.xml, etc.)
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
183 *
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
184 * Returns: An PurpleXmlNode tree of the contents of the given file. Or NULL, if
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
185 * the file does not exist or there was an error reading the file.
42391
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
186 *
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
187 * Since: 3.0.0
38877
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
188 */
42391
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
189 PURPLE_AVAILABLE_IN_3_0
38877
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
190 PurpleXmlNode *
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
191 purple_util_read_xml_from_data_file(const char *filename, const char *description);
4e9c691a1d2d Add functions for reading XML files from XDG dirs
qarkai <qarkai@gmail.com>
parents: 38874
diff changeset
192
16437
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16262
diff changeset
193 /**************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35471
diff changeset
194 /* Environment Detection Functions */
16437
7ff7c3405ea2 Rework the buddy icon subsystem to use the imgstore subsystem, and modify the
Richard Laager <rlaager@pidgin.im>
parents: 16262
diff changeset
195 /**************************************************************************/
22443
7b8772af6bb7 Apply the custom smiley patches from #1187, from Jorge Villaseño (Masca) and
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22133
diff changeset
196
7b8772af6bb7 Apply the custom smiley patches from #1187, from Jorge Villaseño (Masca) and
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 22133
diff changeset
197 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
198 * purple_running_gnome:
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
199 *
12483
38fc67810cdb [gaim-migrate @ 14795]
Richard Laager <rlaager@pidgin.im>
parents: 12106
diff changeset
200 * Check if running GNOME.
11878
4c2661df91bb [gaim-migrate @ 14169]
Sean Egan <seanegan@pidgin.im>
parents: 11552
diff changeset
201 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
202 * Returns: TRUE if running GNOME, FALSE otherwise.
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
203 *
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
204 * Since: 2.0.0
11878
4c2661df91bb [gaim-migrate @ 14169]
Sean Egan <seanegan@pidgin.im>
parents: 11552
diff changeset
205 */
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
206 PURPLE_AVAILABLE_IN_ALL
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15707
diff changeset
207 gboolean purple_running_gnome(void);
11878
4c2661df91bb [gaim-migrate @ 14169]
Sean Egan <seanegan@pidgin.im>
parents: 11552
diff changeset
208
4c2661df91bb [gaim-migrate @ 14169]
Sean Egan <seanegan@pidgin.im>
parents: 11552
diff changeset
209 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
210 * purple_running_kde:
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
211 *
12483
38fc67810cdb [gaim-migrate @ 14795]
Richard Laager <rlaager@pidgin.im>
parents: 12106
diff changeset
212 * Check if running KDE.
38fc67810cdb [gaim-migrate @ 14795]
Richard Laager <rlaager@pidgin.im>
parents: 12106
diff changeset
213 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
214 * Returns: TRUE if running KDE, FALSE otherwise.
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
215 *
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
216 * Since: 2.0.0
12483
38fc67810cdb [gaim-migrate @ 14795]
Richard Laager <rlaager@pidgin.im>
parents: 12106
diff changeset
217 */
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
218 PURPLE_AVAILABLE_IN_ALL
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15707
diff changeset
219 gboolean purple_running_kde(void);
12483
38fc67810cdb [gaim-migrate @ 14795]
Richard Laager <rlaager@pidgin.im>
parents: 12106
diff changeset
220
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
221 /**************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35471
diff changeset
222 /* String Functions */
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
223 /**************************************************************************/
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
224
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
225 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
226 * purple_strequal:
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
227 * @left: A string
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
228 * @right: A string to compare with left
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
229 *
25859
b42be7bb9dac Patch from Paul Aurich to add purple_strequal to help readability and simplicity of code. Ie, don't need to negate the value of strcmp, since this does a strcmp and does the negation for us
Paul Aurich <darkrain42@pidgin.im>
parents: 24072
diff changeset
230 * Tests two strings for equality.
b42be7bb9dac Patch from Paul Aurich to add purple_strequal to help readability and simplicity of code. Ie, don't need to negate the value of strcmp, since this does a strcmp and does the negation for us
Paul Aurich <darkrain42@pidgin.im>
parents: 24072
diff changeset
231 *
b42be7bb9dac Patch from Paul Aurich to add purple_strequal to help readability and simplicity of code. Ie, don't need to negate the value of strcmp, since this does a strcmp and does the negation for us
Paul Aurich <darkrain42@pidgin.im>
parents: 24072
diff changeset
232 * Unlike strcmp(), this function will not crash if one or both of the
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
233 * strings are %NULL.
25859
b42be7bb9dac Patch from Paul Aurich to add purple_strequal to help readability and simplicity of code. Ie, don't need to negate the value of strcmp, since this does a strcmp and does the negation for us
Paul Aurich <darkrain42@pidgin.im>
parents: 24072
diff changeset
234 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
235 * Returns: %TRUE if the strings are the same, else %FALSE.
42394
b3bc5ad00646 Export symbols and add Since tags for 2.6 API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42391
diff changeset
236 *
b3bc5ad00646 Export symbols and add Since tags for 2.6 API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42391
diff changeset
237 * Since: 2.6.0
25859
b42be7bb9dac Patch from Paul Aurich to add purple_strequal to help readability and simplicity of code. Ie, don't need to negate the value of strcmp, since this does a strcmp and does the negation for us
Paul Aurich <darkrain42@pidgin.im>
parents: 24072
diff changeset
238 */
42394
b3bc5ad00646 Export symbols and add Since tags for 2.6 API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42391
diff changeset
239 PURPLE_AVAILABLE_STATIC_INLINE_IN_2_6
39323
a1bec7e58cba libpurple: Change purple_strequal() to a static inline function
Mike Ruprecht <cmaiku@gmail.com>
parents: 39122
diff changeset
240 static inline gboolean
a1bec7e58cba libpurple: Change purple_strequal() to a static inline function
Mike Ruprecht <cmaiku@gmail.com>
parents: 39122
diff changeset
241 purple_strequal(const gchar *left, const gchar *right)
a1bec7e58cba libpurple: Change purple_strequal() to a static inline function
Mike Ruprecht <cmaiku@gmail.com>
parents: 39122
diff changeset
242 {
a1bec7e58cba libpurple: Change purple_strequal() to a static inline function
Mike Ruprecht <cmaiku@gmail.com>
parents: 39122
diff changeset
243 return (g_strcmp0(left, right) == 0);
a1bec7e58cba libpurple: Change purple_strequal() to a static inline function
Mike Ruprecht <cmaiku@gmail.com>
parents: 39122
diff changeset
244 }
25859
b42be7bb9dac Patch from Paul Aurich to add purple_strequal to help readability and simplicity of code. Ie, don't need to negate the value of strcmp, since this does a strcmp and does the negation for us
Paul Aurich <darkrain42@pidgin.im>
parents: 24072
diff changeset
245
b42be7bb9dac Patch from Paul Aurich to add purple_strequal to help readability and simplicity of code. Ie, don't need to negate the value of strcmp, since this does a strcmp and does the negation for us
Paul Aurich <darkrain42@pidgin.im>
parents: 24072
diff changeset
246 /**
42007
b7f9345b02a4 Add a name-for-display property to PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents: 41882
diff changeset
247 * purple_strempty:
b7f9345b02a4 Add a name-for-display property to PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents: 41882
diff changeset
248 * @str: A string to check if it is empty.
b7f9345b02a4 Add a name-for-display property to PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents: 41882
diff changeset
249 *
b7f9345b02a4 Add a name-for-display property to PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents: 41882
diff changeset
250 * Determines if @str is empty. That is, if it is %NULL or an empty string.
b7f9345b02a4 Add a name-for-display property to PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents: 41882
diff changeset
251 *
b7f9345b02a4 Add a name-for-display property to PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents: 41882
diff changeset
252 * Returns: %TRUE if the @str is %NULL or an empty string.
b7f9345b02a4 Add a name-for-display property to PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents: 41882
diff changeset
253 *
b7f9345b02a4 Add a name-for-display property to PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents: 41882
diff changeset
254 * Since: 3.0.0
b7f9345b02a4 Add a name-for-display property to PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents: 41882
diff changeset
255 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
256 PURPLE_AVAILABLE_STATIC_INLINE_IN_3_0
42007
b7f9345b02a4 Add a name-for-display property to PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents: 41882
diff changeset
257 static inline gboolean
b7f9345b02a4 Add a name-for-display property to PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents: 41882
diff changeset
258 purple_strempty(const char *str) {
b7f9345b02a4 Add a name-for-display property to PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents: 41882
diff changeset
259 return (str == NULL || str[0] == '\0');
b7f9345b02a4 Add a name-for-display property to PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents: 41882
diff changeset
260 }
b7f9345b02a4 Add a name-for-display property to PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents: 41882
diff changeset
261
b7f9345b02a4 Add a name-for-display property to PurpleContactInfo
Gary Kramlich <grim@reaperworld.com>
parents: 41882
diff changeset
262 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
263 * purple_normalize:
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
264 * @account: The account the string belongs to, or NULL if you do
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
265 * not know the account. If you use NULL, the string
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
266 * will still be normalized, but if the protocol uses a
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
267 * custom normalization function then the string may
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
268 * not be normalized correctly.
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
269 * @str: The string to normalize.
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
270 *
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
271 * Normalizes a string, so that it is suitable for comparison.
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
272 *
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
273 * The returned string will point to a static buffer, so if the
35468
65e7b4566de4 Fix HTML generation warnings by using DocBook tags
Ankit Vani <a@nevitus.org>
parents: 35467
diff changeset
274 * string is intended to be kept long-term, you <emphasis>must</emphasis>
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
275 * g_strdup() it. Also, calling normalize() twice in the same line
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
276 * will lead to problems.
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
277 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
278 * Returns: A pointer to the normalized version stored in a static buffer.
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
279 *
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
280 * Since: 2.0.0
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
281 */
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
282 PURPLE_AVAILABLE_IN_ALL
39514
9c7715998bbc Cleanup account.[ch] and status.[ch] to remove g_type_class_add_private and other cleans including remove const from accessors
Gary Kramlich <grim@reaperworld.com>
parents: 39479
diff changeset
283 const char *purple_normalize(PurpleAccount *account, const char *str);
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
284
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
285 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
286 * purple_validate:
37034
9d6765962b22 Initial replacements for this branch
Ankit Vani <a@nevitus.org>
parents: 37023
diff changeset
287 * @protocol: The protocol the string belongs to.
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
288 * @str: The string to validate.
33087
182da0516150 Libpurple: username validation support; Pidgin: use it in account setup dialog
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33051
diff changeset
289 *
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
290 * Checks, if a string is valid.
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
291 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
292 * Returns: TRUE, if string is valid, otherwise FALSE.
42391
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
293 *
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
294 * Since: 3.0.0
33087
182da0516150 Libpurple: username validation support; Pidgin: use it in account setup dialog
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33051
diff changeset
295 */
42391
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
296 PURPLE_AVAILABLE_IN_3_0
40634
4d3018b00ad4 Fix the PurpleProtocolClient interface and split it out to its own file.
Gary Kramlich <grim@reaperworld.com>
parents: 40584
diff changeset
297 gboolean purple_validate(PurpleProtocol *protocol, const char *str);
33087
182da0516150 Libpurple: username validation support; Pidgin: use it in account setup dialog
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33051
diff changeset
298
182da0516150 Libpurple: username validation support; Pidgin: use it in account setup dialog
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33051
diff changeset
299 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
300 * purple_strdup_withhtml:
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
301 * @src: The source string.
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
302 *
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
303 * Duplicates a string and replaces all newline characters from the
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
304 * source string with HTML linebreaks.
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
305 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
306 * Returns: The new string. Must be g_free'd by the caller.
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
307 *
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
308 * Since: 2.0.0
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
309 */
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
310 PURPLE_AVAILABLE_IN_ALL
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15707
diff changeset
311 gchar *purple_strdup_withhtml(const gchar *src);
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
312
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
313 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
314 * purple_str_strip_char:
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
315 * @str: The string to strip characters from.
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
316 * @thechar: The character to strip from the given string.
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
317 *
11920
be80617ec59b [gaim-migrate @ 14211]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11878
diff changeset
318 * Strips all instances of the given character from the
be80617ec59b [gaim-migrate @ 14211]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11878
diff changeset
319 * given string. The string is modified in place. This
be80617ec59b [gaim-migrate @ 14211]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11878
diff changeset
320 * is useful for stripping new line characters, for example.
be80617ec59b [gaim-migrate @ 14211]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11878
diff changeset
321 *
be80617ec59b [gaim-migrate @ 14211]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11878
diff changeset
322 * Example usage:
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15707
diff changeset
323 * purple_str_strip_char(my_dumb_string, '\n');
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
324 *
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
325 * Since: 2.0.0
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
326 */
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
327 PURPLE_AVAILABLE_IN_ALL
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15707
diff changeset
328 void purple_str_strip_char(char *str, char thechar);
11920
be80617ec59b [gaim-migrate @ 14211]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11878
diff changeset
329
be80617ec59b [gaim-migrate @ 14211]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11878
diff changeset
330 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
331 * purple_util_chrreplace:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
332 * @string: The string from which to replace stuff.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
333 * @delimiter: The character you want replaced.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
334 * @replacement: The character you want inserted in place
11920
be80617ec59b [gaim-migrate @ 14211]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11878
diff changeset
335 * of the delimiting character.
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
336 *
11920
be80617ec59b [gaim-migrate @ 14211]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11878
diff changeset
337 * Given a string, this replaces all instances of one character
be80617ec59b [gaim-migrate @ 14211]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11878
diff changeset
338 * with another. This happens inline (the original string IS
be80617ec59b [gaim-migrate @ 14211]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11878
diff changeset
339 * modified).
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
340 *
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
341 * Since: 2.0.0
11920
be80617ec59b [gaim-migrate @ 14211]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11878
diff changeset
342 */
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
343 PURPLE_AVAILABLE_IN_ALL
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15707
diff changeset
344 void purple_util_chrreplace(char *string, char delimiter,
11920
be80617ec59b [gaim-migrate @ 14211]
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 11878
diff changeset
345 char replacement);
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
346
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
347 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
348 * purple_strreplace:
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
349 * @string: The string from which to replace stuff.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
350 * @delimiter: The substring you want replaced.
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
351 * @replacement: The substring you want inserted in place
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
352 * of the delimiting substring.
8461
920171a59e45 [gaim-migrate @ 9191]
Mark Doliner <markdoliner@pidgin.im>
parents: 8442
diff changeset
353 *
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
354 * Given a string, this replaces one substring with another
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
355 * and returns a newly allocated string.
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
356 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
357 * Returns: A new string, after performing the substitution.
8461
920171a59e45 [gaim-migrate @ 9191]
Mark Doliner <markdoliner@pidgin.im>
parents: 8442
diff changeset
358 * free this with g_free().
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
359 *
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
360 * Since: 2.0.0
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
361 */
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
362 PURPLE_AVAILABLE_IN_ALL
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15707
diff changeset
363 gchar *purple_strreplace(const char *string, const char *delimiter,
8341
dc43b1acfc1a [gaim-migrate @ 9065]
Mark Doliner <markdoliner@pidgin.im>
parents: 8163
diff changeset
364 const char *replacement);
dc43b1acfc1a [gaim-migrate @ 9065]
Mark Doliner <markdoliner@pidgin.im>
parents: 8163
diff changeset
365
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
366 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
367 * purple_str_seconds_to_string:
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
368 * @sec: The seconds.
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
369 *
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
370 * Converts seconds into a human-readable form.
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
371 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
372 * Returns: A human-readable form, containing days, hours, minutes, and
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
373 * seconds.
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
374 *
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
375 * Since: 2.0.0
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
376 */
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
377 PURPLE_AVAILABLE_IN_ALL
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15707
diff changeset
378 char *purple_str_seconds_to_string(guint sec);
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
379
9277
08d5a10f91c6 [gaim-migrate @ 10080]
Tim Ringenbach <marv@pidgin.im>
parents: 9227
diff changeset
380 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
381 * purple_str_wipe:
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
382 * @str: A NUL-terminated string to free, or a NULL-pointer.
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
383 *
34145
fa72f1e5cd77 Some polishing on files modified on this branch (mostly formatting)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33773
diff changeset
384 * Fills a NUL-terminated string with zeros and frees it.
fa72f1e5cd77 Some polishing on files modified on this branch (mostly formatting)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33773
diff changeset
385 *
fa72f1e5cd77 Some polishing on files modified on this branch (mostly formatting)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33773
diff changeset
386 * It should be used to free sensitive data, like passwords.
42391
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
387 *
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
388 * Since: 3.0.0
34145
fa72f1e5cd77 Some polishing on files modified on this branch (mostly formatting)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33773
diff changeset
389 */
42391
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
390 PURPLE_AVAILABLE_IN_3_0
34145
fa72f1e5cd77 Some polishing on files modified on this branch (mostly formatting)
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 33773
diff changeset
391 void purple_str_wipe(gchar *str);
34171
a23f3228c465 New keyring: store passwords using Windows credentials
Tomasz Wasilczyk <tomkiewicz@cpw.pidgin.im>
parents: 34145
diff changeset
392
42060
d55b605fdafb Add purple_strmatches and move purple_person_matches and purple_contact_info_matches to it
Gary Kramlich <grim@reaperworld.com>
parents: 42007
diff changeset
393 /**
d55b605fdafb Add purple_strmatches and move purple_person_matches and purple_contact_info_matches to it
Gary Kramlich <grim@reaperworld.com>
parents: 42007
diff changeset
394 * purple_strmatches:
d55b605fdafb Add purple_strmatches and move purple_person_matches and purple_contact_info_matches to it
Gary Kramlich <grim@reaperworld.com>
parents: 42007
diff changeset
395 * @pattern: The pattern to search for.
d55b605fdafb Add purple_strmatches and move purple_person_matches and purple_contact_info_matches to it
Gary Kramlich <grim@reaperworld.com>
parents: 42007
diff changeset
396 * @str: The string to check.
d55b605fdafb Add purple_strmatches and move purple_person_matches and purple_contact_info_matches to it
Gary Kramlich <grim@reaperworld.com>
parents: 42007
diff changeset
397 *
d55b605fdafb Add purple_strmatches and move purple_person_matches and purple_contact_info_matches to it
Gary Kramlich <grim@reaperworld.com>
parents: 42007
diff changeset
398 * Checks if @pattern occurs in sequential order in @str in a caseless fashion,
d55b605fdafb Add purple_strmatches and move purple_person_matches and purple_contact_info_matches to it
Gary Kramlich <grim@reaperworld.com>
parents: 42007
diff changeset
399 * ignoring characters in between.
d55b605fdafb Add purple_strmatches and move purple_person_matches and purple_contact_info_matches to it
Gary Kramlich <grim@reaperworld.com>
parents: 42007
diff changeset
400 *
d55b605fdafb Add purple_strmatches and move purple_person_matches and purple_contact_info_matches to it
Gary Kramlich <grim@reaperworld.com>
parents: 42007
diff changeset
401 * For example, if @pattern was `Pg` and @str was `Pidgin`, this will return
d55b605fdafb Add purple_strmatches and move purple_person_matches and purple_contact_info_matches to it
Gary Kramlich <grim@reaperworld.com>
parents: 42007
diff changeset
402 * %TRUE.
d55b605fdafb Add purple_strmatches and move purple_person_matches and purple_contact_info_matches to it
Gary Kramlich <grim@reaperworld.com>
parents: 42007
diff changeset
403 *
d55b605fdafb Add purple_strmatches and move purple_person_matches and purple_contact_info_matches to it
Gary Kramlich <grim@reaperworld.com>
parents: 42007
diff changeset
404 * Returns: %TRUE if @pattern occurs in sequential order in @str, %FALSE
d55b605fdafb Add purple_strmatches and move purple_person_matches and purple_contact_info_matches to it
Gary Kramlich <grim@reaperworld.com>
parents: 42007
diff changeset
405 * otherwise.
d55b605fdafb Add purple_strmatches and move purple_person_matches and purple_contact_info_matches to it
Gary Kramlich <grim@reaperworld.com>
parents: 42007
diff changeset
406 *
d55b605fdafb Add purple_strmatches and move purple_person_matches and purple_contact_info_matches to it
Gary Kramlich <grim@reaperworld.com>
parents: 42007
diff changeset
407 * Since: 3.0.0
d55b605fdafb Add purple_strmatches and move purple_person_matches and purple_contact_info_matches to it
Gary Kramlich <grim@reaperworld.com>
parents: 42007
diff changeset
408 */
42387
d9350cda1556 Export symbols added for 3.0.0
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42344
diff changeset
409 PURPLE_AVAILABLE_IN_3_0
42060
d55b605fdafb Add purple_strmatches and move purple_person_matches and purple_contact_info_matches to it
Gary Kramlich <grim@reaperworld.com>
parents: 42007
diff changeset
410 gboolean purple_strmatches(const char *pattern, const char *str);
d55b605fdafb Add purple_strmatches and move purple_person_matches and purple_contact_info_matches to it
Gary Kramlich <grim@reaperworld.com>
parents: 42007
diff changeset
411
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
412 /**************************************************************************/
35472
474e26199560 Removed @name
Ankit Vani <a@nevitus.org>
parents: 35471
diff changeset
413 /* URI/URL Functions */
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
414 /**************************************************************************/
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
415
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
416 PURPLE_AVAILABLE_IN_ALL
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15707
diff changeset
417 void purple_got_protocol_handler_uri(const char *uri);
15678
7434ef155a3a Core support for external protocol URIs. The actual handling of the URIs will be in the prpls and other plugins. This commit only includes the win32 method of actually passing in a URI - the dbus implementation still needs to be written.
Daniel Atallah <datallah@pidgin.im>
parents: 15482
diff changeset
418
7107
903864ff76c3 [gaim-migrate @ 7672]
Christian Hammond <chipx86@chipx86.com>
parents: 7106
diff changeset
419 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
420 * purple_url_encode:
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
421 * @str: The string to translate.
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
422 *
7134
e999c4697e38 [gaim-migrate @ 7701]
Sean Egan <seanegan@pidgin.im>
parents: 7123
diff changeset
423 * Encodes a URL into an escaped string.
e999c4697e38 [gaim-migrate @ 7701]
Sean Egan <seanegan@pidgin.im>
parents: 7123
diff changeset
424 *
e999c4697e38 [gaim-migrate @ 7701]
Sean Egan <seanegan@pidgin.im>
parents: 7123
diff changeset
425 * This will change non-alphanumeric characters to hex codes.
e999c4697e38 [gaim-migrate @ 7701]
Sean Egan <seanegan@pidgin.im>
parents: 7123
diff changeset
426 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
427 * Returns: The resulting string.
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
428 *
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
429 * Since: 2.0.0
7134
e999c4697e38 [gaim-migrate @ 7701]
Sean Egan <seanegan@pidgin.im>
parents: 7123
diff changeset
430 */
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
431 PURPLE_AVAILABLE_IN_ALL
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15707
diff changeset
432 const char *purple_url_encode(const char *str);
6982
12f08de92674 [gaim-migrate @ 7538]
Mark Doliner <markdoliner@pidgin.im>
parents: 6861
diff changeset
433
9045
c665ceb89b85 [gaim-migrate @ 9821]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 9000
diff changeset
434 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
435 * purple_email_is_valid:
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
436 * @address: The email address to validate.
9045
c665ceb89b85 [gaim-migrate @ 9821]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 9000
diff changeset
437 *
c665ceb89b85 [gaim-migrate @ 9821]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 9000
diff changeset
438 * Checks if the given email address is syntactically valid.
c665ceb89b85 [gaim-migrate @ 9821]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 9000
diff changeset
439 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
440 * Returns: True if the email address is syntactically correct.
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
441 *
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
442 * Since: 2.0.0
9045
c665ceb89b85 [gaim-migrate @ 9821]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 9000
diff changeset
443 */
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
444 PURPLE_AVAILABLE_IN_ALL
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15707
diff changeset
445 gboolean purple_email_is_valid(const char *address);
9045
c665ceb89b85 [gaim-migrate @ 9821]
Stu Tomlinson <nosnilmot@pidgin.im>
parents: 9000
diff changeset
446
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
447 /**************************************************************************
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
448 * UTF8 String Functions
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
449 **************************************************************************/
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
450
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
451 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
452 * purple_utf8_try_convert:
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
453 * @str: The source string.
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
454 *
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
455 * Attempts to convert a string to UTF-8 from an unknown encoding.
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
456 *
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
457 * This function checks the locale and tries sane defaults.
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
458 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
459 * Returns: The UTF-8 string, or %NULL if it could not be converted.
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
460 *
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
461 * Since: 2.0.0
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
462 */
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
463 PURPLE_AVAILABLE_IN_ALL
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15707
diff changeset
464 gchar *purple_utf8_try_convert(const char *str);
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
465
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
466 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
467 * purple_utf8_strip_unprintables:
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
468 * @str: A valid UTF-8 string.
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
469 *
27237
0643ac0e5658 Add purple_utf8_strip_unprintables and use it on outgoing XMPP messages.
Paul Aurich <darkrain42@pidgin.im>
parents: 27234
diff changeset
470 * Removes unprintable characters from a UTF-8 string. These characters
0643ac0e5658 Add purple_utf8_strip_unprintables and use it on outgoing XMPP messages.
Paul Aurich <darkrain42@pidgin.im>
parents: 27234
diff changeset
471 * (in particular low-ASCII characters) are invalid in XML 1.0 and thus
28384
e167fb02072e Hmm, g_unichar_isgraph is too restrictive in the characters allowed (it munges \t). Change purple_utf8_strip_unprintables to simply remove ASCII control characters instead.
Paul Aurich <darkrain42@pidgin.im>
parents: 27727
diff changeset
472 * are not allowed in XMPP and are rejected by libxml2 by default.
e167fb02072e Hmm, g_unichar_isgraph is too restrictive in the characters allowed (it munges \t). Change purple_utf8_strip_unprintables to simply remove ASCII control characters instead.
Paul Aurich <darkrain42@pidgin.im>
parents: 27727
diff changeset
473 *
e167fb02072e Hmm, g_unichar_isgraph is too restrictive in the characters allowed (it munges \t). Change purple_utf8_strip_unprintables to simply remove ASCII control characters instead.
Paul Aurich <darkrain42@pidgin.im>
parents: 27727
diff changeset
474 * The returned string must be freed by the caller.
27237
0643ac0e5658 Add purple_utf8_strip_unprintables and use it on outgoing XMPP messages.
Paul Aurich <darkrain42@pidgin.im>
parents: 27234
diff changeset
475 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
476 * Returns: A newly allocated UTF-8 string without the unprintable characters.
42394
b3bc5ad00646 Export symbols and add Since tags for 2.6 API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42391
diff changeset
477 *
b3bc5ad00646 Export symbols and add Since tags for 2.6 API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42391
diff changeset
478 * Since: 2.6.0
27237
0643ac0e5658 Add purple_utf8_strip_unprintables and use it on outgoing XMPP messages.
Paul Aurich <darkrain42@pidgin.im>
parents: 27234
diff changeset
479 */
42394
b3bc5ad00646 Export symbols and add Since tags for 2.6 API
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42391
diff changeset
480 PURPLE_AVAILABLE_IN_2_6
27237
0643ac0e5658 Add purple_utf8_strip_unprintables and use it on outgoing XMPP messages.
Paul Aurich <darkrain42@pidgin.im>
parents: 27234
diff changeset
481 gchar *purple_utf8_strip_unprintables(const gchar *str);
0643ac0e5658 Add purple_utf8_strip_unprintables and use it on outgoing XMPP messages.
Paul Aurich <darkrain42@pidgin.im>
parents: 27234
diff changeset
482
0643ac0e5658 Add purple_utf8_strip_unprintables and use it on outgoing XMPP messages.
Paul Aurich <darkrain42@pidgin.im>
parents: 27234
diff changeset
483 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
484 * purple_utf8_strcasecmp:
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
485 * @a: The first string.
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
486 * @b: The second string.
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
487 *
25591
b19ece4232c1 I'm pretty sure this is what we meant here.
Etan Reisner <deryni@pidgin.im>
parents: 24072
diff changeset
488 * Compares two UTF-8 strings case-insensitively. This comparison is
16213
63bfcae0d7c9 Slightly more descriptive
Mark Doliner <markdoliner@pidgin.im>
parents: 16144
diff changeset
489 * more expensive than a simple g_utf8_collate() comparison because
63bfcae0d7c9 Slightly more descriptive
Mark Doliner <markdoliner@pidgin.im>
parents: 16144
diff changeset
490 * it calls g_utf8_casefold() on each string, which allocates new
63bfcae0d7c9 Slightly more descriptive
Mark Doliner <markdoliner@pidgin.im>
parents: 16144
diff changeset
491 * strings.
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
492 *
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
493 * Returns: -1 if @a is less than @b.
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
494 * 0 if @a is equal to @b.
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
495 * 1 if @a is greater than @b.
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
496 *
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
497 * Since: 2.0.0
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
498 */
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
499 PURPLE_AVAILABLE_IN_ALL
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15707
diff changeset
500 int purple_utf8_strcasecmp(const char *a, const char *b);
7108
82655fa54acb [gaim-migrate @ 7673]
Christian Hammond <chipx86@chipx86.com>
parents: 7107
diff changeset
501
7564
baab99d239d8 [gaim-migrate @ 8180]
Nathan Walp <nwalp@pidgin.im>
parents: 7478
diff changeset
502 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
503 * purple_utf8_has_word:
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
504 * @haystack: The string to search in.
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
505 * @needle: The substring to find.
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
506 *
11552
674a2a79943a [gaim-migrate @ 13812]
Casey Harkins <charkins@pidgin.im>
parents: 11501
diff changeset
507 * Case insensitive search for a word in a string. The needle string
674a2a79943a [gaim-migrate @ 13812]
Casey Harkins <charkins@pidgin.im>
parents: 11501
diff changeset
508 * must be contained in the haystack string and not be immediately
41083
590d533cf290 Fix several typos in libpurple
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 40870
diff changeset
509 * preceded or immediately followed by another alphanumeric character.
11552
674a2a79943a [gaim-migrate @ 13812]
Casey Harkins <charkins@pidgin.im>
parents: 11501
diff changeset
510 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
511 * Returns: TRUE if haystack has the word, otherwise FALSE
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
512 *
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
513 * Since: 2.0.0
11552
674a2a79943a [gaim-migrate @ 13812]
Casey Harkins <charkins@pidgin.im>
parents: 11501
diff changeset
514 */
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
515 PURPLE_AVAILABLE_IN_ALL
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15707
diff changeset
516 gboolean purple_utf8_has_word(const char *haystack, const char *needle);
11552
674a2a79943a [gaim-migrate @ 13812]
Casey Harkins <charkins@pidgin.im>
parents: 11501
diff changeset
517
674a2a79943a [gaim-migrate @ 13812]
Casey Harkins <charkins@pidgin.im>
parents: 11501
diff changeset
518 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
519 * purple_text_strip_mnemonic:
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
520 * @in: The string to strip
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
521 *
7889
34cc5467bf55 [gaim-migrate @ 8547]
Nathan Walp <nwalp@pidgin.im>
parents: 7821
diff changeset
522 * Removes the underscore characters from a string used identify the mnemonic
34cc5467bf55 [gaim-migrate @ 8547]
Nathan Walp <nwalp@pidgin.im>
parents: 7821
diff changeset
523 * character.
34cc5467bf55 [gaim-migrate @ 8547]
Nathan Walp <nwalp@pidgin.im>
parents: 7821
diff changeset
524 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
525 * Returns: The stripped string
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
526 *
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
527 * Since: 2.0.0
7889
34cc5467bf55 [gaim-migrate @ 8547]
Nathan Walp <nwalp@pidgin.im>
parents: 7821
diff changeset
528 */
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
529 PURPLE_AVAILABLE_IN_ALL
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15707
diff changeset
530 char *purple_text_strip_mnemonic(const char *in);
7889
34cc5467bf55 [gaim-migrate @ 8547]
Nathan Walp <nwalp@pidgin.im>
parents: 7821
diff changeset
531
8432
45a8b2b8c1ed [gaim-migrate @ 9162]
Kevin Stange <kstange@pidgin.im>
parents: 8341
diff changeset
532 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
533 * purple_escape_filename:
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
534 * @str: The string to translate.
9926
9957e01fd88a [gaim-migrate @ 10818]
Nathan Walp <nwalp@pidgin.im>
parents: 9670
diff changeset
535 *
9957e01fd88a [gaim-migrate @ 10818]
Nathan Walp <nwalp@pidgin.im>
parents: 9670
diff changeset
536 * Escapes filesystem-unfriendly characters from a filename
9957e01fd88a [gaim-migrate @ 10818]
Nathan Walp <nwalp@pidgin.im>
parents: 9670
diff changeset
537 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
538 * Returns: The resulting string.
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
539 *
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
540 * Since: 2.0.0
9926
9957e01fd88a [gaim-migrate @ 10818]
Nathan Walp <nwalp@pidgin.im>
parents: 9670
diff changeset
541 */
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
542 PURPLE_AVAILABLE_IN_ALL
15884
4de1981757fc sed -ie 's/gaim/purple/g'
Sean Egan <seanegan@pidgin.im>
parents: 15707
diff changeset
543 const char *purple_escape_filename(const char *str);
9926
9957e01fd88a [gaim-migrate @ 10818]
Nathan Walp <nwalp@pidgin.im>
parents: 9670
diff changeset
544
15482
b943b932a41b Make sure the pounces, buddy-aliases, savedstatuses etc. saved before the aim/icq split works after the split. The util function _gaim_oscar_convert will be removed at a 'suitable' time in the future.
Sadrul Habib Chowdhury <sadrul@pidgin.im>
parents: 15435
diff changeset
545 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
546 * purple_value_new:
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
547 * @type: The type of data to be held by the GValue
34808
442af3e72671 Added purple_g_value_new() and purple_g_value_free() to util
Ankit Vani <a@nevitus.org>
parents: 34614
diff changeset
548 *
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
549 * Creates a new GValue of the specified type.
34808
442af3e72671 Added purple_g_value_new() and purple_g_value_free() to util
Ankit Vani <a@nevitus.org>
parents: 34614
diff changeset
550 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
551 * Returns: The created GValue
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
552 *
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
553 * Since: 2.0.0
34808
442af3e72671 Added purple_g_value_new() and purple_g_value_free() to util
Ankit Vani <a@nevitus.org>
parents: 34614
diff changeset
554 */
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
555 PURPLE_AVAILABLE_IN_ALL
35005
bff56dfca65d Renamed purple_g_value_* to purple_value_*
Ankit Vani <a@nevitus.org>
parents: 34935
diff changeset
556 GValue *purple_value_new(GType type);
34808
442af3e72671 Added purple_g_value_new() and purple_g_value_free() to util
Ankit Vani <a@nevitus.org>
parents: 34614
diff changeset
557
442af3e72671 Added purple_g_value_new() and purple_g_value_free() to util
Ankit Vani <a@nevitus.org>
parents: 34614
diff changeset
558 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
559 * purple_value_dup:
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
560 * @value: The GValue to duplicate
34822
5c3970547cda Added purple_g_value_dup() to util
Ankit Vani <a@nevitus.org>
parents: 34808
diff changeset
561 *
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
562 * Duplicates a GValue.
34822
5c3970547cda Added purple_g_value_dup() to util
Ankit Vani <a@nevitus.org>
parents: 34808
diff changeset
563 *
35393
00f876b129bc Initial replacements for gtk-doc style comments
Ankit Vani <a@nevitus.org>
parents: 35265
diff changeset
564 * Returns: The duplicated GValue
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
565 *
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
566 * Since: 2.0.0
34822
5c3970547cda Added purple_g_value_dup() to util
Ankit Vani <a@nevitus.org>
parents: 34808
diff changeset
567 */
42408
94151c4d26b5 Add Since tags/visibility exports to utility functions
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42398
diff changeset
568 PURPLE_AVAILABLE_IN_ALL
35005
bff56dfca65d Renamed purple_g_value_* to purple_value_*
Ankit Vani <a@nevitus.org>
parents: 34935
diff changeset
569 GValue *purple_value_dup(GValue *value);
34822
5c3970547cda Added purple_g_value_dup() to util
Ankit Vani <a@nevitus.org>
parents: 34808
diff changeset
570
5c3970547cda Added purple_g_value_dup() to util
Ankit Vani <a@nevitus.org>
parents: 34808
diff changeset
571 /**
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
572 * purple_value_free:
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
573 * @value: The GValue to free.
34808
442af3e72671 Added purple_g_value_new() and purple_g_value_free() to util
Ankit Vani <a@nevitus.org>
parents: 34614
diff changeset
574 *
35400
a22531410e3f Convert docs from doxygen to gtk-doc format for request.h and util.h
Ankit Vani <a@nevitus.org>
parents: 35394
diff changeset
575 * Frees a GValue.
42391
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
576 *
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
577 * Since: 3.0.0
34808
442af3e72671 Added purple_g_value_new() and purple_g_value_free() to util
Ankit Vani <a@nevitus.org>
parents: 34614
diff changeset
578 */
42391
090b03385984 Add Since and symbol visibility to new-in-3.0 things
Elliott Sales de Andrade <quantum.analyst@gmail.com>
parents: 42387
diff changeset
579 PURPLE_AVAILABLE_IN_3_0
35005
bff56dfca65d Renamed purple_g_value_* to purple_value_*
Ankit Vani <a@nevitus.org>
parents: 34935
diff changeset
580 void purple_value_free(GValue *value);
34808
442af3e72671 Added purple_g_value_new() and purple_g_value_free() to util
Ankit Vani <a@nevitus.org>
parents: 34614
diff changeset
581
32787
7072f190d6ad Use G_BEGIN/END_DECLS in public libpurple files. This was
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 32737
diff changeset
582 G_END_DECLS
5944
f19df037ac58 [gaim-migrate @ 6385]
Christian Hammond <chipx86@chipx86.com>
parents: 5943
diff changeset
583
39659
e4dfb99b0cef Fix libpurple header guards using reserved names.
Elliott Sales de Andrade <qulogic@pidgin.im>
parents: 39527
diff changeset
584 #endif /* PURPLE_UTIL_H */

mercurial