1 #ifndef footagstructhfoo
2 #define footagstructhfoo
5 This file is part of PulseAudio.
7 Copyright 2004-2006 Lennart Poettering
9 PulseAudio 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.
14 PulseAudio 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.
19 You should have received a copy of the GNU Lesser General Public
20 License along with PulseAudio; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
26 #include <sys/types.h>
30 #include <pulse/sample.h>
31 #include <pulse/channelmap.h>
32 #include <pulse/volume.h>
33 #include <pulse/proplist.h>
34 #include <pulse/gccmacro.h>
36 #include <pulsecore/macro.h>
38 typedef struct pa_tagstruct pa_tagstruct;
43 PA_TAG_STRING_NULL = 'N',
48 PA_TAG_SAMPLE_SPEC = 'a',
49 PA_TAG_ARBITRARY = 'x',
50 PA_TAG_BOOLEAN_TRUE = '1',
51 PA_TAG_BOOLEAN_FALSE = '0',
52 PA_TAG_BOOLEAN = PA_TAG_BOOLEAN_TRUE,
54 PA_TAG_USEC = 'U' /* 64bit unsigned */,
55 PA_TAG_CHANNEL_MAP = 'm',
60 pa_tagstruct *pa_tagstruct_new(const uint8_t* data, size_t length);
61 void pa_tagstruct_free(pa_tagstruct*t);
62 uint8_t* pa_tagstruct_free_data(pa_tagstruct*t, size_t *l);
64 int pa_tagstruct_eof(pa_tagstruct*t);
65 const uint8_t* pa_tagstruct_data(pa_tagstruct*t, size_t *l);
67 void pa_tagstruct_put(pa_tagstruct *t, ...);
69 void pa_tagstruct_puts(pa_tagstruct*t, const char *s);
70 void pa_tagstruct_putu8(pa_tagstruct*t, uint8_t c);
71 void pa_tagstruct_putu32(pa_tagstruct*t, uint32_t i);
72 void pa_tagstruct_putu64(pa_tagstruct*t, uint64_t i);
73 void pa_tagstruct_puts64(pa_tagstruct*t, int64_t i);
74 void pa_tagstruct_put_sample_spec(pa_tagstruct *t, const pa_sample_spec *ss);
75 void pa_tagstruct_put_arbitrary(pa_tagstruct*t, const void *p, size_t length);
76 void pa_tagstruct_put_boolean(pa_tagstruct*t, pa_bool_t b);
77 void pa_tagstruct_put_timeval(pa_tagstruct*t, const struct timeval *tv);
78 void pa_tagstruct_put_usec(pa_tagstruct*t, pa_usec_t u);
79 void pa_tagstruct_put_channel_map(pa_tagstruct *t, const pa_channel_map *map);
80 void pa_tagstruct_put_cvolume(pa_tagstruct *t, const pa_cvolume *cvolume);
81 void pa_tagstruct_put_proplist(pa_tagstruct *t, pa_proplist *p);
83 int pa_tagstruct_get(pa_tagstruct *t, ...);
85 int pa_tagstruct_gets(pa_tagstruct*t, const char **s);
86 int pa_tagstruct_getu8(pa_tagstruct*t, uint8_t *c);
87 int pa_tagstruct_getu32(pa_tagstruct*t, uint32_t *i);
88 int pa_tagstruct_getu64(pa_tagstruct*t, uint64_t *i);
89 int pa_tagstruct_gets64(pa_tagstruct*t, int64_t *i);
90 int pa_tagstruct_get_sample_spec(pa_tagstruct *t, pa_sample_spec *ss);
91 int pa_tagstruct_get_arbitrary(pa_tagstruct *t, const void **p, size_t length);
92 int pa_tagstruct_get_boolean(pa_tagstruct *t, pa_bool_t *b);
93 int pa_tagstruct_get_timeval(pa_tagstruct*t, struct timeval *tv);
94 int pa_tagstruct_get_usec(pa_tagstruct*t, pa_usec_t *u);
95 int pa_tagstruct_get_channel_map(pa_tagstruct *t, pa_channel_map *map);
96 int pa_tagstruct_get_cvolume(pa_tagstruct *t, pa_cvolume *v);
97 int pa_tagstruct_get_proplist(pa_tagstruct *t, pa_proplist *p);