1 /*************************************************************************
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * Copyright 2008 by Sun Microsystems, Inc.
6 * OpenOffice.org - a multi-platform office productivity suite
8 * $RCSfile: documentevents.hxx,v $
10 * $Revision: 1.1.2.2 $
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.
28 ************************************************************************/
30 #ifndef DBACCESS_DOCUMENTEVENTS_HXX
31 #define DBACCESS_DOCUMENTEVENTS_HXX
33 /** === begin UNO includes === **/
34 #include <com/sun/star/container/XNameReplace.hpp>
35 #include <com/sun/star/beans/PropertyValue.hpp>
36 /** === end UNO includes === **/
38 #include <cppuhelper/implbase1.hxx>
42 #include <boost/noncopyable.hpp>
44 //........................................................................
47 //........................................................................
49 typedef ::std::map
< ::rtl::OUString
, ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
> >
52 //====================================================================
54 //====================================================================
55 struct DocumentEvents_Data
;
57 typedef ::cppu::WeakImplHelper1
< ::com::sun::star::container::XNameReplace
58 > DocumentEvents_Base
;
60 class DocumentEvents
:public DocumentEvents_Base
61 ,public ::boost::noncopyable
64 DocumentEvents( ::cppu::OWeakObject
& _rParent
, ::osl::Mutex
& _rMutex
, DocumentEventsData
& _rEventsData
);
67 static bool needsSynchronousNotification( const ::rtl::OUString
& _rEventName
);
70 virtual void SAL_CALL
acquire() throw();
71 virtual void SAL_CALL
release() throw();
74 virtual void SAL_CALL
replaceByName( const ::rtl::OUString
& aName
, const ::com::sun::star::uno::Any
& aElement
) throw (::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::container::NoSuchElementException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
77 virtual ::com::sun::star::uno::Any SAL_CALL
getByName( const ::rtl::OUString
& aName
) throw (::com::sun::star::container::NoSuchElementException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
78 virtual ::com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getElementNames( ) throw (::com::sun::star::uno::RuntimeException
);
79 virtual ::sal_Bool SAL_CALL
hasByName( const ::rtl::OUString
& aName
) throw (::com::sun::star::uno::RuntimeException
);
82 virtual ::com::sun::star::uno::Type SAL_CALL
getElementType( ) throw (::com::sun::star::uno::RuntimeException
);
83 virtual ::sal_Bool SAL_CALL
hasElements( ) throw (::com::sun::star::uno::RuntimeException
);
86 ::std::auto_ptr
< DocumentEvents_Data
> m_pData
;
89 //........................................................................
90 } // namespace dbaccess
91 //........................................................................
93 #endif // DBACCESS_DOCUMENTEVENTS_HXX