-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathserver.h
More file actions
36 lines (24 loc) · 765 Bytes
/
Copy pathserver.h
File metadata and controls
36 lines (24 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <apr.h>
#include <event2/event.h>
#include <libspotify/api.h>
// Application state
struct state {
sp_session *session;
char *credentials_blob_filename;
struct event_base *event_base;
struct event *async;
struct event *timer;
struct event *sigint;
struct timeval next_timeout;
struct evhttp *http;
char *http_host;
int http_port;
apr_pool_t *pool;
int exit_status;
};
void credentials_blob_updated(sp_session *session, const char *blob);
void logged_in(sp_session *session, sp_error error);
void logged_out(sp_session *session);
void notify_main_thread(sp_session *session);
void process_events(evutil_socket_t socket, short what, void *userdata);
void sigint_handler(evutil_socket_t socket, short what, void *userdata);