1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_XMLSECURITY_SOURCE_FRAMEWORK_ELEMENTCOLLECTOR_HXX
21 #define INCLUDED_XMLSECURITY_SOURCE_FRAMEWORK_ELEMENTCOLLECTOR_HXX
23 #include "elementmark.hxx"
24 #include <com/sun/star/xml/crypto/sax/XReferenceResolvedListener.hpp>
25 #include <com/sun/star/xml/crypto/sax/ElementMarkPriority.hpp>
27 class ElementCollector
: public ElementMark
28 /****** elementcollector.hxx/CLASS ElementCollector ***************************
31 * ElementCollector -- Class to manipulate an element collector
34 * This class is derived from the ElementMark class. Beyond the function
35 * of the ElementMark class, this class also maintains the priority, and
36 * manages the notify process
40 * Email: michael.mi@sun.com
41 ******************************************************************************/
45 * the notify priority, is one of following values:
46 * AFTERMODIFY - this ElementCollector will notify after all
47 * internal modifications have finished.
48 * BEFOREMODIFY - this ElementCollector must notify before any
49 * internal modification happens.
51 com::sun::star::xml::crypto::sax::ElementMarkPriority m_nPriority
;
54 * the modify flag, representing whether which elementcollector will
59 /* the notify enable flag, see notifyListener method */
62 /* whether the listener has been notified */
65 /* the listener to be notified */
66 com::sun::star::uno::Reference
<
67 com::sun::star::xml::crypto::sax::XReferenceResolvedListener
> m_xReferenceResolvedListener
;
71 sal_Int32 nSecurityId
,
73 com::sun::star::xml::crypto::sax::ElementMarkPriority nPriority
,
75 const com::sun::star::uno::Reference
<
76 com::sun::star::xml::crypto::sax::XReferenceResolvedListener
>&
77 xReferenceResolvedListener
);
78 virtual ~ElementCollector() {};
80 com::sun::star::xml::crypto::sax::ElementMarkPriority
getPriority() const { return m_nPriority
;}
81 bool getModify() const { return m_bToModify
;}
82 void notifyListener();
83 void setReferenceResolvedListener(
84 const com::sun::star::uno::Reference
<
85 com::sun::star::xml::crypto::sax::XReferenceResolvedListener
>&
86 referenceResolvedListener
);
88 ElementCollector
* clone(
90 com::sun::star::xml::crypto::sax::ElementMarkPriority nPriority
) const;
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */