2 * valerie_parser.h -- Valerie Parser for Miracle Server
3 * Copyright (C) 2002-2003 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 _VALERIE_PARSER_H_
22 #define _VALERIE_PARSER_H_
24 /* Application header files */
25 #include "valerie_response.h"
26 #include "valerie_notifier.h"
33 /** Callbacks to define the parser.
36 typedef valerie_response (*parser_connect
)( void * );
37 typedef valerie_response (*parser_execute
)( void *, char * );
38 typedef void (*parser_close
)( void * );
40 /** Structure for the valerie parser.
45 parser_connect connect
;
46 parser_execute execute
;
49 valerie_notifier notifier
;
51 *valerie_parser
, valerie_parser_t
;
53 /** API for the parser - note that no constructor is defined here.
56 extern valerie_response
valerie_parser_connect( valerie_parser
);
57 extern valerie_response
valerie_parser_execute( valerie_parser
, char * );
58 extern valerie_response
valerie_parser_executef( valerie_parser
, char *, ... );
59 extern valerie_response
valerie_parser_run( valerie_parser
, char * );
60 extern valerie_notifier
valerie_parser_get_notifier( valerie_parser
);
61 extern void valerie_parser_close( valerie_parser
);