SourceForge.net Logo

event.h

Go to the documentation of this file.
00001 /*
00002  * Copyright 2007 Doxological Ltd.
00003  * 
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  * 
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  * 
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef __FAXPP__EVENT_H
00018 #define __FAXPP__EVENT_H
00019 
00020 #include "text.h"
00021 
00023 typedef enum {
00024   NO_EVENT,
00025   START_DOCUMENT_EVENT,
00026   END_DOCUMENT_EVENT,
00027   DOCTYPE_EVENT,
00028   START_ELEMENT_EVENT,
00029   SELF_CLOSING_ELEMENT_EVENT,
00030   END_ELEMENT_EVENT,
00031   CHARACTERS_EVENT,
00032   CDATA_EVENT,
00033   IGNORABLE_WHITESPACE_EVENT,
00034   COMMENT_EVENT,
00035   PI_EVENT,
00036   ENTITY_REFERENCE_EVENT,       
00037   DEC_CHAR_REFERENCE_EVENT,
00038   HEX_CHAR_REFERENCE_EVENT,
00039   ENTITY_REFERENCE_START_EVENT, 
00040   ENTITY_REFERENCE_END_EVENT,   
00041   START_EXTERNAL_ENTITY_EVENT,  
00042   END_EXTERNAL_ENTITY_EVENT     
00043 } FAXPP_EventType;
00044 
00046 typedef struct FAXPP_AttrValue_s {
00049   FAXPP_EventType type;
00052   FAXPP_Text name;
00055   FAXPP_Text value;
00056 
00057   unsigned int line;   
00058   unsigned int column; 
00059 
00060   struct FAXPP_AttrValue_s *next; 
00061 
00063   struct FAXPP_AttrValue_s *dealloc_next;
00064 } FAXPP_AttrValue;
00065 
00067 typedef struct {
00068   FAXPP_Text prefix;     
00069   FAXPP_Text uri;        
00070   FAXPP_Text name;       
00071 
00072   FAXPP_AttrValue value; 
00073 
00074   unsigned int xmlns_attr:1; 
00075   unsigned int xml_attr:1;   
00076 
00077   unsigned int line;   
00078   unsigned int column; 
00079 } FAXPP_Attribute;
00080 
00082 typedef struct {
00083   FAXPP_EventType type;    
00084 
00085   FAXPP_Text prefix;       
00086   FAXPP_Text uri;          
00087 
00088 
00089   FAXPP_Text name;
00090 
00093   FAXPP_Text value;
00094 
00095   unsigned int attr_count; 
00096   FAXPP_Attribute *attrs;  
00097 
00098   FAXPP_Text version;      
00099   FAXPP_Text encoding;     
00100   FAXPP_Text standalone;   
00101 
00102   FAXPP_Text system_id;    
00103   FAXPP_Text public_id;    
00104 
00105   unsigned int line;       
00106   unsigned int column;     
00107 } FAXPP_Event;
00108 
00116 const char *FAXPP_event_to_string(FAXPP_EventType type);
00117 
00118 #endif

Generated on Thu Mar 20 02:12:09 2008 for Faxpp by  doxygen 1.5.1