Revision 3af4c8d7 src/path_handlers.h

View differences:

src/path_handlers.h
29 29
char * mg_uri_field(struct http_message *hm, uint8_t pos);
30 30

  
31 31
void channel_index(struct mg_connection *nc, struct http_message *hm);
32

  
33 32
void streamer_create(struct mg_connection *nc, struct http_message *hm);
34

  
35 33
void streamer_update(struct mg_connection *nc, struct http_message *hm);
36 34

  
35
void source_index(struct mg_connection *nc, struct http_message *hm);
36
void source_streamer_create(struct mg_connection *nc, struct http_message *hm);
37
void source_streamer_update(struct mg_connection *nc, struct http_message *hm);
38

  
37 39
uint8_t load_path_handlers(struct router *r)
38 40
{
39 41
	uint8_t res = 0;
......
42 44
	res |= router_add_route(r, "POST", "^/channels/[a-zA-Z0-9]+$", streamer_create);
43 45
	res |= router_add_route(r, "UPDATE", "^/channels/[a-zA-Z0-9]+$", streamer_update);
44 46

  
47
	res |= router_add_route(r, "GET", "^/sources$", source_index);
48
	res |= router_add_route(r, "POST", "^/sources/[a-zA-Z0-9]+$", source_streamer_create);
49
	res |= router_add_route(r, "UPDATE", "^/sources/[a-zA-Z0-9]+$", source_streamer_update);
50

  
45 51
	return res;
46 52
}
47 53

  

Also available in: Unified diff