Bump version to 5.0-14
[LibreOffice.git] / xmlsecurity / source / framework / elementcollector.hxx
blobdfc73b04b46262e4f2191d20a4ae6d550e62cd74
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 ***************************
30 * NAME
31 * ElementCollector -- Class to manipulate an element collector
33 * FUNCTION
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
38 * AUTHOR
39 * Michael Mi
40 * Email: michael.mi@sun.com
41 ******************************************************************************/
43 private:
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
55 * modify its data.
57 bool m_bToModify;
59 /* the notify enable flag, see notifyListener method */
60 bool m_bAbleToNotify;
62 /* whether the listener has been notified */
63 bool m_bNotified;
65 /* the listener to be notified */
66 com::sun::star::uno::Reference<
67 com::sun::star::xml::crypto::sax::XReferenceResolvedListener > m_xReferenceResolvedListener;
69 public:
70 ElementCollector(
71 sal_Int32 nSecurityId,
72 sal_Int32 nBufferId,
73 com::sun::star::xml::crypto::sax::ElementMarkPriority nPriority,
74 bool bToModify,
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);
87 void doNotify();
88 ElementCollector* clone(
89 sal_Int32 nId,
90 com::sun::star::xml::crypto::sax::ElementMarkPriority nPriority ) const;
93 #endif
95 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */