merge the formfield patch from ooo-build
[ooovba.git] / configmgr / source / api2 / broadcaster.hxx
blob280e894bc2f104f4d43a75c1ab684680be93ba9a
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: broadcaster.hxx,v $
10 * $Revision: 1.7 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef CONFIGMGR_API_BROADCASTER_HXX_
32 #define CONFIGMGR_API_BROADCASTER_HXX_
34 #include <com/sun/star/beans/PropertyVetoException.hpp>
36 #include <vos/ref.hxx>
38 namespace configmgr
40 namespace configuration
42 // ---------------------------------------------------------------------------------------------------
43 class NodeChange;
44 class NodeChanges;
45 class NodeChangeInformation;
46 class NodeChangesInformation;
48 // ---------------------------------------------------------------------------------------------------
49 namespace configapi
51 class Notifier;
53 namespace css = ::com::sun::star;
54 // ---------------------------------------------------------------------------------------------------
56 /// broadcasts events for changes to a single config node or several sibling nodes
57 class Broadcaster
59 public:
60 /// construct a broadcaster
61 Broadcaster(Notifier const& aNotifier, configuration::NodeChange const& aChange, bool bLocal);
62 Broadcaster(Notifier const& aNotifier, configuration::NodeChanges const& aChanges, bool bLocal);
63 Broadcaster(Notifier const& aNotifier, configuration::NodeChangesInformation const& aChanges, bool bLocal);
64 Broadcaster(Broadcaster const& aOther);
65 ~Broadcaster();
67 /// give all property veto listeners on the affected node a chance to veto
68 void queryConstraints(configuration::NodeChange const& aChange) throw(css::beans::PropertyVetoException);
69 /// give all property veto listeners on any of the affected nodes a chance to veto
70 void queryConstraints(configuration::NodeChanges const& aChanges, bool bSingleBase = true) throw(css::beans::PropertyVetoException);
72 /// notify all listeners which are affected by this change
73 void notifyListeners(configuration::NodeChange const& aChange) throw();
74 /// notify all listeners which are affected by any of these changes (potentially from many different bases)
75 void notifyListeners(configuration::NodeChanges const& aChanges, bool bSingleBase) throw();
76 /// notify all listeners which are affected by any of these changes (potentially from many different bases)
77 void notifyListeners(configuration::NodeChangesInformation const& aChanges, bool bSingleBase = false) throw();
79 class Impl;
80 private:
81 vos::ORef<Impl> m_pImpl;
82 private:
83 void operator=(Broadcaster const& aOther);
86 // ---------------------------------------------------------------------------------------------------
91 #endif // CONFIGMGR_API_BROADCASTER_HXX_