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 24//i20156 - new file for xmlsecurity module 25 26/** -- idl definition -- **/ 27 28#ifndef __com_sun_star_xml_crypto_sax_xsaxeventkeeper_idl_ 29#define __com_sun_star_xml_crypto_sax_xsaxeventkeeper_idl_ 30 31#include <com/sun/star/uno/XInterface.idl> 32#include <com/sun/star/uno/Exception.idl> 33#include <com/sun/star/xml/sax/XDocumentHandler.idl> 34 35#include <com/sun/star/xml/wrapper/XXMLDocumentWrapper.idl> 36#include <com/sun/star/xml/wrapper/XXMLElementWrapper.idl> 37 38module com { module sun { module star { module xml { module crypto { module sax { 39 40/** 41 * Interface of SAX Event Keeper. 42 * <p> 43 * This interface is used to manipulate element marks in a SAX event stream. 44 * <p> 45 * There are two kinds of element mark, one is element collector, which is 46 * used to collect a particular element from the SAX event stream; the other 47 * is blocker, which is used to block the SAX event stream. 48 */ 49interface XSAXEventKeeper : com::sun::star::uno::XInterface 50{ 51 /** 52 * Adds a new element collector on the next element in the SAX event 53 * stream. 54 * 55 * @return the keeper id of the new element collector 56 */ 57 long addElementCollector(); 58 59 /** 60 * Removes an element collector. 61 * 62 * @param id the keeper id of the element collector to be removed 63 */ 64 void removeElementCollector([in] long id); 65 66 /** 67 * Adds a new blocker on the next element in the SAX event stream. 68 * <p> 69 * No SAX event starting from the next element will be forwarded until 70 * this blocker is removed. 71 * 72 * @return the keeper id of the new blocker 73 */ 74 long addBlocker(); 75 76 /** 77 * Removes a blocker 78 * 79 * @param id the keeper id of the blocker to be removed 80 */ 81 void removeBlocker([in] long id); 82 83 /** 84 * Checks whether the SAX event stream is blocking. 85 * 86 * @return <code>true</code> if blocking, <code>false</code> otherwise 87 */ 88 boolean isBlocking(); 89 90 /** 91 * Gets the element of an element mark. 92 * 93 * @param id the keeper id of the element mark, it can be a element 94 * collector or a blocker 95 */ 96 com::sun::star::xml::wrapper::XXMLElementWrapper getElement([in] long id); 97 98 /** 99 * Sets the element of an element mark. 100 * <p> 101 * When an element is replaced outside of this interface, then uses this method 102 * can restore the link between an element mark and its working element. 103 * 104 * @param id the keeper id of the element mark to be set 105 * @param aElement the new element for this element mark. 106 */ 107 void setElement( 108 [in] long id, 109 [in] com::sun::star::xml::wrapper::XXMLElementWrapper aElement); 110 111 /** 112 * Sets the next document handler in the SAX chain. 113 * <p> 114 * This handler will receive SAX events forwarded by the SAXEventKeeper. 115 * 116 * @param nextHandler the next handler in the SAX chain 117 * @return the old next handler 118 */ 119 com::sun::star::xml::sax::XDocumentHandler setNextHandler( 120 [in] com::sun::star::xml::sax::XDocumentHandler nextHandler); 121 122 /** 123 * Prints information about all bufferred elements. 124 * 125 * @return a tree-style string including all buffer information 126 */ 127 string printBufferNodeTree(); 128 129 /** 130 * Gets the element which current blocking happens. 131 * <p> 132 * This element is the working element of the first blocker in tree order. 133 * 134 * @return the current blocking element 135 */ 136 com::sun::star::xml::wrapper::XXMLElementWrapper getCurrentBlockingNode(); 137}; 138 139} ; } ; } ; } ; } ; } ; 140 141 142#endif 143 144