source: roaraudio/roard/include/client.h @ 78:997d49ae275a

Last change on this file since 78:997d49ae275a was 78:997d49ae275a, checked in by phi, 16 years ago

added basic support to connect to streams of existing clients

File size: 1.3 KB
Line 
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
15struct 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
26struct roar_client * g_clients[ROAR_CLIENTS_MAX];
27
28
29// basic functions
30
31int clients_init      (void);
32int clients_free      (void);
33int clients_new       (void);
34int clients_delete    (int id);
35int clients_set_fh    (int id, int    fh);
36int clients_set_pid   (int id, int    pid);
37int clients_set_name  (int id, char * name);
38int clients_get       (int id, struct roar_client ** client);
39
40// network functions
41int clients_check_all  (void);
42int clients_check      (int id);
43int clients_send_mon   (struct roar_audio_info * sa, uint32_t pos);
44int clients_send_filter(struct roar_audio_info * sa, uint32_t pos);
45
46// stream functions
47
48
49int client_stream_exec   (int client, int stream);
50int client_stream_set_fh (int client, int stream, int fh);
51int client_stream_add    (int client, int stream);
52int client_stream_delete (int client, int stream);
53
54#endif
55
56//ll
Note: See TracBrowser for help on using the repository browser.