Several smaller fixes to compile on windows
[deb_shairplay.git] / src / include / raop.h
1 #ifndef RAOP_H
2 #define RAOP_H
3 #ifdef __cplusplus
4 extern "C" {
5 #endif
6
7 typedef struct raop_s raop_t;
8
9 struct raop_callbacks_s {
10 void* cls;
11 void (*audio_init)(void *cls, void **session, int bits, int channels, int samplerate);
12 void (*audio_set_volume)(void *cls, void *session, float volume);
13 void (*audio_process)(void *cls, void *session, const void *buffer, int buflen);
14 void (*audio_flush)(void *cls, void *session);
15 void (*audio_destroy)(void *cls, void *session);
16 };
17 typedef struct raop_callbacks_s raop_callbacks_t;
18
19 raop_t *raop_init(raop_callbacks_t *callbacks, const char *pemkey);
20 raop_t *raop_init_from_keyfile(raop_callbacks_t *callbacks, const char *keyfile);
21
22 int raop_start(raop_t *raop, unsigned short *port, const char *hwaddr, int hwaddrlen);
23 void raop_stop(raop_t *raop);
24
25 void raop_destroy(raop_t *raop);
26
27 #ifdef __cplusplus
28 }
29 #endif
30 #endif