1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23#ifndef __com_sun_star_xml_sax_XFastSerializer_idl__
24#define __com_sun_star_xml_sax_XFastSerializer_idl__
25
26#ifndef __com_sun_star_uno_XInterface_idl__
27#include <com/sun/star/uno/XInterface.idl>
28#endif
29
30#ifndef __com_sun_star_xml_sax_SAXException_idl__
31#include <com/sun/star/xml/sax/SAXException.idl>
32#endif
33
34#ifndef __com_sun_star_xml_sax_XFastDocumentHanlder_idl__
35#include <com/sun/star/xml/sax/XFastDocumentHandler.idl>
36#endif
37
38#ifndef __com_sun_star_io_XOutputStream_idl__
39#include <com/sun/star/io/XOutputStream.idl>
40#endif
41
42#ifndef __com_sun_star_xml_sax_XFastTokenHandler_idl__
43#include <com/sun/star/xml/sax/XFastTokenHandler.idl>
44#endif
45
46
47//=============================================================================
48
49module com {  module sun {  module star {  module xml {  module sax {
50
51//=============================================================================
52
53/** receives notification of sax document events to write into an XOutputStream.
54 */
55interface XFastSerializer: com::sun::star::uno::XInterface
56{
57	//-------------------------------------------------------------------------
58
59	/** called by the parser when parsing of an xml stream is started.
60	 */
61	void startDocument()
62			raises( com::sun::star::xml::sax::SAXException );
63
64	//-------------------------------------------------------------------------
65
66	/** called by the parser after the last xml element of a stream is processed.
67	 */
68	void endDocument()
69			raises( com::sun::star::xml::sax::SAXException );
70
71	//-------------------------------------------------------------------------
72
73	/** receives notification of the beginning of an element .
74
75		@param Element
76			contains the integer token from the <type>XFastTokenHandler</type>
77			registered at the <type>XFastParser</type>.<br>
78
79			If the element has a namespace that was registered with the
80			<type>XFastParser</type>, <param>Element</param> contains the integer
81			token of the elements local name from the <type>XFastTokenHandler</type>
82			and the integer token of the namespace combined with an arithmetic
83			<b>or</b> operation.
84
85		@param Attribs
86			Contains a <type>XFastAttrbitueList</type> to access the attributes
87			from the element.
88
89	*/
90	void startFastElement( [in] long Element, [in] XFastAttributeList Attribs )
91			raises( com::sun::star::xml::sax::SAXException );
92
93	//-------------------------------------------------------------------------
94
95	/** receives notification of the beginning of an unknown element .
96
97		@param Namespace
98			contains the namespace url (not the prefix!) of this element.
99		@param Name
100			contains the elements local name.
101		@param Attribs
102			Contains a <type>XFastAttrbitueList</type> to access the attributes
103			from the element.
104	 */
105	void startUnknownElement( [in] string Namespace, [in] string Name, [in] XFastAttributeList Attribs )
106			raises( com::sun::star::xml::sax::SAXException );
107
108	//-------------------------------------------------------------------------
109
110	/** receives notification of the end of an known element.
111		@see startFastElement
112	 */
113	void endFastElement( [in] long Element )
114			raises( com::sun::star::xml::sax::SAXException );
115
116	//-------------------------------------------------------------------------
117
118	/** receives notification of the end of an known element.
119		@see startUnknownElement
120	 */
121	void endUnknownElement( [in] string Namespace, [in] string Name )
122			raises( com::sun::star::xml::sax::SAXException );
123
124	//-------------------------------------------------------------------------
125
126	/** receives notification of the beginning of a single element .
127
128		@param Element
129			contains the integer token from the <type>XFastTokenHandler</type>
130			registered at the <type>XFastParser</type>.<br>
131
132			If the element has a namespace that was registered with the
133			<type>XFastParser</type>, <param>Element</param> contains the integer
134			token of the elements local name from the <type>XFastTokenHandler</type>
135			and the integer token of the namespace combined with an arithmetic
136			<b>or</b> operation.
137
138		@param Attribs
139			Contains a <type>XFastAttrbitueList</type> to access the attributes
140			from the element.
141
142	*/
143	void singleFastElement( [in] long Element, [in] XFastAttributeList Attribs )
144			raises( com::sun::star::xml::sax::SAXException );
145
146	//-------------------------------------------------------------------------
147
148	/** receives notification of the beginning of a single unknown element .
149
150		@param Namespace
151			contains the namespace url (not the prefix!) of this element.
152		@param Name
153			contains the elements local name.
154		@param Attribs
155			Contains a <type>XFastAttrbitueList</type> to access the attributes
156			from the element.
157	 */
158	void singleUnknownElement( [in] string Namespace, [in] string Name, [in] XFastAttributeList Attribs )
159			raises( com::sun::star::xml::sax::SAXException );
160
161	//-------------------------------------------------------------------------
162
163	/** receives notification of character data.
164	 */
165	void characters( [in] string aChars )
166			raises( com::sun::star::xml::sax::SAXException );
167
168	//-------------------------------------------------------------------------
169
170	/**
171	 */
172	void setOutputStream ( [in] com::sun::star::io::XOutputStream xOutputStream )
173			/* raises( com::sun::star::xml::sax::SAXException ) */;
174
175	//-------------------------------------------------------------------------
176
177	/**
178	 */
179	void setFastTokenHandler ( [in] com::sun::star::xml::sax::XFastTokenHandler xFastTokenHandler )
180			/* raises( com::sun::star::xml::sax::SAXException ) */;
181  };
182
183//=============================================================================
184
185}; }; }; }; };
186
187#endif
188