};
typedef struct raop_callbacks_s raop_callbacks_t;
-RAOP_API raop_t *raop_init(int max_clients, raop_callbacks_t *callbacks, const char *pemkey);
-RAOP_API raop_t *raop_init_from_keyfile(int max_clients, raop_callbacks_t *callbacks, const char *keyfile);
+RAOP_API raop_t *raop_init(int max_clients, raop_callbacks_t *callbacks, const char *pemkey, int *error);
+RAOP_API raop_t *raop_init_from_keyfile(int max_clients, raop_callbacks_t *callbacks, const char *keyfile, int *error);
RAOP_API void raop_set_log_level(raop_t *raop, int level);
RAOP_API void raop_set_log_callback(raop_t *raop, raop_log_callback_t callback, void *cls);
}
raop_t *
-raop_init(int max_clients, raop_callbacks_t *callbacks, const char *pemkey)
+raop_init(int max_clients, raop_callbacks_t *callbacks, const char *pemkey, int *error)
{
raop_t *raop;
httpd_t *httpd;
}
raop_t *
-raop_init_from_keyfile(int max_clients, raop_callbacks_t *callbacks, const char *keyfile)
+raop_init_from_keyfile(int max_clients, raop_callbacks_t *callbacks, const char *keyfile, int *error)
{
raop_t *raop;
char *pemstr;
if (utils_read_file(&pemstr, keyfile) < 0) {
return NULL;
}
- raop = raop_init(max_clients, callbacks, pemstr);
+ raop = raop_init(max_clients, callbacks, pemstr, error);
free(pemstr);
return raop;
}
raop_cbs.audio_flush = audio_flush;
raop_cbs.audio_destroy = audio_destroy;
- raop = raop_init_from_keyfile(10, &raop_cbs, "airport.key");
+ raop = raop_init_from_keyfile(10, &raop_cbs, "airport.key", NULL);
raop_set_log_level(raop, RAOP_LOG_DEBUG);
raop_set_log_callback(raop, &raop_log_callback, NULL);
raop_start(raop, &raop_port, hwaddr, sizeof(hwaddr), "test");