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 
33 namespace 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 
43 namespace configmgr {
44 
45 class Broadcaster {
46 public:
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);
76 
77  void send();
78 
79 private:
80  Broadcaster(const Broadcaster&) = delete;
81  Broadcaster& operator=(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 const & 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 const & 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 const & 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 const & 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 > changesNotifications_;
135 };
136 
137 }
138 
139 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
exports com.sun.star.lib. util
css::uno::Sequence< css::beans::PropertyChangeEvent > event
PropertiesChangeNotification(css::uno::Reference< css::beans::XPropertiesChangeListener > const &theListener, css::uno::Sequence< css::beans::PropertyChangeEvent > const &theEvent)
PropertyChangeNotification(css::uno::Reference< css::beans::XPropertyChangeListener > const &theListener, css::beans::PropertyChangeEvent const &theEvent)
css::container::ContainerEvent event
Definition: broadcaster.hxx:94
void addChangesNotification(css::uno::Reference< css::util::XChangesListener > const &listener, css::util::ChangesEvent const &event)
Definition: broadcaster.cxx:97
std::vector< ChangesNotification > changesNotifications_
void addPropertiesChangeNotification(css::uno::Reference< css::beans::XPropertiesChangeListener > const &listener, css::uno::Sequence< css::beans::PropertyChangeEvent > const &event)
Definition: broadcaster.cxx:89
void addContainerElementRemovedNotification(css::uno::Reference< css::container::XContainerListener > const &listener, css::container::ContainerEvent const &event)
Definition: broadcaster.cxx:75
void addDisposeNotification(css::uno::Reference< css::lang::XEventListener > const &listener, css::lang::EventObject const &event)
Definition: broadcaster.cxx:54
void addContainerElementReplacedNotification(css::uno::Reference< css::container::XContainerListener > const &listener, css::container::ContainerEvent const &event)
Definition: broadcaster.cxx:61
exports com.sun.star. container
std::vector< ContainerNotification > containerElementInsertedNotifications_
css::uno::Reference< css::beans::XPropertyChangeListener > listener
Broadcaster & operator=(const Broadcaster &)=delete
css::uno::Reference< css::util::XChangesListener > listener
std::vector< PropertiesChangeNotification > propertiesChangeNotifications_
DisposeNotification(css::uno::Reference< css::lang::XEventListener > const &theListener, css::lang::EventObject const &theEvent)
void addContainerElementInsertedNotification(css::uno::Reference< css::container::XContainerListener > const &listener, css::container::ContainerEvent const &event)
Definition: broadcaster.cxx:68
ChangesNotification(css::uno::Reference< css::util::XChangesListener > const &theListener, css::util::ChangesEvent const &theEvent)
std::vector< ContainerNotification > containerElementRemovedNotifications_
std::vector< PropertyChangeNotification > propertyChangeNotifications_
exports com.sun.star. beans
exports com.sun.star. lang
css::uno::Reference< css::beans::XPropertiesChangeListener > listener
std::vector< ContainerNotification > containerElementReplacedNotifications_
css::uno::Reference< css::lang::XEventListener > listener
Definition: broadcaster.hxx:84
css::uno::Reference< css::container::XContainerListener > listener
Definition: broadcaster.hxx:93
std::vector< DisposeNotification > disposeNotifications_
void addPropertyChangeNotification(css::uno::Reference< css::beans::XPropertyChangeListener > const &listener, css::beans::PropertyChangeEvent const &event)
Definition: broadcaster.cxx:82
ContainerNotification(css::uno::Reference< css::container::XContainerListener > const &theListener, css::container::ContainerEvent const &theEvent)