LibreOffice Module xmlsecurity (master) 1
elementcollector.hxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
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/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
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 .
18 */
19
20#pragma once
21
22#include "elementmark.hxx"
23#include <com/sun/star/xml/crypto/sax/ElementMarkPriority.hpp>
24#include <com/sun/star/uno/Reference.hxx>
25
26namespace com::sun::star::xml::crypto::sax { class XReferenceResolvedListener; }
27
29/****** elementcollector.hxx/CLASS ElementCollector ***************************
30 *
31 * NAME
32 * ElementCollector -- Class to manipulate an element collector
33 *
34 * FUNCTION
35 * This class is derived from the ElementMark class. Beyond the function
36 * of the ElementMark class, this class also maintains the priority, and
37 * manages the notify process
38 ******************************************************************************/
39{
40private:
41 /*
42 * the notify priority, is one of following values:
43 * AFTERMODIFY - this ElementCollector will notify after all
44 * internal modifications have finished.
45 * BEFOREMODIFY - this ElementCollector must notify before any
46 * internal modification happens.
47 */
48 css::xml::crypto::sax::ElementMarkPriority const m_nPriority;
49
50 /*
51 * the modify flag, representing whether which elementcollector will
52 * modify its data.
53 */
54 bool const m_bToModify;
55
56 /* the notify enable flag, see notifyListener method */
58
59 /* whether the listener has been notified */
61
62 /* the listener to be notified */
63 css::uno::Reference< css::xml::crypto::sax::XReferenceResolvedListener > m_xReferenceResolvedListener;
64
65public:
67 sal_Int32 nBufferId,
68 css::xml::crypto::sax::ElementMarkPriority nPriority,
69 bool bToModify,
70 css::uno::Reference< css::xml::crypto::sax::XReferenceResolvedListener > xReferenceResolvedListener);
71
72 css::xml::crypto::sax::ElementMarkPriority getPriority() const { return m_nPriority;}
73 bool getModify() const { return m_bToModify;}
74 void notifyListener();
76 const css::uno::Reference< css::xml::crypto::sax::XReferenceResolvedListener >& referenceResolvedListener);
77 void doNotify();
78};
79
80/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::xml::crypto::sax::XReferenceResolvedListener > m_xReferenceResolvedListener
ElementCollector(sal_Int32 nBufferId, css::xml::crypto::sax::ElementMarkPriority nPriority, bool bToModify, css::uno::Reference< css::xml::crypto::sax::XReferenceResolvedListener > xReferenceResolvedListener)
css::xml::crypto::sax::ElementMarkPriority getPriority() const
bool getModify() const
void setReferenceResolvedListener(const css::uno::Reference< css::xml::crypto::sax::XReferenceResolvedListener > &referenceResolvedListener)
css::xml::crypto::sax::ElementMarkPriority const m_nPriority