a8aa33c17575c31e16dbc270af542476d1483f96
[ruby-vorbistagger.git] / ext / vcedit.h
1 /*
2  * Copyright (C) 2000-2001 Michael Smith (msmith at xiph org)
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation, version 2.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11  * Lesser General Public License for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public
14  * License along with this library; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
16  * MA 02110-1301 USA
17  */
18
19 #ifndef __VCEDIT_H
20 #define __VCEDIT_H
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 #include <stdio.h>
27 #include <ogg/ogg.h>
28 #include <vorbis/codec.h>
29
30 typedef size_t (*vcedit_read_func)(void *, size_t, size_t, void *);
31 typedef size_t (*vcedit_write_func)(const void *, size_t, size_t, void *);
32
33 typedef struct vcedit_state_St vcedit_state;
34
35 vcedit_state *vcedit_state_new (void);
36 void vcedit_state_ref (vcedit_state *state);
37 void vcedit_state_unref (vcedit_state *state);
38 vorbis_comment *vcedit_comments (vcedit_state *state);
39 int     vcedit_open_callbacks (vcedit_state *state, void *in,
40                            vcedit_read_func read_func,
41                            vcedit_write_func write_func);
42 int vcedit_write (vcedit_state *state, void *out);
43 const char *vcedit_error (vcedit_state *state);
44
45 #ifdef __cplusplus
46 }
47 #endif
48
49 #endif /* __VCEDIT_H */
50