Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / xml / crypto / sax / XSAXEventKeeper.idl
blob6815b00eb889a8ea8e38657157e3f18f06c686c2
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XSAXEventKeeper.idl,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 //i20156 - new file for xmlsecurity module
33 /** -- idl definition -- **/
35 #ifndef __com_sun_star_xml_crypto_sax_xsaxeventkeeper_idl_
36 #define __com_sun_star_xml_crypto_sax_xsaxeventkeeper_idl_
38 #include <com/sun/star/uno/XInterface.idl>
39 #include <com/sun/star/uno/Exception.idl>
40 #include <com/sun/star/xml/sax/XDocumentHandler.idl>
42 #include <com/sun/star/xml/wrapper/XXMLDocumentWrapper.idl>
43 #include <com/sun/star/xml/wrapper/XXMLElementWrapper.idl>
45 module com { module sun { module star { module xml { module crypto { module sax {
47 /**
48 * Interface of SAX Event Keeper.
49 * <p>
50 * This interface is used to manipulate element marks in a SAX event stream.
51 * <p>
52 * There are two kinds of element mark, one is element collector, which is
53 * used to collect a particular element from the SAX event stream; the other
54 * is blocker, which is used to block the SAX event stream.
56 interface XSAXEventKeeper : com::sun::star::uno::XInterface
58 /**
59 * Adds a new element collector on the next element in the SAX event
60 * stream.
62 * @return the keeper id of the new element collector
64 long addElementCollector();
66 /**
67 * Removes an element collector.
69 * @param id the keeper id of the element collector to be removed
71 void removeElementCollector([in] long id);
73 /**
74 * Adds a new blocker on the next element in the SAX event stream.
75 * <p>
76 * No SAX event starting from the next element will be forwarded until
77 * this blocker is removed.
79 * @return the keeper id of the new blocker
81 long addBlocker();
83 /**
84 * Removes a blocker
86 * @param id the keeper id of the blocker to be removed
88 void removeBlocker([in] long id);
90 /**
91 * Checks whether the SAX event stream is blocking.
93 * @return <code>true</code> if blocking, <code>false</code> otherwise
95 boolean isBlocking();
97 /**
98 * Gets the element of an element mark.
100 * @param id the keeper id of the element mark, it can be a element
101 * collector or a blocker
103 com::sun::star::xml::wrapper::XXMLElementWrapper getElement([in] long id);
106 * Sets the element of an element mark.
107 * <p>
108 * When an element is replaced outside of this interface, then uses this method
109 * can restore the link between an element mark and its working element.
111 * @param id the keeper id of the element mark to be set
112 * @param aElement the new element for this element mark.
114 void setElement(
115 [in] long id,
116 [in] com::sun::star::xml::wrapper::XXMLElementWrapper aElement);
119 * Sets the next document handler in the SAX chain.
120 * <p>
121 * This handler will receive SAX events forwarded by the SAXEventKeeper.
123 * @param nextHandler the next handler in the SAX chain
124 * @return the old next handler
126 com::sun::star::xml::sax::XDocumentHandler setNextHandler(
127 [in] com::sun::star::xml::sax::XDocumentHandler nextHandler);
130 * Prints information about all bufferred elements.
132 * @return a tree-style string including all buffer informtion
134 string printBufferNodeTree();
137 * Gets the element which current blocking happens.
138 * <p>
139 * This element is the working element of the first blocker in tree order.
141 * @return the current blocking element
143 com::sun::star::xml::wrapper::XXMLElementWrapper getCurrentBlockingNode();
146 } ; } ; } ; } ; } ; } ;
149 #endif