XMMS2
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
src
include
xmmsc
xmmsv_general.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_GENERAL_H__
19
#define __XMMSV_GENERAL_H__
20
21
#include <stdarg.h>
22
#include "
xmmsc/xmmsc_compiler.h
"
23
#include "
xmmsc/xmmsc_stdint.h
"
24
#include "
xmmsc/xmmsv_coll.h
"
25
26
#ifdef __cplusplus
27
extern
"C"
{
28
#endif
29
30
/**
31
* @defgroup ValueType The type xmmsv_t
32
* @{
33
*/
34
35
typedef
enum
{
36
XMMSV_TYPE_NONE
,
37
XMMSV_TYPE_ERROR
,
38
XMMSV_TYPE_INT32
,
39
XMMSV_TYPE_STRING
,
40
XMMSV_TYPE_COLL
,
41
XMMSV_TYPE_BIN
,
42
XMMSV_TYPE_LIST
,
43
XMMSV_TYPE_DICT
,
44
XMMSV_TYPE_BITBUFFER
,
45
XMMSV_TYPE_END
46
}
xmmsv_type_t
;
47
48
typedef
struct
xmmsv_St
xmmsv_t
;
49
50
xmmsv_t
*
xmmsv_new_none
(
void
);
51
xmmsv_t
*
xmmsv_new_error
(
const
char
*errstr);
/* FIXME: err id? */
52
xmmsv_t
*
xmmsv_new_int
(int32_t i);
53
xmmsv_t
*
xmmsv_new_string
(
const
char
*s);
54
xmmsv_t
*
xmmsv_new_coll
(
xmmsv_coll_t
*coll);
55
xmmsv_t
*
xmmsv_new_bin
(
const
unsigned
char
*data,
unsigned
int
len);
56
57
xmmsv_t
*
xmmsv_ref
(
xmmsv_t
*val);
58
void
xmmsv_unref
(
xmmsv_t
*val);
59
60
xmmsv_type_t
xmmsv_get_type
(
const
xmmsv_t
*val);
61
int
xmmsv_is_type
(
const
xmmsv_t
*val,
xmmsv_type_t
t);
62
63
int
xmmsv_get_error
(
const
xmmsv_t
*val,
const
char
**r);
64
int
xmmsv_get_int
(
const
xmmsv_t
*val, int32_t *r);
65
int
xmmsv_get_string
(
const
xmmsv_t
*val,
const
char
**r);
66
int
xmmsv_get_coll
(
const
xmmsv_t
*val,
xmmsv_coll_t
**coll);
67
int
xmmsv_get_bin
(
const
xmmsv_t
*val,
const
unsigned
char
**r,
unsigned
int
*rlen);
68
69
/* legacy aliases */
70
int
xmmsv_is_error
(
const
xmmsv_t
*val);
71
72
/** @} */
73
74
#ifdef __cplusplus
75
}
76
#endif
77
78
#endif
Generated by
1.8.1