1*a2faadffSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*a2faadffSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*a2faadffSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*a2faadffSAndrew Rist * distributed with this work for additional information 6*a2faadffSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*a2faadffSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*a2faadffSAndrew Rist * "License"); you may not use this file except in compliance 9*a2faadffSAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*a2faadffSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*a2faadffSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*a2faadffSAndrew Rist * software distributed under the License is distributed on an 15*a2faadffSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*a2faadffSAndrew Rist * KIND, either express or implied. See the License for the 17*a2faadffSAndrew Rist * specific language governing permissions and limitations 18*a2faadffSAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*a2faadffSAndrew Rist *************************************************************/ 21*a2faadffSAndrew Rist 22*a2faadffSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef INCLUDED_CONFIGMGR_SOURCE_ACCESS_HXX 25cdf0e10cSrcweir #define INCLUDED_CONFIGMGR_SOURCE_ACCESS_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "sal/config.h" 28cdf0e10cSrcweir 29cdf0e10cSrcweir #include <map> 30cdf0e10cSrcweir #include <set> 31cdf0e10cSrcweir #include <vector> 32cdf0e10cSrcweir 33cdf0e10cSrcweir #include "boost/noncopyable.hpp" 34cdf0e10cSrcweir #include "com/sun/star/beans/PropertyVetoException.hpp" 35cdf0e10cSrcweir #include "com/sun/star/beans/UnknownPropertyException.hpp" 36cdf0e10cSrcweir #include "com/sun/star/beans/XExactName.hpp" 37cdf0e10cSrcweir #include "com/sun/star/beans/XHierarchicalPropertySet.hpp" 38cdf0e10cSrcweir #include "com/sun/star/beans/XHierarchicalPropertySetInfo.hpp" 39cdf0e10cSrcweir #include "com/sun/star/beans/XMultiHierarchicalPropertySet.hpp" 40cdf0e10cSrcweir #include "com/sun/star/beans/XMultiPropertySet.hpp" 41cdf0e10cSrcweir #include "com/sun/star/beans/XProperty.hpp" 42cdf0e10cSrcweir #include "com/sun/star/beans/XPropertySet.hpp" 43cdf0e10cSrcweir #include "com/sun/star/beans/XPropertySetInfo.hpp" 44cdf0e10cSrcweir #include "com/sun/star/container/ElementExistException.hpp" 45cdf0e10cSrcweir #include "com/sun/star/container/NoSuchElementException.hpp" 46cdf0e10cSrcweir #include "com/sun/star/container/XContainer.hpp" 47cdf0e10cSrcweir #include "com/sun/star/container/XHierarchicalName.hpp" 48cdf0e10cSrcweir #include "com/sun/star/container/XHierarchicalNameAccess.hpp" 49cdf0e10cSrcweir #include "com/sun/star/container/XNameContainer.hpp" 50cdf0e10cSrcweir #include "com/sun/star/container/XNamed.hpp" 51cdf0e10cSrcweir #include "com/sun/star/lang/IllegalArgumentException.hpp" 52cdf0e10cSrcweir #include "com/sun/star/lang/NoSupportException.hpp" 53cdf0e10cSrcweir #include "com/sun/star/lang/WrappedTargetException.hpp" 54cdf0e10cSrcweir #include "com/sun/star/lang/XComponent.hpp" 55cdf0e10cSrcweir #include "com/sun/star/lang/XServiceInfo.hpp" 56cdf0e10cSrcweir #include "com/sun/star/lang/XTypeProvider.hpp" 57cdf0e10cSrcweir #include "com/sun/star/lang/XSingleServiceFactory.hpp" 58cdf0e10cSrcweir #include "com/sun/star/uno/Exception.hpp" 59cdf0e10cSrcweir #include "com/sun/star/uno/Reference.hxx" 60cdf0e10cSrcweir #include "com/sun/star/uno/RuntimeException.hpp" 61cdf0e10cSrcweir #include "com/sun/star/uno/Sequence.hxx" 62cdf0e10cSrcweir #include "cppuhelper/weak.hxx" 63cdf0e10cSrcweir #include "osl/interlck.h" 64cdf0e10cSrcweir #include "rtl/ref.hxx" 65cdf0e10cSrcweir #include "sal/types.h" 66cdf0e10cSrcweir 67cdf0e10cSrcweir #include "modifications.hxx" 68cdf0e10cSrcweir #include "path.hxx" 69cdf0e10cSrcweir #include "type.hxx" 70cdf0e10cSrcweir 71cdf0e10cSrcweir namespace com { namespace sun { namespace star { 72cdf0e10cSrcweir namespace beans { 73cdf0e10cSrcweir class XHierarchicalPropertySetInfo; 74cdf0e10cSrcweir class XPropertiesChangeListener; 75cdf0e10cSrcweir class XPropertyChangeListener; 76cdf0e10cSrcweir class XVetoableChangeListener; 77cdf0e10cSrcweir struct Property; 78cdf0e10cSrcweir } 79cdf0e10cSrcweir namespace container { class XContainerListener; } 80cdf0e10cSrcweir namespace lang { class XEventListener; } 81cdf0e10cSrcweir namespace uno { 82cdf0e10cSrcweir class Any; 83cdf0e10cSrcweir class Type; 84cdf0e10cSrcweir class XInterface; 85cdf0e10cSrcweir } 86cdf0e10cSrcweir namespace util { struct ElementChange; } 87cdf0e10cSrcweir } } } 88cdf0e10cSrcweir namespace rtl { class OUString; } 89cdf0e10cSrcweir 90cdf0e10cSrcweir namespace configmgr { 91cdf0e10cSrcweir 92cdf0e10cSrcweir class Broadcaster; 93cdf0e10cSrcweir class Change; 94cdf0e10cSrcweir class ChildAccess; 95cdf0e10cSrcweir class Components; 96cdf0e10cSrcweir class Node; 97cdf0e10cSrcweir class RootAccess; 98cdf0e10cSrcweir 99cdf0e10cSrcweir class Access: 100cdf0e10cSrcweir public cppu::OWeakObject, public com::sun::star::lang::XTypeProvider, 101cdf0e10cSrcweir public com::sun::star::lang::XServiceInfo, 102cdf0e10cSrcweir public com::sun::star::lang::XComponent, 103cdf0e10cSrcweir public com::sun::star::container::XHierarchicalNameAccess, 104cdf0e10cSrcweir public com::sun::star::container::XContainer, 105cdf0e10cSrcweir public com::sun::star::beans::XExactName, 106cdf0e10cSrcweir public com::sun::star::beans::XPropertySetInfo, 107cdf0e10cSrcweir public com::sun::star::container::XHierarchicalName, 108cdf0e10cSrcweir public com::sun::star::container::XNamed, 109cdf0e10cSrcweir public com::sun::star::beans::XProperty, 110cdf0e10cSrcweir public com::sun::star::beans::XPropertySet, 111cdf0e10cSrcweir public com::sun::star::beans::XMultiPropertySet, 112cdf0e10cSrcweir public com::sun::star::beans::XHierarchicalPropertySet, 113cdf0e10cSrcweir public com::sun::star::beans::XMultiHierarchicalPropertySet, 114cdf0e10cSrcweir public com::sun::star::beans::XHierarchicalPropertySetInfo, 115cdf0e10cSrcweir public com::sun::star::container::XNameContainer, 116cdf0e10cSrcweir public com::sun::star::lang::XSingleServiceFactory, 117cdf0e10cSrcweir private boost::noncopyable 118cdf0e10cSrcweir { 119cdf0e10cSrcweir public: 120cdf0e10cSrcweir oslInterlockedCount acquireCounting(); 121cdf0e10cSrcweir 122cdf0e10cSrcweir void releaseNondeleting(); 123cdf0e10cSrcweir 124cdf0e10cSrcweir bool isValue(); 125cdf0e10cSrcweir 126cdf0e10cSrcweir void markChildAsModified(rtl::Reference< ChildAccess > const & child); 127cdf0e10cSrcweir 128cdf0e10cSrcweir void releaseChild(rtl::OUString const & name); 129cdf0e10cSrcweir 130cdf0e10cSrcweir virtual Path getAbsolutePath() = 0; 131cdf0e10cSrcweir 132cdf0e10cSrcweir virtual Path getRelativePath() = 0; 133cdf0e10cSrcweir 134cdf0e10cSrcweir virtual rtl::OUString getRelativePathRepresentation() = 0; 135cdf0e10cSrcweir 136cdf0e10cSrcweir virtual rtl::Reference< Node > getNode() = 0; 137cdf0e10cSrcweir 138cdf0e10cSrcweir virtual bool isFinalized() = 0; 139cdf0e10cSrcweir 140cdf0e10cSrcweir virtual void initBroadcaster( 141cdf0e10cSrcweir Modifications::Node const & modifications, Broadcaster * broadcaster); 142cdf0e10cSrcweir 143cdf0e10cSrcweir using OWeakObject::acquire; 144cdf0e10cSrcweir using OWeakObject::release; 145cdf0e10cSrcweir 146cdf0e10cSrcweir protected: 147cdf0e10cSrcweir Access(Components & components); 148cdf0e10cSrcweir 149cdf0e10cSrcweir virtual ~Access(); 150cdf0e10cSrcweir 151cdf0e10cSrcweir virtual rtl::OUString getNameInternal() = 0; 152cdf0e10cSrcweir 153cdf0e10cSrcweir virtual rtl::Reference< RootAccess > getRootAccess() = 0; 154cdf0e10cSrcweir 155cdf0e10cSrcweir virtual rtl::Reference< Access > getParentAccess() = 0; 156cdf0e10cSrcweir 157cdf0e10cSrcweir virtual void addTypes(std::vector< com::sun::star::uno::Type > * types) 158cdf0e10cSrcweir const = 0; 159cdf0e10cSrcweir 160cdf0e10cSrcweir virtual void addSupportedServiceNames( 161cdf0e10cSrcweir std::vector< rtl::OUString > * services) = 0; 162cdf0e10cSrcweir 163cdf0e10cSrcweir virtual void initDisposeBroadcaster(Broadcaster * broadcaster); 164cdf0e10cSrcweir 165cdf0e10cSrcweir virtual void clearListeners() throw (); 166cdf0e10cSrcweir 167cdf0e10cSrcweir virtual com::sun::star::uno::Any SAL_CALL queryInterface( 168cdf0e10cSrcweir com::sun::star::uno::Type const & aType) 169cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 170cdf0e10cSrcweir 171cdf0e10cSrcweir Components & getComponents() const; 172cdf0e10cSrcweir 173cdf0e10cSrcweir void checkLocalizedPropertyAccess(); 174cdf0e10cSrcweir 175cdf0e10cSrcweir rtl::Reference< Node > getParentNode(); 176cdf0e10cSrcweir 177cdf0e10cSrcweir rtl::Reference< ChildAccess > getChild(rtl::OUString const & name); 178cdf0e10cSrcweir 179cdf0e10cSrcweir std::vector< rtl::Reference< ChildAccess > > getAllChildren(); 180cdf0e10cSrcweir 181cdf0e10cSrcweir void checkValue( 182cdf0e10cSrcweir com::sun::star::uno::Any const & value, Type type, bool nillable); 183cdf0e10cSrcweir 184cdf0e10cSrcweir void insertLocalizedValueChild( 185cdf0e10cSrcweir rtl::OUString const & name, com::sun::star::uno::Any const & value, 186cdf0e10cSrcweir Modifications * localModifications); 187cdf0e10cSrcweir 188cdf0e10cSrcweir void reportChildChanges( 189cdf0e10cSrcweir std::vector< com::sun::star::util::ElementChange > * changes); 190cdf0e10cSrcweir 191cdf0e10cSrcweir void commitChildChanges(bool valid, Modifications * globalModifications); 192cdf0e10cSrcweir 193cdf0e10cSrcweir void initBroadcasterAndChanges( 194cdf0e10cSrcweir Modifications::Node const & modifications, Broadcaster * broadcaster, 195cdf0e10cSrcweir std::vector< com::sun::star::util::ElementChange > * changes); 196cdf0e10cSrcweir 197cdf0e10cSrcweir bool isDisposed() const; 198cdf0e10cSrcweir 199cdf0e10cSrcweir private: 200cdf0e10cSrcweir struct ModifiedChild { 201cdf0e10cSrcweir rtl::Reference< ChildAccess > child; 202cdf0e10cSrcweir bool directlyModified; 203cdf0e10cSrcweir 204cdf0e10cSrcweir ModifiedChild(); 205cdf0e10cSrcweir 206cdf0e10cSrcweir ModifiedChild( 207cdf0e10cSrcweir rtl::Reference< ChildAccess > const & theChild, 208cdf0e10cSrcweir bool theDirectlyModified); 209cdf0e10cSrcweir }; 210cdf0e10cSrcweir 211cdf0e10cSrcweir typedef std::map< rtl::OUString, ModifiedChild > ModifiedChildren; 212cdf0e10cSrcweir 213cdf0e10cSrcweir virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL 214cdf0e10cSrcweir getTypes() throw (com::sun::star::uno::RuntimeException); 215cdf0e10cSrcweir 216cdf0e10cSrcweir virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL 217cdf0e10cSrcweir getImplementationId() throw (com::sun::star::uno::RuntimeException); 218cdf0e10cSrcweir 219cdf0e10cSrcweir virtual rtl::OUString SAL_CALL getImplementationName() 220cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 221cdf0e10cSrcweir 222cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & ServiceName) 223cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 224cdf0e10cSrcweir 225cdf0e10cSrcweir virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL 226cdf0e10cSrcweir getSupportedServiceNames() throw (com::sun::star::uno::RuntimeException); 227cdf0e10cSrcweir 228cdf0e10cSrcweir virtual void SAL_CALL dispose() 229cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 230cdf0e10cSrcweir 231cdf0e10cSrcweir virtual void SAL_CALL addEventListener( 232cdf0e10cSrcweir com::sun::star::uno::Reference< com::sun::star::lang::XEventListener > 233cdf0e10cSrcweir const & xListener) 234cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 235cdf0e10cSrcweir 236cdf0e10cSrcweir virtual void SAL_CALL removeEventListener( 237cdf0e10cSrcweir com::sun::star::uno::Reference< com::sun::star::lang::XEventListener > 238cdf0e10cSrcweir const & aListener) 239cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 240cdf0e10cSrcweir 241cdf0e10cSrcweir virtual com::sun::star::uno::Type SAL_CALL getElementType() 242cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 243cdf0e10cSrcweir 244cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasElements() 245cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 246cdf0e10cSrcweir 247cdf0e10cSrcweir virtual com::sun::star::uno::Any SAL_CALL getByName( 248cdf0e10cSrcweir rtl::OUString const & aName) 249cdf0e10cSrcweir throw ( 250cdf0e10cSrcweir com::sun::star::container::NoSuchElementException, 251cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 252cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 253cdf0e10cSrcweir 254cdf0e10cSrcweir virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL 255cdf0e10cSrcweir getElementNames() throw (com::sun::star::uno::RuntimeException); 256cdf0e10cSrcweir 257cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasByName(rtl::OUString const & aName) 258cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 259cdf0e10cSrcweir 260cdf0e10cSrcweir virtual com::sun::star::uno::Any SAL_CALL getByHierarchicalName( 261cdf0e10cSrcweir rtl::OUString const & aName) 262cdf0e10cSrcweir throw ( 263cdf0e10cSrcweir com::sun::star::container::NoSuchElementException, 264cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 265cdf0e10cSrcweir 266cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasByHierarchicalName(rtl::OUString const & aName) 267cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 268cdf0e10cSrcweir 269cdf0e10cSrcweir virtual void SAL_CALL addContainerListener( 270cdf0e10cSrcweir com::sun::star::uno::Reference< 271cdf0e10cSrcweir com::sun::star::container::XContainerListener > const & xListener) 272cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 273cdf0e10cSrcweir 274cdf0e10cSrcweir virtual void SAL_CALL removeContainerListener( 275cdf0e10cSrcweir com::sun::star::uno::Reference< 276cdf0e10cSrcweir com::sun::star::container::XContainerListener > const & xListener) 277cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 278cdf0e10cSrcweir 279cdf0e10cSrcweir virtual rtl::OUString SAL_CALL getExactName( 280cdf0e10cSrcweir rtl::OUString const & aApproximateName) 281cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 282cdf0e10cSrcweir 283cdf0e10cSrcweir virtual com::sun::star::uno::Sequence< com::sun::star::beans::Property > 284cdf0e10cSrcweir SAL_CALL getProperties() throw (com::sun::star::uno::RuntimeException); 285cdf0e10cSrcweir 286cdf0e10cSrcweir virtual com::sun::star::beans::Property SAL_CALL getPropertyByName( 287cdf0e10cSrcweir rtl::OUString const & aName) 288cdf0e10cSrcweir throw ( 289cdf0e10cSrcweir com::sun::star::beans::UnknownPropertyException, 290cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 291cdf0e10cSrcweir 292cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasPropertyByName(rtl::OUString const & Name) 293cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 294cdf0e10cSrcweir 295cdf0e10cSrcweir virtual rtl::OUString SAL_CALL getHierarchicalName() 296cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 297cdf0e10cSrcweir 298cdf0e10cSrcweir virtual rtl::OUString SAL_CALL composeHierarchicalName( 299cdf0e10cSrcweir rtl::OUString const & aRelativeName) 300cdf0e10cSrcweir throw ( 301cdf0e10cSrcweir com::sun::star::lang::IllegalArgumentException, 302cdf0e10cSrcweir com::sun::star::lang::NoSupportException, 303cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 304cdf0e10cSrcweir 305cdf0e10cSrcweir virtual rtl::OUString SAL_CALL getName() 306cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 307cdf0e10cSrcweir 308cdf0e10cSrcweir virtual void SAL_CALL setName(rtl::OUString const & aName) 309cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 310cdf0e10cSrcweir 311cdf0e10cSrcweir virtual com::sun::star::beans::Property SAL_CALL getAsProperty() 312cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 313cdf0e10cSrcweir 314cdf0e10cSrcweir virtual 315cdf0e10cSrcweir com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > 316cdf0e10cSrcweir SAL_CALL getPropertySetInfo() throw (com::sun::star::uno::RuntimeException); 317cdf0e10cSrcweir 318cdf0e10cSrcweir virtual void SAL_CALL setPropertyValue( 319cdf0e10cSrcweir rtl::OUString const & aPropertyName, 320cdf0e10cSrcweir com::sun::star::uno::Any const & aValue) 321cdf0e10cSrcweir throw ( 322cdf0e10cSrcweir com::sun::star::beans::UnknownPropertyException, 323cdf0e10cSrcweir com::sun::star::beans::PropertyVetoException, 324cdf0e10cSrcweir com::sun::star::lang::IllegalArgumentException, 325cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 326cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 327cdf0e10cSrcweir 328cdf0e10cSrcweir virtual com::sun::star::uno::Any SAL_CALL getPropertyValue( 329cdf0e10cSrcweir rtl::OUString const & PropertyName) 330cdf0e10cSrcweir throw ( 331cdf0e10cSrcweir com::sun::star::beans::UnknownPropertyException, 332cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 333cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 334cdf0e10cSrcweir 335cdf0e10cSrcweir virtual void SAL_CALL addPropertyChangeListener( 336cdf0e10cSrcweir rtl::OUString const & aPropertyName, 337cdf0e10cSrcweir com::sun::star::uno::Reference< 338cdf0e10cSrcweir com::sun::star::beans::XPropertyChangeListener > const & xListener) 339cdf0e10cSrcweir throw ( 340cdf0e10cSrcweir com::sun::star::beans::UnknownPropertyException, 341cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 342cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 343cdf0e10cSrcweir 344cdf0e10cSrcweir virtual void SAL_CALL removePropertyChangeListener( 345cdf0e10cSrcweir rtl::OUString const & aPropertyName, 346cdf0e10cSrcweir com::sun::star::uno::Reference< 347cdf0e10cSrcweir com::sun::star::beans::XPropertyChangeListener > const & aListener) 348cdf0e10cSrcweir throw ( 349cdf0e10cSrcweir com::sun::star::beans::UnknownPropertyException, 350cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 351cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 352cdf0e10cSrcweir 353cdf0e10cSrcweir virtual void SAL_CALL addVetoableChangeListener( 354cdf0e10cSrcweir rtl::OUString const & PropertyName, 355cdf0e10cSrcweir com::sun::star::uno::Reference< 356cdf0e10cSrcweir com::sun::star::beans::XVetoableChangeListener > const & aListener) 357cdf0e10cSrcweir throw ( 358cdf0e10cSrcweir com::sun::star::beans::UnknownPropertyException, 359cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 360cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 361cdf0e10cSrcweir 362cdf0e10cSrcweir virtual void SAL_CALL removeVetoableChangeListener( 363cdf0e10cSrcweir rtl::OUString const & PropertyName, 364cdf0e10cSrcweir com::sun::star::uno::Reference< 365cdf0e10cSrcweir com::sun::star::beans::XVetoableChangeListener > const & aListener) 366cdf0e10cSrcweir throw ( 367cdf0e10cSrcweir com::sun::star::beans::UnknownPropertyException, 368cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 369cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 370cdf0e10cSrcweir 371cdf0e10cSrcweir virtual void SAL_CALL setPropertyValues( 372cdf0e10cSrcweir com::sun::star::uno::Sequence< rtl::OUString > const & aPropertyNames, 373cdf0e10cSrcweir com::sun::star::uno::Sequence< com::sun::star::uno::Any > const & 374cdf0e10cSrcweir aValues) 375cdf0e10cSrcweir throw ( 376cdf0e10cSrcweir com::sun::star::beans::PropertyVetoException, 377cdf0e10cSrcweir com::sun::star::lang::IllegalArgumentException, 378cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 379cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 380cdf0e10cSrcweir 381cdf0e10cSrcweir virtual com::sun::star::uno::Sequence< com::sun::star::uno::Any > SAL_CALL 382cdf0e10cSrcweir getPropertyValues( 383cdf0e10cSrcweir com::sun::star::uno::Sequence< rtl::OUString > const & aPropertyNames) 384cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 385cdf0e10cSrcweir 386cdf0e10cSrcweir virtual void SAL_CALL addPropertiesChangeListener( 387cdf0e10cSrcweir com::sun::star::uno::Sequence< rtl::OUString > const & aPropertyNames, 388cdf0e10cSrcweir com::sun::star::uno::Reference< 389cdf0e10cSrcweir com::sun::star::beans::XPropertiesChangeListener > const & 390cdf0e10cSrcweir xListener) 391cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 392cdf0e10cSrcweir 393cdf0e10cSrcweir virtual void SAL_CALL removePropertiesChangeListener( 394cdf0e10cSrcweir com::sun::star::uno::Reference< 395cdf0e10cSrcweir com::sun::star::beans::XPropertiesChangeListener > const & 396cdf0e10cSrcweir xListener) 397cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 398cdf0e10cSrcweir 399cdf0e10cSrcweir virtual void SAL_CALL firePropertiesChangeEvent( 400cdf0e10cSrcweir com::sun::star::uno::Sequence< rtl::OUString > const & aPropertyNames, 401cdf0e10cSrcweir com::sun::star::uno::Reference< 402cdf0e10cSrcweir com::sun::star::beans::XPropertiesChangeListener > const & 403cdf0e10cSrcweir xListener) 404cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 405cdf0e10cSrcweir 406cdf0e10cSrcweir virtual 407cdf0e10cSrcweir com::sun::star::uno::Reference< 408cdf0e10cSrcweir com::sun::star::beans::XHierarchicalPropertySetInfo > SAL_CALL 409cdf0e10cSrcweir getHierarchicalPropertySetInfo() 410cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 411cdf0e10cSrcweir 412cdf0e10cSrcweir virtual void SAL_CALL setHierarchicalPropertyValue( 413cdf0e10cSrcweir rtl::OUString const & aHierarchicalPropertyName, 414cdf0e10cSrcweir com::sun::star::uno::Any const & aValue) 415cdf0e10cSrcweir throw ( 416cdf0e10cSrcweir com::sun::star::beans::UnknownPropertyException, 417cdf0e10cSrcweir com::sun::star::beans::PropertyVetoException, 418cdf0e10cSrcweir com::sun::star::lang::IllegalArgumentException, 419cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 420cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 421cdf0e10cSrcweir 422cdf0e10cSrcweir virtual com::sun::star::uno::Any SAL_CALL getHierarchicalPropertyValue( 423cdf0e10cSrcweir rtl::OUString const & aHierarchicalPropertyName) 424cdf0e10cSrcweir throw ( 425cdf0e10cSrcweir com::sun::star::beans::UnknownPropertyException, 426cdf0e10cSrcweir com::sun::star::lang::IllegalArgumentException, 427cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 428cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 429cdf0e10cSrcweir 430cdf0e10cSrcweir virtual void SAL_CALL setHierarchicalPropertyValues( 431cdf0e10cSrcweir com::sun::star::uno::Sequence< rtl::OUString > const & 432cdf0e10cSrcweir aHierarchicalPropertyNames, 433cdf0e10cSrcweir com::sun::star::uno::Sequence< com::sun::star::uno::Any > const & 434cdf0e10cSrcweir Values) 435cdf0e10cSrcweir throw ( 436cdf0e10cSrcweir com::sun::star::beans::PropertyVetoException, 437cdf0e10cSrcweir com::sun::star::lang::IllegalArgumentException, 438cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 439cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 440cdf0e10cSrcweir 441cdf0e10cSrcweir virtual com::sun::star::uno::Sequence< com::sun::star::uno::Any > SAL_CALL 442cdf0e10cSrcweir getHierarchicalPropertyValues( 443cdf0e10cSrcweir com::sun::star::uno::Sequence< rtl::OUString > const & 444cdf0e10cSrcweir aHierarchicalPropertyNames) 445cdf0e10cSrcweir throw ( 446cdf0e10cSrcweir com::sun::star::lang::IllegalArgumentException, 447cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 448cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 449cdf0e10cSrcweir 450cdf0e10cSrcweir virtual com::sun::star::beans::Property SAL_CALL 451cdf0e10cSrcweir getPropertyByHierarchicalName(rtl::OUString const & aHierarchicalName) 452cdf0e10cSrcweir throw ( 453cdf0e10cSrcweir com::sun::star::beans::UnknownPropertyException, 454cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 455cdf0e10cSrcweir 456cdf0e10cSrcweir virtual sal_Bool SAL_CALL hasPropertyByHierarchicalName( 457cdf0e10cSrcweir rtl::OUString const & aHierarchicalName) 458cdf0e10cSrcweir throw (com::sun::star::uno::RuntimeException); 459cdf0e10cSrcweir 460cdf0e10cSrcweir virtual void SAL_CALL replaceByName( 461cdf0e10cSrcweir rtl::OUString const & aName, com::sun::star::uno::Any const & aElement) 462cdf0e10cSrcweir throw ( 463cdf0e10cSrcweir com::sun::star::lang::IllegalArgumentException, 464cdf0e10cSrcweir com::sun::star::container::NoSuchElementException, 465cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 466cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 467cdf0e10cSrcweir 468cdf0e10cSrcweir virtual void SAL_CALL insertByName( 469cdf0e10cSrcweir rtl::OUString const & aName, com::sun::star::uno::Any const & aElement) 470cdf0e10cSrcweir throw ( 471cdf0e10cSrcweir com::sun::star::lang::IllegalArgumentException, 472cdf0e10cSrcweir com::sun::star::container::ElementExistException, 473cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 474cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 475cdf0e10cSrcweir 476cdf0e10cSrcweir virtual void SAL_CALL removeByName(rtl::OUString const & aName) 477cdf0e10cSrcweir throw ( 478cdf0e10cSrcweir com::sun::star::container::NoSuchElementException, 479cdf0e10cSrcweir com::sun::star::lang::WrappedTargetException, 480cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 481cdf0e10cSrcweir 482cdf0e10cSrcweir virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > 483cdf0e10cSrcweir SAL_CALL createInstance() 484cdf0e10cSrcweir throw ( 485cdf0e10cSrcweir com::sun::star::uno::Exception, 486cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 487cdf0e10cSrcweir 488cdf0e10cSrcweir virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > 489cdf0e10cSrcweir SAL_CALL createInstanceWithArguments( 490cdf0e10cSrcweir com::sun::star::uno::Sequence< com::sun::star::uno::Any > const & 491cdf0e10cSrcweir aArguments) 492cdf0e10cSrcweir throw ( 493cdf0e10cSrcweir com::sun::star::uno::Exception, 494cdf0e10cSrcweir com::sun::star::uno::RuntimeException); 495cdf0e10cSrcweir 496cdf0e10cSrcweir rtl::Reference< ChildAccess > getModifiedChild( 497cdf0e10cSrcweir ModifiedChildren::iterator const & childIterator); 498cdf0e10cSrcweir 499cdf0e10cSrcweir rtl::Reference< ChildAccess > getUnmodifiedChild( 500cdf0e10cSrcweir rtl::OUString const & name); 501cdf0e10cSrcweir 502cdf0e10cSrcweir rtl::Reference< ChildAccess > getSubChild(rtl::OUString const & path); 503cdf0e10cSrcweir 504cdf0e10cSrcweir bool setChildProperty( 505cdf0e10cSrcweir rtl::OUString const & name, com::sun::star::uno::Any const & value, 506cdf0e10cSrcweir Modifications * localModifications); 507cdf0e10cSrcweir 508cdf0e10cSrcweir com::sun::star::beans::Property asProperty(); 509cdf0e10cSrcweir 510cdf0e10cSrcweir void checkFinalized(); 511cdf0e10cSrcweir 512cdf0e10cSrcweir void checkKnownProperty(rtl::OUString const & descriptor); 513cdf0e10cSrcweir 514cdf0e10cSrcweir rtl::Reference< ChildAccess > getFreeSetMember( 515cdf0e10cSrcweir com::sun::star::uno::Any const & value); 516cdf0e10cSrcweir 517cdf0e10cSrcweir rtl::Reference< Access > getNotificationRoot(); 518cdf0e10cSrcweir 519cdf0e10cSrcweir typedef std::map< rtl::OUString, ChildAccess * > WeakChildMap; 520cdf0e10cSrcweir 521cdf0e10cSrcweir typedef 522cdf0e10cSrcweir std::multiset< 523cdf0e10cSrcweir com::sun::star::uno::Reference< 524cdf0e10cSrcweir com::sun::star::lang::XEventListener > > 525cdf0e10cSrcweir DisposeListeners; 526cdf0e10cSrcweir 527cdf0e10cSrcweir typedef 528cdf0e10cSrcweir std::multiset< 529cdf0e10cSrcweir com::sun::star::uno::Reference< 530cdf0e10cSrcweir com::sun::star::container::XContainerListener > > 531cdf0e10cSrcweir ContainerListeners; 532cdf0e10cSrcweir 533cdf0e10cSrcweir typedef 534cdf0e10cSrcweir std::multiset< 535cdf0e10cSrcweir com::sun::star::uno::Reference< 536cdf0e10cSrcweir com::sun::star::beans::XPropertyChangeListener > > 537cdf0e10cSrcweir PropertyChangeListenersElement; 538cdf0e10cSrcweir 539cdf0e10cSrcweir typedef std::map< rtl::OUString, PropertyChangeListenersElement > 540cdf0e10cSrcweir PropertyChangeListeners; 541cdf0e10cSrcweir 542cdf0e10cSrcweir typedef 543cdf0e10cSrcweir std::multiset< 544cdf0e10cSrcweir com::sun::star::uno::Reference< 545cdf0e10cSrcweir com::sun::star::beans::XVetoableChangeListener > > 546cdf0e10cSrcweir VetoableChangeListenersElement; 547cdf0e10cSrcweir 548cdf0e10cSrcweir typedef std::map< rtl::OUString, VetoableChangeListenersElement > 549cdf0e10cSrcweir VetoableChangeListeners; 550cdf0e10cSrcweir 551cdf0e10cSrcweir typedef 552cdf0e10cSrcweir std::multiset< 553cdf0e10cSrcweir com::sun::star::uno::Reference< 554cdf0e10cSrcweir com::sun::star::beans::XPropertiesChangeListener > > 555cdf0e10cSrcweir PropertiesChangeListeners; 556cdf0e10cSrcweir 557cdf0e10cSrcweir Components & components_; 558cdf0e10cSrcweir ModifiedChildren modifiedChildren_; 559cdf0e10cSrcweir WeakChildMap cachedChildren_; 560cdf0e10cSrcweir DisposeListeners disposeListeners_; 561cdf0e10cSrcweir ContainerListeners containerListeners_; 562cdf0e10cSrcweir PropertyChangeListeners propertyChangeListeners_; 563cdf0e10cSrcweir VetoableChangeListeners vetoableChangeListeners_; 564cdf0e10cSrcweir PropertiesChangeListeners propertiesChangeListeners_; 565cdf0e10cSrcweir bool disposed_; 566cdf0e10cSrcweir 567cdf0e10cSrcweir #if OSL_DEBUG_LEVEL > 0 568cdf0e10cSrcweir protected: 569cdf0e10cSrcweir enum { 570cdf0e10cSrcweir IS_ANY = 0, IS_GROUP = 0x01, IS_SET = 0x02, IS_EXTENSIBLE = 0x04, 571cdf0e10cSrcweir IS_GROUP_MEMBER = 0x08, IS_SET_MEMBER = 0x10, IS_UPDATE = 0x20 }; 572cdf0e10cSrcweir bool thisIs(int what); 573cdf0e10cSrcweir #endif 574cdf0e10cSrcweir }; 575cdf0e10cSrcweir 576cdf0e10cSrcweir } 577cdf0e10cSrcweir 578cdf0e10cSrcweir #endif 579