3e2f46537689cd23f41aca1ec57a1eda5652dac9
2 * mvcp_parser.h -- MVCP Parser for Melted
3 * Copyright (C) 2002-2009 Ushodaya Enterprises Limited
4 * Author: Charles Yates <charles.yates@pandora.be>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library 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 GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef _MVCP_PARSER_H_
22 #define _MVCP_PARSER_H_
24 /* MLT Header files */
25 #include <framework/mlt.h>
27 /* Application header files */
28 #include "mvcp_response.h"
29 #include "mvcp_notifier.h"
36 /** Callbacks to define the parser.
39 typedef mvcp_response (*parser_connect
)( void * );
40 typedef mvcp_response (*parser_execute
)( void *, char * );
41 typedef mvcp_response (*parser_received
)( void *, char *, char * );
42 typedef mvcp_response (*parser_push
)( void *, char *, mlt_service
);
43 typedef void (*parser_close
)( void * );
45 /** Structure for the mvcp parser.
50 parser_connect connect
;
51 parser_execute execute
;
53 parser_received received
;
56 mvcp_notifier notifier
;
58 *mvcp_parser
, mvcp_parser_t
;
60 /** API for the parser - note that no constructor is defined here.
63 extern mvcp_response
mvcp_parser_connect( mvcp_parser
);
64 extern mvcp_response
mvcp_parser_push( mvcp_parser
, char *, mlt_service
);
65 extern mvcp_response
mvcp_parser_received( mvcp_parser
, char *, char * );
66 extern mvcp_response
mvcp_parser_execute( mvcp_parser
, char * );
67 extern mvcp_response
mvcp_parser_executef( mvcp_parser
, const char *, ... );
68 extern mvcp_response
mvcp_parser_run( mvcp_parser
, char * );
69 extern mvcp_notifier
mvcp_parser_get_notifier( mvcp_parser
);
70 extern void mvcp_parser_close( mvcp_parser
);