libpurple/util.h

branch
soc.2013.gobjectification.plugins
changeset 37088
4d5ad6b1878e
parent 37075
cf3f735b09b7
parent 35486
fe9a7f6143c1
child 37094
84873ce721dc
equal deleted inserted replaced
37087:197d965cec97 37088:4d5ad6b1878e
217 const char *album, gpointer unused); 217 const char *album, gpointer unused);
218 218
219 /**************************************************************************/ 219 /**************************************************************************/
220 /* Utility Subsystem */ 220 /* Utility Subsystem */
221 /**************************************************************************/ 221 /**************************************************************************/
222 /*@{*/
223 222
224 /** 223 /**
225 * purple_util_init: 224 * purple_util_init:
226 * 225 *
227 * Initializes the utility subsystem. 226 * Initializes the utility subsystem.
233 * 232 *
234 * Uninitializes the util subsystem. 233 * Uninitializes the util subsystem.
235 */ 234 */
236 void purple_util_uninit(void); 235 void purple_util_uninit(void);
237 236
238 /*@}*/
239
240 /**************************************************************************/ 237 /**************************************************************************/
241 /* Base16 Functions */ 238 /* Base16 Functions */
242 /**************************************************************************/ 239 /**************************************************************************/
243 /*@{*/
244 240
245 /** 241 /**
246 * purple_base16_encode: 242 * purple_base16_encode:
247 * @data: The data to convert. 243 * @data: The data to convert.
248 * @len: The length of the data. 244 * @len: The length of the data.
288 * g_free'd when no longer needed. 284 * g_free'd when no longer needed.
289 */ 285 */
290 gchar *purple_base16_encode_chunked(const guchar *data, gsize len); 286 gchar *purple_base16_encode_chunked(const guchar *data, gsize len);
291 287
292 288
293 /*@}*/
294
295 /**************************************************************************/ 289 /**************************************************************************/
296 /* Base64 Functions */ 290 /* Base64 Functions */
297 /**************************************************************************/ 291 /**************************************************************************/
298 /*@{*/
299 292
300 /** 293 /**
301 * purple_base64_encode: 294 * purple_base64_encode:
302 * @data: The data to convert. 295 * @data: The data to convert.
303 * @len: The length of the data. 296 * @len: The length of the data.
327 * 320 *
328 * Returns: The raw data. Must be g_free'd when no longer needed. 321 * Returns: The raw data. Must be g_free'd when no longer needed.
329 */ 322 */
330 guchar *purple_base64_decode(const char *str, gsize *ret_len); 323 guchar *purple_base64_decode(const char *str, gsize *ret_len);
331 324
332 /*@}*/
333
334 /**************************************************************************/ 325 /**************************************************************************/
335 /* Quoted Printable Functions */ 326 /* Quoted Printable Functions */
336 /**************************************************************************/ 327 /**************************************************************************/
337 /*@{*/
338 328
339 /** 329 /**
340 * purple_quotedp_decode: 330 * purple_quotedp_decode:
341 * @str: The quoted printable ASCII string to convert to raw data. 331 * @str: The quoted printable ASCII string to convert to raw data.
342 * @ret_len: The length of the returned data. 332 * @ret_len: The length of the returned data.
349 * 339 *
350 * Returns: The readable string. Must be g_free'd when no longer needed. 340 * Returns: The readable string. Must be g_free'd when no longer needed.
351 */ 341 */
352 guchar *purple_quotedp_decode(const char *str, gsize *ret_len); 342 guchar *purple_quotedp_decode(const char *str, gsize *ret_len);
353 343
354 /*@}*/
355
356 /**************************************************************************/ 344 /**************************************************************************/
357 /* MIME Functions */ 345 /* MIME Functions */
358 /**************************************************************************/ 346 /**************************************************************************/
359 /*@{*/
360 347
361 /** 348 /**
362 * purple_mime_decode_field: 349 * purple_mime_decode_field:
363 * @str: The ASCII string, possibly containing any number of 350 * @str: The ASCII string, possibly containing any number of
364 * encoded-word sections. 351 * encoded-word sections.
378 * converted to UTF-8. Must be g_free'd when no longer 365 * converted to UTF-8. Must be g_free'd when no longer
379 * needed. 366 * needed.
380 */ 367 */
381 char *purple_mime_decode_field(const char *str); 368 char *purple_mime_decode_field(const char *str);
382 369
383 /*@}*/
384
385 370
386 /**************************************************************************/ 371 /**************************************************************************/
387 /* Date/Time Functions */ 372 /* Date/Time Functions */
388 /**************************************************************************/ 373 /**************************************************************************/
389 /*@{*/
390 374
391 /** 375 /**
392 * purple_utf8_strftime: 376 * purple_utf8_strftime:
393 * @format: The format string, in UTF-8 377 * @format: The format string, in UTF-8
394 * @tm: The time to format, or %NULL to use the current local time 378 * @tm: The time to format, or %NULL to use the current local time
544 * 528 *
545 * Returns: The time, formatted as per the user's settings. 529 * Returns: The time, formatted as per the user's settings.
546 */ 530 */
547 char *purple_uts35_to_str(const char *format, size_t len, struct tm *tm); 531 char *purple_uts35_to_str(const char *format, size_t len, struct tm *tm);
548 532
549 /*@}*/
550
551 533
552 /**************************************************************************/ 534 /**************************************************************************/
553 /* Markup Functions */ 535 /* Markup Functions */
554 /**************************************************************************/ 536 /**************************************************************************/
555 /*@{*/
556 537
557 /** 538 /**
558 * purple_markup_escape_text: 539 * purple_markup_escape_text:
559 * 540 *
560 * Escapes special characters in a plain-text string so they display 541 * Escapes special characters in a plain-text string so they display
772 * 753 *
773 * Returns: TRUE if the text contains RTL text, FALSE otherwise. 754 * Returns: TRUE if the text contains RTL text, FALSE otherwise.
774 */ 755 */
775 gboolean purple_markup_is_rtl(const char *html); 756 gboolean purple_markup_is_rtl(const char *html);
776 757
777 /*@}*/
778
779 758
780 /**************************************************************************/ 759 /**************************************************************************/
781 /* Path/Filename Functions */ 760 /* Path/Filename Functions */
782 /**************************************************************************/ 761 /**************************************************************************/
783 /*@{*/
784 762
785 /** 763 /**
786 * purple_home_dir: 764 * purple_home_dir:
787 * 765 *
788 * Returns the user's home directory. 766 * Returns the user's home directory.
923 * purple_util_get_image_extension(). This return value must 901 * purple_util_get_image_extension(). This return value must
924 * be g_freed by the caller. 902 * be g_freed by the caller.
925 */ 903 */
926 char *purple_util_get_image_filename(gconstpointer image_data, size_t image_len); 904 char *purple_util_get_image_filename(gconstpointer image_data, size_t image_len);
927 905
928 /*@}*/
929
930 906
931 /**************************************************************************/ 907 /**************************************************************************/
932 /* Environment Detection Functions */ 908 /* Environment Detection Functions */
933 /**************************************************************************/ 909 /**************************************************************************/
934 /*@{*/
935 910
936 /** 911 /**
937 * purple_program_is_valid: 912 * purple_program_is_valid:
938 * @program: The file name of the application. 913 * @program: The file name of the application.
939 * 914 *
1002 * 977 *
1003 * Returns: TRUE if a socket can speak IPv4. 978 * Returns: TRUE if a socket can speak IPv4.
1004 */ 979 */
1005 gboolean purple_socket_speaks_ipv4(int fd); 980 gboolean purple_socket_speaks_ipv4(int fd);
1006 981
1007 /*@}*/
1008
1009 982
1010 /**************************************************************************/ 983 /**************************************************************************/
1011 /* String Functions */ 984 /* String Functions */
1012 /**************************************************************************/ 985 /**************************************************************************/
1013 /*@{*/
1014 986
1015 /** 987 /**
1016 * purple_strequal: 988 * purple_strequal:
1017 * @left: A string 989 * @left: A string
1018 * @right: A string to compare with left 990 * @right: A string to compare with left
1284 * 1256 *
1285 * It should be used to free sensitive data, like passwords. 1257 * It should be used to free sensitive data, like passwords.
1286 */ 1258 */
1287 void purple_utf16_wipe(gunichar2 *str); 1259 void purple_utf16_wipe(gunichar2 *str);
1288 1260
1289 /*@}*/
1290
1291 1261
1292 /**************************************************************************/ 1262 /**************************************************************************/
1293 /* URI/URL Functions */ 1263 /* URI/URL Functions */
1294 /**************************************************************************/ 1264 /**************************************************************************/
1295 /*@{*/
1296 1265
1297 void purple_got_protocol_handler_uri(const char *uri); 1266 void purple_got_protocol_handler_uri(const char *uri);
1298 1267
1299 /** 1268 /**
1300 * purple_url_decode: 1269 * purple_url_decode:
1389 * purple_uri_list_extract_uris() function, this will discard 1358 * purple_uri_list_extract_uris() function, this will discard
1390 * any non-file uri from the result value. 1359 * any non-file uri from the result value.
1391 */ 1360 */
1392 GList *purple_uri_list_extract_filenames(const gchar *uri_list); 1361 GList *purple_uri_list_extract_filenames(const gchar *uri_list);
1393 1362
1394 /*@}*/
1395
1396 /************************************************************************** 1363 /**************************************************************************
1397 * UTF8 String Functions 1364 * UTF8 String Functions
1398 **************************************************************************/ 1365 **************************************************************************/
1399 /*@{*/
1400 1366
1401 /** 1367 /**
1402 * purple_utf8_try_convert: 1368 * purple_utf8_try_convert:
1403 * @str: The source string. 1369 * @str: The source string.
1404 * 1370 *
1508 * character. 1474 * character.
1509 * 1475 *
1510 * Returns: The stripped string 1476 * Returns: The stripped string
1511 */ 1477 */
1512 char *purple_text_strip_mnemonic(const char *in); 1478 char *purple_text_strip_mnemonic(const char *in);
1513
1514 /*@}*/
1515 1479
1516 /** 1480 /**
1517 * purple_add_eight: 1481 * purple_add_eight:
1518 * @x: The number to add 8 to. 1482 * @x: The number to add 8 to.
1519 * 1483 *

mercurial