1 | //client.h: |
---|
2 | |
---|
3 | #ifndef _CLIENT_H_ |
---|
4 | #define _CLIENT_H_ |
---|
5 | |
---|
6 | /* |
---|
7 | Defined in <roaraudio/client.h> |
---|
8 | |
---|
9 | |
---|
10 | #define ROAR_BUFFER_NAME 80 |
---|
11 | |
---|
12 | #define ROAR_CLIENTS_MAX 64 |
---|
13 | #define ROAR_CLIENTS_MAX_STREAMS_PER_CLIENT 4 |
---|
14 | |
---|
15 | struct roar_client { |
---|
16 | int fh; /-* controll connection *-/ |
---|
17 | // int last_stream; /-* id of the last stream created *-/ |
---|
18 | char name[ROAR_BUFFER_NAME]; |
---|
19 | int pid; |
---|
20 | char host[ROAR_BUFFER_NAME]; |
---|
21 | int execed; |
---|
22 | int streams[ROAR_CLIENTS_MAX_STREAMS_PER_CLIENT]; |
---|
23 | } * g_clients[ROAR_CLIENTS_MAX]; |
---|
24 | */ |
---|
25 | |
---|
26 | struct roar_client * g_clients[ROAR_CLIENTS_MAX]; |
---|
27 | |
---|
28 | |
---|
29 | // basic functions |
---|
30 | |
---|
31 | int clients_init (void); |
---|
32 | int clients_free (void); |
---|
33 | int clients_new (void); |
---|
34 | int clients_delete (int id); |
---|
35 | int clients_set_fh (int id, int fh); |
---|
36 | int clients_set_pid (int id, int pid); |
---|
37 | int clients_set_name (int id, char * name); |
---|
38 | int clients_get (int id, struct roar_client ** client); |
---|
39 | |
---|
40 | // network functions |
---|
41 | int clients_check_all (void); |
---|
42 | int clients_check (int id); |
---|
43 | int clients_send_mon (struct roar_audio_info * sa, uint32_t pos); |
---|
44 | int clients_send_filter(struct roar_audio_info * sa, uint32_t pos); |
---|
45 | |
---|
46 | // stream functions |
---|
47 | |
---|
48 | |
---|
49 | int client_stream_exec (int client, int stream); |
---|
50 | int client_stream_set_fh (int client, int stream, int fh); |
---|
51 | int client_stream_add (int client, int stream); |
---|
52 | int client_stream_delete (int client, int stream); |
---|
53 | |
---|
54 | #endif |
---|
55 | |
---|
56 | //ll |
---|