Statistics
| Branch: | Revision:

peerstreamer-src / src / streamer_creation_callback.h @ 92a361ca

History | View | Annotate | Download (1.74 KB)

1
/*******************************************************************
2
* PeerStreamer-ng is a P2P video streaming application exposing a ReST
3
* interface.
4
* Copyright (C) 2017 Luca Baldesi <luca.baldesi@unitn.it>
5
*
6
* This program is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU Affero General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
* GNU Affero General Public License for more details.
15
*
16
* You should have received a copy of the GNU Affero General Public License
17
* along with this program.  If not, see <http://www.gnu.org/licenses/>.
18
*******************************************************************/
19

    
20
#ifndef __STREAMER_CREATION_CALLBACK_H__
21
#define __STREAMER_CREATION_CALLBACK_H__
22

    
23
#include<pstreamer.h>
24
#include<pschannel.h>
25
#include<stdint.h>
26
#include<mongoose.h>
27

    
28
struct pstreamer;
29
struct streamer_creation_callback;
30

    
31
typedef int8_t (*streamer_creation_handler_t)(struct mg_connection *nc, const struct pschannel_bucket * psb,  const struct pstreamer *ps, int8_t ret);
32

    
33
struct streamer_creation_callback * streamer_creation_callback_new(struct mg_connection *nc, const struct pschannel_bucket * psb, streamer_creation_handler_t handler);
34
 
35
int8_t streamer_creation_set_pstreamer_ref(struct streamer_creation_callback * scc, const struct pstreamer *ps);
36

    
37
int8_t streamer_creation_callback_trigger(struct streamer_creation_callback * scc, int8_t ret);
38

    
39
void streamer_creation_callback_destroy(struct streamer_creation_callback ** scc);
40

    
41
#endif