LibreOffice Module configmgr (master) 1
broadcaster.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 <sal/config.h>
23
24#include <vector>
25
26#include <com/sun/star/beans/PropertyChangeEvent.hpp>
27#include <com/sun/star/container/ContainerEvent.hpp>
28#include <com/sun/star/lang/EventObject.hpp>
29#include <com/sun/star/uno/Reference.hxx>
30#include <com/sun/star/uno/Sequence.hxx>
31#include <com/sun/star/util/ChangesEvent.hpp>
32
33namespace com::sun::star {
34 namespace beans {
35 class XPropertiesChangeListener;
36 class XPropertyChangeListener;
37 }
38 namespace container { class XContainerListener; }
39 namespace lang { class XEventListener; }
40 namespace util { class XChangesListener; }
41}
42
43namespace configmgr {
44
46public:
48
50 css::uno::Reference< css::lang::XEventListener > const & listener,
51 css::lang::EventObject const & event);
52
54 css::uno::Reference< css::container::XContainerListener > const & listener,
55 css::container::ContainerEvent const & event);
56
58 css::uno::Reference< css::container::XContainerListener > const & listener,
59 css::container::ContainerEvent const & event);
60
62 css::uno::Reference< css::container::XContainerListener > const & listener,
63 css::container::ContainerEvent const & event);
64
66 css::uno::Reference< css::beans::XPropertyChangeListener > const & listener,
67 css::beans::PropertyChangeEvent const & event);
68
70 css::uno::Reference< css::beans::XPropertiesChangeListener > const & listener,
71 css::uno::Sequence< css::beans::PropertyChangeEvent > const & event);
72
74 css::uno::Reference< css::util::XChangesListener > const & listener,
75 css::util::ChangesEvent const & event, bool bRootListener);
76
77 void send();
78
79private:
80 Broadcaster(const Broadcaster&) = delete;
82
84 css::uno::Reference< css::lang::XEventListener > listener;
85 css::lang::EventObject event;
86
88 css::uno::Reference< css::lang::XEventListener > const & theListener,
89 css::lang::EventObject theEvent);
90 };
91
93 css::uno::Reference< css::container::XContainerListener > listener;
94 css::container::ContainerEvent event;
95
97 css::uno::Reference< css::container::XContainerListener > const & theListener,
98 css::container::ContainerEvent theEvent);
99 };
100
102 css::uno::Reference< css::beans::XPropertyChangeListener > listener;
103 css::beans::PropertyChangeEvent event;
104
106 css::uno::Reference< css::beans::XPropertyChangeListener > const & theListener,
107 css::beans::PropertyChangeEvent theEvent);
108 };
109
111 css::uno::Reference< css::beans::XPropertiesChangeListener > listener;
112 css::uno::Sequence< css::beans::PropertyChangeEvent > event;
113
115 css::uno::Reference< css::beans::XPropertiesChangeListener > const & theListener,
116 css::uno::Sequence< css::beans::PropertyChangeEvent > const & theEvent);
117 };
118
120 css::uno::Reference< css::util::XChangesListener > listener;
121 css::util::ChangesEvent event;
122
124 css::uno::Reference< css::util::XChangesListener > const & theListener,
125 css::util::ChangesEvent theEvent);
126 };
127
128 std::vector< DisposeNotification > disposeNotifications_;
129 std::vector< ContainerNotification > containerElementInsertedNotifications_;
130 std::vector< ContainerNotification > containerElementRemovedNotifications_;
131 std::vector< ContainerNotification > containerElementReplacedNotifications_;
132 std::vector< PropertyChangeNotification > propertyChangeNotifications_;
133 std::vector< PropertiesChangeNotification > propertiesChangeNotifications_;
134 std::vector< ChangesNotification > rootChangesNotifications_;
135 std::vector< ChangesNotification > changesNotifications_;
136};
137
138}
139
140/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void addContainerElementRemovedNotification(css::uno::Reference< css::container::XContainerListener > const &listener, css::container::ContainerEvent const &event)
Definition: broadcaster.cxx:76
void addChangesNotification(css::uno::Reference< css::util::XChangesListener > const &listener, css::util::ChangesEvent const &event, bool bRootListener)
Definition: broadcaster.cxx:98
std::vector< ContainerNotification > containerElementRemovedNotifications_
std::vector< ChangesNotification > rootChangesNotifications_
Broadcaster & operator=(const Broadcaster &)=delete
std::vector< ChangesNotification > changesNotifications_
void addContainerElementReplacedNotification(css::uno::Reference< css::container::XContainerListener > const &listener, css::container::ContainerEvent const &event)
Definition: broadcaster.cxx:62
std::vector< ContainerNotification > containerElementReplacedNotifications_
void addContainerElementInsertedNotification(css::uno::Reference< css::container::XContainerListener > const &listener, css::container::ContainerEvent const &event)
Definition: broadcaster.cxx:69
std::vector< ContainerNotification > containerElementInsertedNotifications_
void addPropertyChangeNotification(css::uno::Reference< css::beans::XPropertyChangeListener > const &listener, css::beans::PropertyChangeEvent const &event)
Definition: broadcaster.cxx:83
std::vector< PropertiesChangeNotification > propertiesChangeNotifications_
Broadcaster(const Broadcaster &)=delete
void addDisposeNotification(css::uno::Reference< css::lang::XEventListener > const &listener, css::lang::EventObject const &event)
Definition: broadcaster.cxx:55
void addPropertiesChangeNotification(css::uno::Reference< css::beans::XPropertiesChangeListener > const &listener, css::uno::Sequence< css::beans::PropertyChangeEvent > const &event)
Definition: broadcaster.cxx:90
std::vector< PropertyChangeNotification > propertyChangeNotifications_
std::vector< DisposeNotification > disposeNotifications_
ChangesNotification(css::uno::Reference< css::util::XChangesListener > const &theListener, css::util::ChangesEvent theEvent)
css::uno::Reference< css::util::XChangesListener > listener
css::container::ContainerEvent event
Definition: broadcaster.hxx:94
css::uno::Reference< css::container::XContainerListener > listener
Definition: broadcaster.hxx:93
ContainerNotification(css::uno::Reference< css::container::XContainerListener > const &theListener, css::container::ContainerEvent theEvent)
DisposeNotification(css::uno::Reference< css::lang::XEventListener > const &theListener, css::lang::EventObject theEvent)
css::uno::Reference< css::lang::XEventListener > listener
Definition: broadcaster.hxx:84
css::uno::Reference< css::beans::XPropertiesChangeListener > listener
css::uno::Sequence< css::beans::PropertyChangeEvent > event
PropertiesChangeNotification(css::uno::Reference< css::beans::XPropertiesChangeListener > const &theListener, css::uno::Sequence< css::beans::PropertyChangeEvent > const &theEvent)
css::uno::Reference< css::beans::XPropertyChangeListener > listener
PropertyChangeNotification(css::uno::Reference< css::beans::XPropertyChangeListener > const &theListener, css::beans::PropertyChangeEvent theEvent)