xref: /AOO41X/main/offapi/com/sun/star/xml/crypto/sax/XSecuritySAXEventKeeper.idl (revision d1766043198e81d0bcfc626e12893e7b4d7e31ca)
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_xsecuritysaxeventkeeper_idl_
29#define __com_sun_star_xml_crypto_sax_xsecuritysaxeventkeeper_idl_
30
31#include <com/sun/star/uno/XInterface.idl>
32#include <com/sun/star/uno/Exception.idl>
33#include <com/sun/star/xml/crypto/sax/XSAXEventKeeper.idl>
34
35module com { module sun { module star { module xml { module crypto { module sax {
36
37/**
38 * Represents the undefined security id
39 */
40constants ConstOfSecurityId
41{
42    const long UNDEFINEDSECURITYID = -1;
43};
44
45/**
46 * Defines priority for the element mark's notification.
47 * <p>
48 * The PRI_MINIMUM priority is a value less than any practical
49 * priority value, it is used when compare between different
50 * priority values.
51 * <p>
52 * The PRI_AFTERMODIFY priority represents the notification will be
53 * sent after any internal modification has finished.
54 * <p>
55 * The PRI_BEFOREMODIFY proirity represents the notification will be
56 * sent before any internal modification happens.
57 * <p>
58 * So an element mark with PRI_BEFOREMODIFY will be handled first,
59 * and one with PRI_AFTERMODIFY will be handled at last.
60 */
61enum ElementMarkPriority
62{
63    MINIMUM = 1,
64    AFTERMODIFY,
65    BEFOREMODIFY
66};
67
68/**
69 * Defines types of element mark.
70 * <p>
71 * the TYPEOFELEMENTMARK type represents a blocker, and the TYPEOFELEMENTCOLLECTOR
72 * type represents a element collector.
73 */
74enum ElementMarkType
75{
76    ELEMENTMARK = 1,
77    ELEMENTCOLLECTOR
78};
79
80/**
81 * Interface of Security SAX Event Keeper.
82 * <p>
83 * This interface is an extension of the XSAXEventKeeper interface,
84 * some security related features are added.
85 */
86interface XSecuritySAXEventKeeper : XSAXEventKeeper
87{
88    /**
89     * Adds a new element collector on the next element in the SAX event
90     * stream.
91     *
92     * @param priority                       the priority of the element collector. See
93     *                                       ConstOfPriority
94     * @param modifyElement                  a flag representing whether the element
95     *                                       collector will modify the content of its
96     *                                       element after notification
97     * @return                               the keeper id of the new element collector
98     */
99    long addSecurityElementCollector(
100        [in] ElementMarkPriority priority,
101        [in] boolean modifyElement);
102
103    /**
104     * Clones an element collector.
105     *
106     * @param referenceId                    the keeper id of the element collector to
107     *                                       be cloned
108     * @param priority                       the priority of new element collector. See
109     *                                       ConstOfPriority
110     * @return                               the keeper id of the new element collector
111     */
112    long cloneElementCollector(
113        [in] long referenceId,
114        [in] ElementMarkPriority priority);
115
116    /**
117     * Sets security id for an element mark.
118     *
119     * @param id           the keeper id of the element collector to be set
120     * @param securityId   the security id to be set
121     */
122    void setSecurityId([in] long id, [in] long securityId);
123};
124
125} ; } ; } ; } ; } ; } ;
126
127
128#endif
129
130