]> code.delx.au - pulseaudio/blob - polyp/tagstruct.h
Make the whole stuff LGPL only
[pulseaudio] / polyp / tagstruct.h
1 #ifndef footagstructhfoo
2 #define footagstructhfoo
3
4 /* $Id$ */
5
6 /***
7 This file is part of polypaudio.
8
9 polypaudio is free software; you can redistribute it and/or modify
10 it under the terms of the GNU Lesser General Public License as
11 published by the Free Software Foundation; either version 2.1 of the
12 License, or (at your option) any later version.
13
14 polypaudio is distributed in the hope that it will be useful, but
15 WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 Lesser General Public License for more details.
18
19 You should have received a copy of the GNU Lesser General Public
20 License along with polypaudio; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 USA.
23 ***/
24
25 #include <inttypes.h>
26 #include <sys/types.h>
27 #include <sys/time.h>
28 #include <time.h>
29
30 #include "sample.h"
31
32 struct pa_tagstruct;
33
34 struct pa_tagstruct *pa_tagstruct_new(const uint8_t* data, size_t length);
35 void pa_tagstruct_free(struct pa_tagstruct*t);
36 uint8_t* pa_tagstruct_free_data(struct pa_tagstruct*t, size_t *l);
37
38 void pa_tagstruct_puts(struct pa_tagstruct*t, const char *s);
39 void pa_tagstruct_putu8(struct pa_tagstruct*t, uint8_t c);
40 void pa_tagstruct_putu32(struct pa_tagstruct*t, uint32_t i);
41 void pa_tagstruct_putu64(struct pa_tagstruct*t, uint64_t i);
42 void pa_tagstruct_put_sample_spec(struct pa_tagstruct *t, const struct pa_sample_spec *ss);
43 void pa_tagstruct_put_arbitrary(struct pa_tagstruct*t, const void *p, size_t length);
44 void pa_tagstruct_put_boolean(struct pa_tagstruct*t, int b);
45 void pa_tagstruct_put_timeval(struct pa_tagstruct*t, const struct timeval *tv);
46 void pa_tagstruct_put_usec(struct pa_tagstruct*t, pa_usec_t u);
47
48 int pa_tagstruct_gets(struct pa_tagstruct*t, const char **s);
49 int pa_tagstruct_getu8(struct pa_tagstruct*t, uint8_t *c);
50 int pa_tagstruct_getu32(struct pa_tagstruct*t, uint32_t *i);
51 int pa_tagstruct_getu64(struct pa_tagstruct*t, uint64_t *i);
52 int pa_tagstruct_get_sample_spec(struct pa_tagstruct *t, struct pa_sample_spec *ss);
53 int pa_tagstruct_get_arbitrary(struct pa_tagstruct *t, const void **p, size_t length);
54 int pa_tagstruct_get_boolean(struct pa_tagstruct *t, int *b);
55 int pa_tagstruct_get_timeval(struct pa_tagstruct*t, struct timeval *tv);
56 int pa_tagstruct_get_usec(struct pa_tagstruct*t, pa_usec_t *u);
57
58 int pa_tagstruct_eof(struct pa_tagstruct*t);
59 const uint8_t* pa_tagstruct_data(struct pa_tagstruct*t, size_t *l);
60
61 #endif