Main Page | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

cr-parser-input.h

Go to the documentation of this file.
00001 /* -*- Mode: C; indent-tabs-mode: ni; c-basic-offset: 8 -*- */
00002 
00003 /*
00004  * This file is part of The Croco Library
00005  *
00006  * Copyright (C) 2002-2003 Dodji Seketeli <dodji@seketeli.org>
00007  *
00008  * This program is free software; you can redistribute it and/or
00009  * modify it under the terms of version 2.1 of the GNU Lesser General Public
00010  * License as published by the Free Software Foundation.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU Lesser General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
00020  * USA
00021  */
00022 
00023 #ifndef __CR_PARSER_INPUT_H__
00024 #define __CR_PARSER_INPUT_H__
00025 
00026 #include "cr-input.h"
00027 
00028 #ifdef __cplusplus
00029 extern "C" {
00030 #endif 
00031 
00032         typedef struct _CRParserInput CRParserInput ;
00033         typedef struct _CRParserInputPriv CRParserInputPriv ;
00034 
00035         struct _CRParserInput 
00036         {
00037                 CRParserInputPriv *priv ;
00038         } ;
00039 
00040         typedef struct _CRParserInputPos CRParserInputPos ;
00041         
00042         struct _CRParserInputPos
00043         {
00044                 CRInputPos input_pos ;
00045 
00046                 /*not used yet*/
00047                 glong stack_size ;
00048         } ;
00049 
00050         CRParserInput *
00051         cr_parser_input_new_from_uri (gchar *a_uri, enum CREncoding) ;
00052         
00053         void
00054         cr_parser_input_ref (CRParserInput *a_this) ;
00055 
00056         gboolean
00057         cr_parser_input_unref (CRParserInput *a_this) ;
00058 
00059         void
00060         cr_parser_input_destroy (CRParserInput *a_this) ;
00061 
00062         enum CRStatus
00063         cr_parser_input_push_input (CRParserInput *a_this, 
00064                                     CRInput *a_input) ;
00065 
00066         enum CRStatus
00067         cr_parser_input_pop_input (CRParserInput *a_this) ;
00068 
00069         CRInput *
00070         cr_parser_input_peek_input (CRParserInput *a_this) ;
00071 
00072         enum CRStatus
00073         cr_parser_input_get_byte_addr (CRParserInput *a_this,
00074                                        gulong a_offset,
00075                                        guchar **a_addr) ;
00076 
00077         enum CRStatus
00078         cr_parser_input_get_cur_byte_addr (CRParserInput *a_this, 
00079                                            guchar **a_addr) ;
00080         enum CRStatus
00081         cr_parser_input_read_byte (CRParserInput *a_this, 
00082                                    guchar * a_byte) ;
00083 
00084         enum CRStatus
00085         cr_parser_input_read_char (CRParserInput *a_this, 
00086                                    guint32 * a_byte) ;
00087 
00088         enum CRStatus
00089         cr_parser_input_get_end_of_file (CRParserInput *a_this, 
00090                                          gboolean *a_eof) ;
00091 
00092         enum CRStatus
00093         cr_parser_input_consume_char (CRParserInput *a_this, 
00094                                       guint32 a_char) ;
00095 
00096         enum CRStatus
00097         cr_parser_input_consume_chars (CRParserInput *a_this, 
00098                                        guint32 a_char,
00099                                        glong *a_nb_char) ;
00100 
00101         enum CRStatus
00102         cr_parser_input_consume_spaces (CRParserInput *a_this, 
00103                                         glong *a_nb_char) ;
00104 
00105         enum CRStatus
00106         cr_parser_input_peek_byte (CRParserInput *a_this,
00107                                    enum CRSeekPos a_origin,
00108                                    gulong a_offset, guchar *a_byte) ;
00109 
00110         enum CRStatus
00111         cr_parser_input_peek_char (CRParserInput *a_this,
00112                                    guint32 *a_char) ;
00113 
00114         glong
00115         cr_parser_input_get_nb_bytes_left (CRParserInput *a_this) ;
00116 
00117         enum CRStatus
00118         cr_parser_input_seek_index (CRParserInput *a_this,
00119                                     enum CRSeekPos a_origin,
00120                                     gint a_pos) ;
00121 
00122         enum CRStatus
00123         cr_parser_input_get_cur_pos (CRParserInput *a_this,
00124                                      CRParserInputPos *a_pos) ;
00125 
00126         enum CRStatus
00127         cr_parser_input_set_cur_pos (CRParserInput *a_this, 
00128                                      CRParserInputPos *a_pos) ;
00129 
00130         enum CRStatus
00131         cr_parser_input_set_line_num (CRParserInput *a_this, 
00132                                       glong a_line) ;
00133         
00134         enum CRStatus
00135         cr_parser_input_set_col_num (CRParserInput *a_this, 
00136                                      glong a_col) ;
00137         
00138         enum CRStatus
00139         cr_parser_input_incr_line_num (CRParserInput *a_this,
00140                                        glong a_increment) ;
00141 
00142         enum CRStatus
00143         cr_parser_input_incr_col_num (CRParserInput *a_this,
00144                                       glong a_increment) ;
00145 
00146         enum CRStatus
00147         cr_parser_input_get_col_num (CRParserInput *a_this, 
00148                                      glong *a_col) ;
00149 
00150         enum CRStatus
00151         cr_parser_input_get_line_num (CRParserInput *a_this, 
00152                                       glong *a_line) ;
00153         
00154         enum CRStatus
00155         cr_parser_input_get_cur_index (CRParserInput *a_this, 
00156                                        glong *a_index) ;
00157         
00158 #ifdef __cplusplus
00159 } /*extern "C" {*/
00160 #endif 
00161 
00162 #endif /*__CR_PARSER_INPUT_H__*/

Generated on Wed Oct 1 01:36:46 2003 for Libcroco by doxygen 1.3.3