]> git.sesse.net Git - mlt/blob - src/miracle/miracle_server.h
Initial revision
[mlt] / src / miracle / miracle_server.h
1 /*
2  * dvserver.h -- DV Server
3  * Copyright (C) 2002-2003 Ushodaya Enterprises Limited
4  * Author: Charles Yates <charles.yates@pandora.be>
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2 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 General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software Foundation,
18  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19  */
20
21 #ifndef _DV_SERVER_H_
22 #define _DV_SERVER_H_
23
24 /* System header files */
25 #include <pthread.h>
26
27 /* Application header files */
28 #include <dvparser.h>
29
30 #ifdef __cplusplus
31 extern "C"
32 {
33 #endif
34
35 /** Servers default port
36 */
37
38 #define DEFAULT_TCP_PORT 5250
39
40 /** Structure for the server
41 */
42
43 typedef struct
44 {
45         char *id;
46         int port;
47         int socket;
48         dv_parser parser;
49         pthread_t thread;
50         int shutdown;
51         int proxy;
52         char remote_server[ 50 ];
53         int remote_port;
54 }
55 *dv_server, dv_server_t;
56
57 /** API for the server
58 */
59
60 extern dv_server dv_server_init( char * );
61 extern void dv_server_set_port( dv_server, int );
62 extern void dv_server_set_proxy( dv_server, char * );
63 extern int dv_server_execute( dv_server );
64 extern void dv_server_shutdown( dv_server );
65
66 #ifdef __cplusplus
67 }
68 #endif
69
70 #endif