source.h 535 Bytes
Newer Older
Jack Moffitt's avatar
Jack Moffitt committed
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
#ifndef __SOURCE_H__
#define __SOURCE_H__

typedef struct source_tag
{
	connection_t *con;
	http_parser_t *parser;
	
	char *mount;
	format_plugin_t *format;

	avl_tree *client_tree;
	avl_tree *pending_tree;

	rwlock_t *shutdown_rwlock;
} source_t;

source_t *source_create(connection_t *con, http_parser_t *parser, const char *mount, format_type_t type);
source_t *source_find_mount(const char *mount);
int source_compare_sources(void *arg, void *a, void *b);
int source_free_source(void *key);
void *source_main(void *arg);

#endif