1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: elementcollector.hxx,v $
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 #ifndef _ELEMENTCOLLECTOR_HXX
32 #define _ELEMENTCOLLECTOR_HXX
34 #include "elementmark.hxx"
35 #include <com/sun/star/xml/crypto/sax/XReferenceResolvedListener.hpp>
36 #include <com/sun/star/xml/crypto/sax/ElementMarkPriority.hpp>
38 class ElementCollector
: public ElementMark
39 /****** elementcollector.hxx/CLASS ElementCollector ***************************
42 * ElementCollector -- Class to manipulate an element collector
45 * This class is derived from the ElementMark class. Beyond the function
46 * of the ElementMark class, this class also maintains the priority, and
47 * manages the notify process
50 * 05.01.2004 - implemented
54 * Email: michael.mi@sun.com
55 ******************************************************************************/
59 * the notify priority, is one of following values:
60 * AFTERMODIFY - this ElementCollector will notify after all
61 * internal modifications have finished.
62 * BEFOREMODIFY - this ElementCollector must notify before any
63 * internal modification happens.
65 com::sun::star::xml::crypto::sax::ElementMarkPriority m_nPriority
;
68 * the modify flag, representing whether which elementcollector will
73 /* the notify enable flag, see notifyListener method */
76 /* whether the listener has been notified */
79 /* the listener to be notified */
80 com::sun::star::uno::Reference
<
81 com::sun::star::xml::crypto::sax::XReferenceResolvedListener
> m_xReferenceResolvedListener
;
85 sal_Int32 nSecurityId
,
87 com::sun::star::xml::crypto::sax::ElementMarkPriority nPriority
,
89 const com::sun::star::uno::Reference
<
90 com::sun::star::xml::crypto::sax::XReferenceResolvedListener
>&
91 xReferenceResolvedListener
);
92 virtual ~ElementCollector() {};
94 //bool isInternalNotificationSuppressed() const;
95 com::sun::star::xml::crypto::sax::ElementMarkPriority
getPriority() const;
96 bool getModify() const;
97 void notifyListener();
98 bool isAbleToNotify() const;
99 void setReferenceResolvedListener(
100 const com::sun::star::uno::Reference
<
101 com::sun::star::xml::crypto::sax::XReferenceResolvedListener
>&
102 referenceResolvedListener
);
103 void setSecurityId(sal_Int32 nSecurityId
);
105 ElementCollector
* clone(
107 com::sun::star::xml::crypto::sax::ElementMarkPriority nPriority
) const;