This repository has been archived by the owner on Aug 11, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 26
/
mvcp_parser.h
76 lines (64 loc) · 2.38 KB
/
mvcp_parser.h
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
* valerie_parser.h -- Valerie Parser for Miracle Server
* Copyright (C) 2002-2003 Ushodaya Enterprises Limited
* Author: Charles Yates <charles.yates@pandora.be>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#ifndef _VALERIE_PARSER_H_
#define _VALERIE_PARSER_H_
/* MLT Header files */
#include <framework/mlt.h>
/* Application header files */
#include "valerie_response.h"
#include "valerie_notifier.h"
#ifdef __cplusplus
extern "C"
{
#endif
/** Callbacks to define the parser.
*/
typedef valerie_response (*parser_connect)( void * );
typedef valerie_response (*parser_execute)( void *, char * );
typedef valerie_response (*parser_received)( void *, char *, char * );
typedef valerie_response (*parser_push)( void *, char *, mlt_service );
typedef void (*parser_close)( void * );
/** Structure for the valerie parser.
*/
typedef struct
{
parser_connect connect;
parser_execute execute;
parser_push push;
parser_received received;
parser_close close;
void *real;
valerie_notifier notifier;
}
*valerie_parser, valerie_parser_t;
/** API for the parser - note that no constructor is defined here.
*/
extern valerie_response valerie_parser_connect( valerie_parser );
extern valerie_response valerie_parser_push( valerie_parser, char *, mlt_service );
extern valerie_response valerie_parser_received( valerie_parser, char *, char * );
extern valerie_response valerie_parser_execute( valerie_parser, char * );
extern valerie_response valerie_parser_executef( valerie_parser, const char *, ... );
extern valerie_response valerie_parser_run( valerie_parser, char * );
extern valerie_notifier valerie_parser_get_notifier( valerie_parser );
extern void valerie_parser_close( valerie_parser );
#ifdef __cplusplus
}
#endif
#endif