4 * Copyright (C) 2005 Novell, Inc.
9 * Permission is hereby granted, free of charge, to any person obtaining a
10 * copy of this software and associated documentation files (the "Software"),
11 * to deal in the Software without restriction, including without limitation
12 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13 * and/or sell copies of the Software, and to permit persons to whom the
14 * Software is furnished to do so, subject to the following conditions:
16 * The above copyright notice and this permission notice shall be included in
17 * all copies or substantial portions of the Software.
19 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
24 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25 * DEALINGS IN THE SOFTWARE.
28 #ifndef __BEAGLE_PARSER_H
29 #define __BEAGLE_PARSER_H
33 #include "beagle-response.h"
35 typedef struct _BeagleParserContext BeagleParserContext
;
37 typedef void (*BeagleParserStartElementFunction
) (BeagleParserContext
*ctx
, const char **attrs
);
38 typedef void (*BeagleParserEndElementFunction
) (BeagleParserContext
*ctx
);
45 BeagleParserStartElementFunction start_element_func
;
46 BeagleParserEndElementFunction end_element_func
;
47 } BeagleParserHandler
;
50 BeagleParserContext
*_beagle_parser_context_new (void);
52 BeagleResponse
*_beagle_parser_context_get_request (BeagleParserContext
*ctx
);
53 char *_beagle_parser_context_get_text_buffer (BeagleParserContext
*ctx
);
55 void _beagle_parser_context_parse_chunk (BeagleParserContext
*ctx
,
59 BeagleResponse
*_beagle_parser_context_finished (BeagleParserContext
*ctx
);
61 extern int _beagle_parser_state_index
;
63 #endif /* __BEAGLE_PARSER_H */