1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28//i20156 - new file for xmlsecurity module 29 30/** -- idl definition -- **/ 31 32#ifndef __com_sun_star_xml_crypto_sax_xsecuritysaxeventkeeper_idl_ 33#define __com_sun_star_xml_crypto_sax_xsecuritysaxeventkeeper_idl_ 34 35#include <com/sun/star/uno/XInterface.idl> 36#include <com/sun/star/uno/Exception.idl> 37#include <com/sun/star/xml/crypto/sax/XSAXEventKeeper.idl> 38 39module com { module sun { module star { module xml { module crypto { module sax { 40 41/** 42 * Represents the undefined security id 43 */ 44constants ConstOfSecurityId 45{ 46 const long UNDEFINEDSECURITYID = -1; 47}; 48 49/** 50 * Defines priority for the element mark's notification. 51 * <p> 52 * The PRI_MINIMUM priority is a value less than any practical 53 * priority value, it is used when compare between different 54 * priority values. 55 * <p> 56 * The PRI_AFTERMODIFY priority represents the notification will be 57 * sent after any internal modification has finished. 58 * <p> 59 * The PRI_BEFOREMODIFY proirity represents the notification will be 60 * sent before any internal modification happens. 61 * <p> 62 * So an element mark with PRI_BEFOREMODIFY will be handled first, 63 * and one with PRI_AFTERMODIFY will be handled at last. 64 */ 65enum ElementMarkPriority 66{ 67 MINIMUM = 1, 68 AFTERMODIFY, 69 BEFOREMODIFY 70}; 71 72/** 73 * Defines types of element mark. 74 * <p> 75 * the TYPEOFELEMENTMARK type represents a blocker, and the TYPEOFELEMENTCOLLECTOR 76 * type represents a element collector. 77 */ 78enum ElementMarkType 79{ 80 ELEMENTMARK = 1, 81 ELEMENTCOLLECTOR 82}; 83 84/** 85 * Interface of Security SAX Event Keeper. 86 * <p> 87 * This interface is an extension of the XSAXEventKeeper interface, 88 * some security related features are added. 89 */ 90interface XSecuritySAXEventKeeper : XSAXEventKeeper 91{ 92 /** 93 * Adds a new element collector on the next element in the SAX event 94 * stream. 95 * 96 * @param priority the priority of the element collector. See 97 * ConstOfPriority 98 * @param modifyElement a flag representing whether the element 99 * collector will modify the content of its 100 * element after notification 101 * @return the keeper id of the new element collector 102 */ 103 long addSecurityElementCollector( 104 [in] ElementMarkPriority priority, 105 [in] boolean modifyElement); 106 107 /** 108 * Clones an element collector. 109 * 110 * @param referenceId the keeper id of the element collector to 111 * be cloned 112 * @param priority the priority of new element collector. See 113 * ConstOfPriority 114 * @return the keeper id of the new element collector 115 */ 116 long cloneElementCollector( 117 [in] long referenceId, 118 [in] ElementMarkPriority priority); 119 120 /** 121 * Sets security id for an element mark. 122 * 123 * @param id the keeper id of the element collector to be set 124 * @param securityId the security id to be set 125 */ 126 void setSecurityId([in] long id, [in] long securityId); 127}; 128 129} ; } ; } ; } ; } ; } ; 130 131 132#endif 133 134