XMMS2
xmmsv_util.h
Go to the documentation of this file.
1 /* XMMS2 - X Music Multiplexer System
2  * Copyright (C) 2003-2011 XMMS2 Team
3  *
4  * PLUGINS ARE NOT CONSIDERED TO BE DERIVED WORK !!!
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  */
16 
17 
18 #ifndef __XMMSV_UTIL_H__
19 #define __XMMSV_UTIL_H__
20 
21 #include "xmmsc/xmmsv_general.h"
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 /**
28  * @defgroup UtilValueType Utilities
29  * @ingroup ValueType
30  * @{
31  */
32 
33 #define xmmsv_check_type(type) ((type) > XMMSV_TYPE_NONE && (type) < XMMSV_TYPE_END)
34 
35 xmmsv_t *xmmsv_decode_url (const xmmsv_t *url);
36 
37 int xmmsv_utf8_validate (const char *str);
38 
39 xmmsv_t *xmmsv_make_stringlist (char *array[], int num);
40 
41 xmmsv_t *xmmsv_propdict_to_dict (xmmsv_t *propdict, const char **src_prefs);
42 
43 int xmmsv_dict_format (char *target, int len, const char *fmt, xmmsv_t *val);
44 
47 
48 /** @} */
49 
50 #ifdef __cplusplus
51 }
52 #endif
53 
54 #endif
xmmsv_t * xmmsv_propdict_to_dict(xmmsv_t *propdict, const char **src_prefs)
Helper function to transform a key-source-value dict-of-dict xmmsv_t (formerly a propdict) to a regul...
Definition: value.c:752
struct xmmsv_St xmmsv_t
Definition: xmmsv_general.h:48
xmmsv_t * xmmsv_decode_url(const xmmsv_t *url)
Decode an URL-encoded string.
Definition: value.c:2167
xmmsv_t * xmmsv_deserialize(xmmsv_t *v)
xmmsv_t * xmmsv_make_stringlist(char *array[], int num)
Helper function to build a list xmmsv_t containing the strings from the input array.
Definition: value.c:483
xmmsv_t * xmmsv_serialize(xmmsv_t *v)
int xmmsv_dict_format(char *target, int len, const char *fmt, xmmsv_t *val)
This function will make a pretty string about the information in xmmsv dict.
Definition: value.c:2304
int xmmsv_utf8_validate(const char *str)
Check if a string is valid UTF-8.
Definition: value.c:2444