Mercurial > pidgin
comparison plugins/jabber/xmlrole.h @ 1347:afa63ac2fd84
[gaim-migrate @ 1357]
jabber for those not fortunate enough to have libjabber and libxode on their systems
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Thu, 21 Dec 2000 14:54:13 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1346:83f78eb7c472 | 1347:afa63ac2fd84 |
---|---|
1 /* | |
2 The contents of this file are subject to the Mozilla Public License | |
3 Version 1.1 (the "License"); you may not use this file except in | |
4 compliance with the License. You may obtain a copy of the License at | |
5 http://www.mozilla.org/MPL/ | |
6 | |
7 Software distributed under the License is distributed on an "AS IS" | |
8 basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the | |
9 License for the specific language governing rights and limitations | |
10 under the License. | |
11 | |
12 The Original Code is expat. | |
13 | |
14 The Initial Developer of the Original Code is James Clark. | |
15 Portions created by James Clark are Copyright (C) 1998, 1999 | |
16 James Clark. All Rights Reserved. | |
17 | |
18 Contributor(s): | |
19 | |
20 Alternatively, the contents of this file may be used under the terms | |
21 of the GNU General Public License (the "GPL"), in which case the | |
22 provisions of the GPL are applicable instead of those above. If you | |
23 wish to allow use of your version of this file only under the terms of | |
24 the GPL and not to allow others to use your version of this file under | |
25 the MPL, indicate your decision by deleting the provisions above and | |
26 replace them with the notice and other provisions required by the | |
27 GPL. If you do not delete the provisions above, a recipient may use | |
28 your version of this file under either the MPL or the GPL. | |
29 */ | |
30 | |
31 #ifndef XmlRole_INCLUDED | |
32 #define XmlRole_INCLUDED 1 | |
33 | |
34 #include "xmltok.h" | |
35 | |
36 #ifdef __cplusplus | |
37 extern "C" { | |
38 #endif | |
39 | |
40 enum { | |
41 XML_ROLE_ERROR = -1, | |
42 XML_ROLE_NONE = 0, | |
43 XML_ROLE_XML_DECL, | |
44 XML_ROLE_INSTANCE_START, | |
45 XML_ROLE_DOCTYPE_NAME, | |
46 XML_ROLE_DOCTYPE_SYSTEM_ID, | |
47 XML_ROLE_DOCTYPE_PUBLIC_ID, | |
48 XML_ROLE_DOCTYPE_CLOSE, | |
49 XML_ROLE_GENERAL_ENTITY_NAME, | |
50 XML_ROLE_PARAM_ENTITY_NAME, | |
51 XML_ROLE_ENTITY_VALUE, | |
52 XML_ROLE_ENTITY_SYSTEM_ID, | |
53 XML_ROLE_ENTITY_PUBLIC_ID, | |
54 XML_ROLE_ENTITY_NOTATION_NAME, | |
55 XML_ROLE_NOTATION_NAME, | |
56 XML_ROLE_NOTATION_SYSTEM_ID, | |
57 XML_ROLE_NOTATION_NO_SYSTEM_ID, | |
58 XML_ROLE_NOTATION_PUBLIC_ID, | |
59 XML_ROLE_ATTRIBUTE_NAME, | |
60 XML_ROLE_ATTRIBUTE_TYPE_CDATA, | |
61 XML_ROLE_ATTRIBUTE_TYPE_ID, | |
62 XML_ROLE_ATTRIBUTE_TYPE_IDREF, | |
63 XML_ROLE_ATTRIBUTE_TYPE_IDREFS, | |
64 XML_ROLE_ATTRIBUTE_TYPE_ENTITY, | |
65 XML_ROLE_ATTRIBUTE_TYPE_ENTITIES, | |
66 XML_ROLE_ATTRIBUTE_TYPE_NMTOKEN, | |
67 XML_ROLE_ATTRIBUTE_TYPE_NMTOKENS, | |
68 XML_ROLE_ATTRIBUTE_ENUM_VALUE, | |
69 XML_ROLE_ATTRIBUTE_NOTATION_VALUE, | |
70 XML_ROLE_ATTLIST_ELEMENT_NAME, | |
71 XML_ROLE_IMPLIED_ATTRIBUTE_VALUE, | |
72 XML_ROLE_REQUIRED_ATTRIBUTE_VALUE, | |
73 XML_ROLE_DEFAULT_ATTRIBUTE_VALUE, | |
74 XML_ROLE_FIXED_ATTRIBUTE_VALUE, | |
75 XML_ROLE_ELEMENT_NAME, | |
76 XML_ROLE_CONTENT_ANY, | |
77 XML_ROLE_CONTENT_EMPTY, | |
78 XML_ROLE_CONTENT_PCDATA, | |
79 XML_ROLE_GROUP_OPEN, | |
80 XML_ROLE_GROUP_CLOSE, | |
81 XML_ROLE_GROUP_CLOSE_REP, | |
82 XML_ROLE_GROUP_CLOSE_OPT, | |
83 XML_ROLE_GROUP_CLOSE_PLUS, | |
84 XML_ROLE_GROUP_CHOICE, | |
85 XML_ROLE_GROUP_SEQUENCE, | |
86 XML_ROLE_CONTENT_ELEMENT, | |
87 XML_ROLE_CONTENT_ELEMENT_REP, | |
88 XML_ROLE_CONTENT_ELEMENT_OPT, | |
89 XML_ROLE_CONTENT_ELEMENT_PLUS, | |
90 XML_ROLE_PARAM_ENTITY_REF | |
91 }; | |
92 | |
93 typedef struct prolog_state { | |
94 int (*handler)(struct prolog_state *state, | |
95 int tok, | |
96 const char *ptr, | |
97 const char *end, | |
98 const ENCODING *enc); | |
99 unsigned level; | |
100 } PROLOG_STATE; | |
101 | |
102 void XMLTOKAPI XmlPrologStateInit(PROLOG_STATE *); | |
103 | |
104 #define XmlTokenRole(state, tok, ptr, end, enc) \ | |
105 (((state)->handler)(state, tok, ptr, end, enc)) | |
106 | |
107 #ifdef __cplusplus | |
108 } | |
109 #endif | |
110 | |
111 #endif /* not XmlRole_INCLUDED */ |