1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #ifndef _CONTENT_RESULTSET_WRAPPER_HXX
29*cdf0e10cSrcweir #define _CONTENT_RESULTSET_WRAPPER_HXX
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #include <rtl/ustring.hxx>
32*cdf0e10cSrcweir #include <ucbhelper/macros.hxx>
33*cdf0e10cSrcweir #include <osl/mutex.hxx>
34*cdf0e10cSrcweir #include <cppuhelper/weak.hxx>
35*cdf0e10cSrcweir #include <com/sun/star/lang/XComponent.hpp>
36*cdf0e10cSrcweir #include <com/sun/star/sdbc/XCloseable.hpp>
37*cdf0e10cSrcweir #include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
38*cdf0e10cSrcweir #include <com/sun/star/sdbc/XResultSet.hpp>
39*cdf0e10cSrcweir #include <com/sun/star/sdbc/XRow.hpp>
40*cdf0e10cSrcweir #include <com/sun/star/ucb/XContentAccess.hpp>
41*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
42*cdf0e10cSrcweir #include <com/sun/star/lang/DisposedException.hpp>
43*cdf0e10cSrcweir #include <cppuhelper/interfacecontainer.hxx>
44*cdf0e10cSrcweir 
45*cdf0e10cSrcweir //=========================================================================
46*cdf0e10cSrcweir 
47*cdf0e10cSrcweir class ContentResultSetWrapperListener;
48*cdf0e10cSrcweir class ContentResultSetWrapper
49*cdf0e10cSrcweir 				: public cppu::OWeakObject
50*cdf0e10cSrcweir 				, public com::sun::star::lang::XComponent
51*cdf0e10cSrcweir 				, public com::sun::star::sdbc::XCloseable
52*cdf0e10cSrcweir 				, public com::sun::star::sdbc::XResultSetMetaDataSupplier
53*cdf0e10cSrcweir 				, public com::sun::star::beans::XPropertySet
54*cdf0e10cSrcweir 				, public com::sun::star::ucb::XContentAccess
55*cdf0e10cSrcweir 				, public com::sun::star::sdbc::XResultSet
56*cdf0e10cSrcweir 				, public com::sun::star::sdbc::XRow
57*cdf0e10cSrcweir {
58*cdf0e10cSrcweir protected:
59*cdf0e10cSrcweir 
60*cdf0e10cSrcweir 	//--------------------------------------------------------------------------
61*cdf0e10cSrcweir 	//class PropertyChangeListenerContainer_Impl.
62*cdf0e10cSrcweir 
63*cdf0e10cSrcweir 	struct equalStr_Impl
64*cdf0e10cSrcweir 	{
65*cdf0e10cSrcweir 			bool operator()( const rtl::OUString& s1, const rtl::OUString& s2 ) const
66*cdf0e10cSrcweir   		{
67*cdf0e10cSrcweir 			return !!( s1 == s2 );
68*cdf0e10cSrcweir 		}
69*cdf0e10cSrcweir 	};
70*cdf0e10cSrcweir 
71*cdf0e10cSrcweir 	struct hashStr_Impl
72*cdf0e10cSrcweir 	{
73*cdf0e10cSrcweir 		size_t operator()( const rtl::OUString& rName ) const
74*cdf0e10cSrcweir 		{
75*cdf0e10cSrcweir 			return rName.hashCode();
76*cdf0e10cSrcweir 		}
77*cdf0e10cSrcweir 	};
78*cdf0e10cSrcweir 
79*cdf0e10cSrcweir 	typedef cppu::OMultiTypeInterfaceContainerHelperVar
80*cdf0e10cSrcweir 	< rtl::OUString , hashStr_Impl , equalStr_Impl >
81*cdf0e10cSrcweir 	PropertyChangeListenerContainer_Impl;
82*cdf0e10cSrcweir 	//--------------------------------------------------------------------------
83*cdf0e10cSrcweir 	// class ReacquireableGuard
84*cdf0e10cSrcweir 
85*cdf0e10cSrcweir 	class ReacquireableGuard
86*cdf0e10cSrcweir 	{
87*cdf0e10cSrcweir 	protected:
88*cdf0e10cSrcweir 		osl::Mutex* pT;
89*cdf0e10cSrcweir 	public:
90*cdf0e10cSrcweir 
91*cdf0e10cSrcweir 		ReacquireableGuard(osl::Mutex * t) : pT(t)
92*cdf0e10cSrcweir 		{
93*cdf0e10cSrcweir 			pT->acquire();
94*cdf0e10cSrcweir 		}
95*cdf0e10cSrcweir 
96*cdf0e10cSrcweir 		ReacquireableGuard(osl::Mutex& t) : pT(&t)
97*cdf0e10cSrcweir 		{
98*cdf0e10cSrcweir 			pT->acquire();
99*cdf0e10cSrcweir 		}
100*cdf0e10cSrcweir 
101*cdf0e10cSrcweir 		/** Releases mutex. */
102*cdf0e10cSrcweir 		~ReacquireableGuard()
103*cdf0e10cSrcweir 		{
104*cdf0e10cSrcweir 			if (pT)
105*cdf0e10cSrcweir 				pT->release();
106*cdf0e10cSrcweir 		}
107*cdf0e10cSrcweir 
108*cdf0e10cSrcweir 		/** Releases mutex. */
109*cdf0e10cSrcweir 		void clear()
110*cdf0e10cSrcweir 		{
111*cdf0e10cSrcweir 			if(pT)
112*cdf0e10cSrcweir 			{
113*cdf0e10cSrcweir 				pT->release();
114*cdf0e10cSrcweir 				pT = NULL;
115*cdf0e10cSrcweir 			}
116*cdf0e10cSrcweir 		}
117*cdf0e10cSrcweir 
118*cdf0e10cSrcweir 		/** Reacquire mutex. */
119*cdf0e10cSrcweir 		void reacquire()
120*cdf0e10cSrcweir 		{
121*cdf0e10cSrcweir 			if(pT)
122*cdf0e10cSrcweir 			{
123*cdf0e10cSrcweir 				pT->acquire();
124*cdf0e10cSrcweir 			}
125*cdf0e10cSrcweir 		}
126*cdf0e10cSrcweir 	};
127*cdf0e10cSrcweir 
128*cdf0e10cSrcweir 	//-----------------------------------------------------------------
129*cdf0e10cSrcweir 	//members
130*cdf0e10cSrcweir 
131*cdf0e10cSrcweir 	//my Mutex
132*cdf0e10cSrcweir 	osl::Mutex				m_aMutex;
133*cdf0e10cSrcweir 
134*cdf0e10cSrcweir 	//different Interfaces from Origin:
135*cdf0e10cSrcweir 	com::sun::star::uno::Reference< com::sun::star::sdbc::XResultSet >
136*cdf0e10cSrcweir 							m_xResultSetOrigin;
137*cdf0e10cSrcweir 	com::sun::star::uno::Reference< com::sun::star::sdbc::XRow >
138*cdf0e10cSrcweir 							m_xRowOrigin; //XRow-interface from m_xOrigin
139*cdf0e10cSrcweir 							//!! call impl_init_xRowOrigin() bevor you access this member
140*cdf0e10cSrcweir 	com::sun::star::uno::Reference< com::sun::star::ucb::XContentAccess >
141*cdf0e10cSrcweir 							m_xContentAccessOrigin; //XContentAccess-interface from m_xOrigin
142*cdf0e10cSrcweir 							//!! call impl_init_xContentAccessOrigin() bevor you access this member
143*cdf0e10cSrcweir 	com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet >
144*cdf0e10cSrcweir 							m_xPropertySetOrigin; //XPropertySet-interface from m_xOrigin
145*cdf0e10cSrcweir 							//!! call impl_init_xPropertySetOrigin() bevor you access this member
146*cdf0e10cSrcweir 
147*cdf0e10cSrcweir 	com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo >
148*cdf0e10cSrcweir 							m_xPropertySetInfo;
149*cdf0e10cSrcweir 							//call impl_initPropertySetInfo() bevor you access this member
150*cdf0e10cSrcweir 
151*cdf0e10cSrcweir 	sal_Int32				m_nForwardOnly;
152*cdf0e10cSrcweir 
153*cdf0e10cSrcweir private:
154*cdf0e10cSrcweir 	com::sun::star::uno::Reference< com::sun::star::beans::XPropertyChangeListener >
155*cdf0e10cSrcweir 							m_xMyListenerImpl;
156*cdf0e10cSrcweir 	ContentResultSetWrapperListener*
157*cdf0e10cSrcweir 							m_pMyListenerImpl;
158*cdf0e10cSrcweir 
159*cdf0e10cSrcweir 	com::sun::star::uno::Reference< com::sun::star::sdbc::XResultSetMetaData >
160*cdf0e10cSrcweir 							m_xMetaDataFromOrigin; //XResultSetMetaData from m_xOrigin
161*cdf0e10cSrcweir 
162*cdf0e10cSrcweir 	//management of listeners
163*cdf0e10cSrcweir 	sal_Bool				m_bDisposed; ///Dispose call ready.
164*cdf0e10cSrcweir 	sal_Bool				m_bInDispose;///In dispose call
165*cdf0e10cSrcweir 	osl::Mutex				m_aContainerMutex;
166*cdf0e10cSrcweir 	cppu::OInterfaceContainerHelper*
167*cdf0e10cSrcweir 							m_pDisposeEventListeners;
168*cdf0e10cSrcweir 	PropertyChangeListenerContainer_Impl*
169*cdf0e10cSrcweir 							m_pPropertyChangeListeners;
170*cdf0e10cSrcweir 	PropertyChangeListenerContainer_Impl*
171*cdf0e10cSrcweir 							m_pVetoableChangeListeners;
172*cdf0e10cSrcweir 
173*cdf0e10cSrcweir 	//-----------------------------------------------------------------
174*cdf0e10cSrcweir 	//methods:
175*cdf0e10cSrcweir private:
176*cdf0e10cSrcweir 	PropertyChangeListenerContainer_Impl* SAL_CALL
177*cdf0e10cSrcweir 	impl_getPropertyChangeListenerContainer();
178*cdf0e10cSrcweir 
179*cdf0e10cSrcweir 	PropertyChangeListenerContainer_Impl* SAL_CALL
180*cdf0e10cSrcweir 	impl_getVetoableChangeListenerContainer();
181*cdf0e10cSrcweir 
182*cdf0e10cSrcweir protected:
183*cdf0e10cSrcweir 	//-----------------------------------------------------------------
184*cdf0e10cSrcweir 
185*cdf0e10cSrcweir 	ContentResultSetWrapper( com::sun::star::uno::Reference<
186*cdf0e10cSrcweir 						com::sun::star::sdbc::XResultSet > xOrigin );
187*cdf0e10cSrcweir 
188*cdf0e10cSrcweir 	virtual ~ContentResultSetWrapper();
189*cdf0e10cSrcweir 
190*cdf0e10cSrcweir 	void SAL_CALL impl_init();
191*cdf0e10cSrcweir 	void SAL_CALL impl_deinit();
192*cdf0e10cSrcweir 
193*cdf0e10cSrcweir 	//--
194*cdf0e10cSrcweir 
195*cdf0e10cSrcweir 	void SAL_CALL impl_init_xRowOrigin();
196*cdf0e10cSrcweir 	void SAL_CALL impl_init_xContentAccessOrigin();
197*cdf0e10cSrcweir 	void SAL_CALL impl_init_xPropertySetOrigin();
198*cdf0e10cSrcweir 
199*cdf0e10cSrcweir 	//--
200*cdf0e10cSrcweir 
201*cdf0e10cSrcweir 	virtual void SAL_CALL impl_initPropertySetInfo(); //helping XPropertySet
202*cdf0e10cSrcweir 
203*cdf0e10cSrcweir 	void SAL_CALL
204*cdf0e10cSrcweir 	impl_EnsureNotDisposed()
205*cdf0e10cSrcweir 		throw( com::sun::star::lang::DisposedException,
206*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
207*cdf0e10cSrcweir 
208*cdf0e10cSrcweir 	void SAL_CALL
209*cdf0e10cSrcweir 	impl_notifyPropertyChangeListeners(
210*cdf0e10cSrcweir 			const com::sun::star::beans::PropertyChangeEvent& rEvt );
211*cdf0e10cSrcweir 
212*cdf0e10cSrcweir 	void SAL_CALL
213*cdf0e10cSrcweir 	impl_notifyVetoableChangeListeners(
214*cdf0e10cSrcweir 			const com::sun::star::beans::PropertyChangeEvent& rEvt )
215*cdf0e10cSrcweir 			throw( com::sun::star::beans::PropertyVetoException,
216*cdf0e10cSrcweir 				   com::sun::star::uno::RuntimeException );
217*cdf0e10cSrcweir 
218*cdf0e10cSrcweir 	sal_Bool SAL_CALL impl_isForwardOnly();
219*cdf0e10cSrcweir 
220*cdf0e10cSrcweir public:
221*cdf0e10cSrcweir 
222*cdf0e10cSrcweir 	//-----------------------------------------------------------------
223*cdf0e10cSrcweir 	// XInterface
224*cdf0e10cSrcweir 	//-----------------------------------------------------------------
225*cdf0e10cSrcweir 	virtual com::sun::star::uno::Any SAL_CALL
226*cdf0e10cSrcweir 	queryInterface( const com::sun::star::uno::Type & rType )
227*cdf0e10cSrcweir 		throw( com::sun::star::uno::RuntimeException );
228*cdf0e10cSrcweir 
229*cdf0e10cSrcweir 	//-----------------------------------------------------------------
230*cdf0e10cSrcweir 	// XComponent
231*cdf0e10cSrcweir 	//-----------------------------------------------------------------
232*cdf0e10cSrcweir 	virtual void SAL_CALL
233*cdf0e10cSrcweir 	dispose() throw( com::sun::star::uno::RuntimeException );
234*cdf0e10cSrcweir 
235*cdf0e10cSrcweir     virtual void SAL_CALL
236*cdf0e10cSrcweir 	addEventListener( const com::sun::star::uno::Reference<
237*cdf0e10cSrcweir 		com::sun::star::lang::XEventListener >& Listener )
238*cdf0e10cSrcweir 			throw( com::sun::star::uno::RuntimeException );
239*cdf0e10cSrcweir 
240*cdf0e10cSrcweir     virtual void SAL_CALL
241*cdf0e10cSrcweir 	removeEventListener( const com::sun::star::uno::Reference<
242*cdf0e10cSrcweir 		com::sun::star::lang::XEventListener >& Listener )
243*cdf0e10cSrcweir 			throw( com::sun::star::uno::RuntimeException );
244*cdf0e10cSrcweir 
245*cdf0e10cSrcweir 	//-----------------------------------------------------------------
246*cdf0e10cSrcweir 	//XCloseable
247*cdf0e10cSrcweir 	//-----------------------------------------------------------------
248*cdf0e10cSrcweir 	virtual void SAL_CALL
249*cdf0e10cSrcweir 	close()
250*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
251*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
252*cdf0e10cSrcweir 
253*cdf0e10cSrcweir 	//-----------------------------------------------------------------
254*cdf0e10cSrcweir 	//XResultSetMetaDataSupplier
255*cdf0e10cSrcweir 	//-----------------------------------------------------------------
256*cdf0e10cSrcweir 	virtual com::sun::star::uno::Reference<
257*cdf0e10cSrcweir 				com::sun::star::sdbc::XResultSetMetaData > SAL_CALL
258*cdf0e10cSrcweir 	getMetaData()
259*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
260*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
261*cdf0e10cSrcweir 
262*cdf0e10cSrcweir 	//-----------------------------------------------------------------
263*cdf0e10cSrcweir 	// XPropertySet
264*cdf0e10cSrcweir 	//-----------------------------------------------------------------
265*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
266*cdf0e10cSrcweir 				com::sun::star::beans::XPropertySetInfo > SAL_CALL
267*cdf0e10cSrcweir 	getPropertySetInfo()
268*cdf0e10cSrcweir 		throw( com::sun::star::uno::RuntimeException );
269*cdf0e10cSrcweir 
270*cdf0e10cSrcweir     virtual void SAL_CALL
271*cdf0e10cSrcweir 	setPropertyValue( const rtl::OUString& aPropertyName,
272*cdf0e10cSrcweir 					  const com::sun::star::uno::Any& aValue )
273*cdf0e10cSrcweir 		throw( com::sun::star::beans::UnknownPropertyException,
274*cdf0e10cSrcweir 			   com::sun::star::beans::PropertyVetoException,
275*cdf0e10cSrcweir 			   com::sun::star::lang::IllegalArgumentException,
276*cdf0e10cSrcweir 			   com::sun::star::lang::WrappedTargetException,
277*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
278*cdf0e10cSrcweir 
279*cdf0e10cSrcweir     virtual com::sun::star::uno::Any SAL_CALL
280*cdf0e10cSrcweir 	getPropertyValue( const rtl::OUString& PropertyName )
281*cdf0e10cSrcweir 		throw( com::sun::star::beans::UnknownPropertyException,
282*cdf0e10cSrcweir 		com::sun::star::lang::WrappedTargetException,
283*cdf0e10cSrcweir 		com::sun::star::uno::RuntimeException );
284*cdf0e10cSrcweir 
285*cdf0e10cSrcweir     virtual void SAL_CALL
286*cdf0e10cSrcweir 	addPropertyChangeListener( const rtl::OUString& aPropertyName,
287*cdf0e10cSrcweir 							   const com::sun::star::uno::Reference<
288*cdf0e10cSrcweir 							   		com::sun::star::beans::XPropertyChangeListener >& xListener )
289*cdf0e10cSrcweir 		throw( com::sun::star::beans::UnknownPropertyException,
290*cdf0e10cSrcweir 			   com::sun::star::lang::WrappedTargetException,
291*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
292*cdf0e10cSrcweir 
293*cdf0e10cSrcweir     virtual void SAL_CALL
294*cdf0e10cSrcweir 	removePropertyChangeListener( const rtl::OUString& aPropertyName,
295*cdf0e10cSrcweir 								  const com::sun::star::uno::Reference<
296*cdf0e10cSrcweir 								  	com::sun::star::beans::XPropertyChangeListener >& aListener )
297*cdf0e10cSrcweir 		throw( com::sun::star::beans::UnknownPropertyException,
298*cdf0e10cSrcweir 			   com::sun::star::lang::WrappedTargetException,
299*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
300*cdf0e10cSrcweir 
301*cdf0e10cSrcweir     virtual void SAL_CALL
302*cdf0e10cSrcweir 	addVetoableChangeListener( const rtl::OUString& PropertyName,
303*cdf0e10cSrcweir 							   const com::sun::star::uno::Reference<
304*cdf0e10cSrcweir 							   		com::sun::star::beans::XVetoableChangeListener >& aListener )
305*cdf0e10cSrcweir 		throw( com::sun::star::beans::UnknownPropertyException,
306*cdf0e10cSrcweir 			   com::sun::star::lang::WrappedTargetException,
307*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
308*cdf0e10cSrcweir 
309*cdf0e10cSrcweir     virtual void SAL_CALL
310*cdf0e10cSrcweir 	removeVetoableChangeListener( const rtl::OUString& PropertyName,
311*cdf0e10cSrcweir 								  const com::sun::star::uno::Reference<
312*cdf0e10cSrcweir 								  	com::sun::star::beans::XVetoableChangeListener >& aListener )
313*cdf0e10cSrcweir 		throw( com::sun::star::beans::UnknownPropertyException,
314*cdf0e10cSrcweir 			   com::sun::star::lang::WrappedTargetException,
315*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
316*cdf0e10cSrcweir 
317*cdf0e10cSrcweir 	//-----------------------------------------------------------------
318*cdf0e10cSrcweir 	// own methods
319*cdf0e10cSrcweir 	//-----------------------------------------------------------------
320*cdf0e10cSrcweir 	virtual void SAL_CALL
321*cdf0e10cSrcweir 		impl_disposing( const com::sun::star::lang::EventObject& Source )
322*cdf0e10cSrcweir 		throw( com::sun::star::uno::RuntimeException );
323*cdf0e10cSrcweir 
324*cdf0e10cSrcweir 	virtual void SAL_CALL
325*cdf0e10cSrcweir 	impl_propertyChange( const com::sun::star::beans::PropertyChangeEvent& evt )
326*cdf0e10cSrcweir 		throw( com::sun::star::uno::RuntimeException );
327*cdf0e10cSrcweir 
328*cdf0e10cSrcweir 	virtual void SAL_CALL
329*cdf0e10cSrcweir 	impl_vetoableChange( const com::sun::star::beans::PropertyChangeEvent& aEvent )
330*cdf0e10cSrcweir 		throw( com::sun::star::beans::PropertyVetoException,
331*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
332*cdf0e10cSrcweir 
333*cdf0e10cSrcweir 	//-----------------------------------------------------------------
334*cdf0e10cSrcweir 	// XContentAccess
335*cdf0e10cSrcweir 	//-----------------------------------------------------------------
336*cdf0e10cSrcweir     virtual rtl::OUString SAL_CALL
337*cdf0e10cSrcweir 	queryContentIdentifierString()
338*cdf0e10cSrcweir 		throw( com::sun::star::uno::RuntimeException );
339*cdf0e10cSrcweir 
340*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
341*cdf0e10cSrcweir 				com::sun::star::ucb::XContentIdentifier > SAL_CALL
342*cdf0e10cSrcweir 	queryContentIdentifier()
343*cdf0e10cSrcweir 		throw( com::sun::star::uno::RuntimeException );
344*cdf0e10cSrcweir 
345*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
346*cdf0e10cSrcweir 				com::sun::star::ucb::XContent > SAL_CALL
347*cdf0e10cSrcweir 	queryContent()
348*cdf0e10cSrcweir 		throw( com::sun::star::uno::RuntimeException );
349*cdf0e10cSrcweir 
350*cdf0e10cSrcweir 	//-----------------------------------------------------------------
351*cdf0e10cSrcweir 	// XResultSet
352*cdf0e10cSrcweir 	//-----------------------------------------------------------------
353*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
354*cdf0e10cSrcweir 	next()
355*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
356*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
357*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
358*cdf0e10cSrcweir 	isBeforeFirst()
359*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
360*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
361*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
362*cdf0e10cSrcweir 	isAfterLast()
363*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
364*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
365*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
366*cdf0e10cSrcweir 	isFirst()
367*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
368*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
369*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
370*cdf0e10cSrcweir 	isLast()
371*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
372*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
373*cdf0e10cSrcweir     virtual void SAL_CALL
374*cdf0e10cSrcweir 	beforeFirst()
375*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
376*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
377*cdf0e10cSrcweir     virtual void SAL_CALL
378*cdf0e10cSrcweir 	afterLast()
379*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
380*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
381*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
382*cdf0e10cSrcweir 	first()
383*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
384*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
385*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
386*cdf0e10cSrcweir 	last()
387*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
388*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
389*cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL
390*cdf0e10cSrcweir 	getRow()
391*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
392*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
393*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
394*cdf0e10cSrcweir 	absolute( sal_Int32 row )
395*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
396*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
397*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
398*cdf0e10cSrcweir 	relative( sal_Int32 rows )
399*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
400*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
401*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
402*cdf0e10cSrcweir 	previous()
403*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
404*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
405*cdf0e10cSrcweir     virtual void SAL_CALL
406*cdf0e10cSrcweir 	refreshRow()
407*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
408*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
409*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
410*cdf0e10cSrcweir 	rowUpdated()
411*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
412*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
413*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
414*cdf0e10cSrcweir 	rowInserted()
415*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
416*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
417*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
418*cdf0e10cSrcweir 	rowDeleted()
419*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
420*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
421*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
422*cdf0e10cSrcweir 				com::sun::star::uno::XInterface > SAL_CALL
423*cdf0e10cSrcweir 	getStatement()
424*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
425*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
426*cdf0e10cSrcweir 
427*cdf0e10cSrcweir 	//-----------------------------------------------------------------
428*cdf0e10cSrcweir 	// XRow
429*cdf0e10cSrcweir 	//-----------------------------------------------------------------
430*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
431*cdf0e10cSrcweir 	wasNull()
432*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
433*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
434*cdf0e10cSrcweir 
435*cdf0e10cSrcweir     virtual rtl::OUString SAL_CALL
436*cdf0e10cSrcweir 	getString( sal_Int32 columnIndex )
437*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
438*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
439*cdf0e10cSrcweir 
440*cdf0e10cSrcweir     virtual sal_Bool SAL_CALL
441*cdf0e10cSrcweir 	getBoolean( sal_Int32 columnIndex )
442*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
443*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
444*cdf0e10cSrcweir 
445*cdf0e10cSrcweir     virtual sal_Int8 SAL_CALL
446*cdf0e10cSrcweir 	getByte( sal_Int32 columnIndex )
447*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
448*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
449*cdf0e10cSrcweir 
450*cdf0e10cSrcweir     virtual sal_Int16 SAL_CALL
451*cdf0e10cSrcweir 	getShort( sal_Int32 columnIndex )
452*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
453*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
454*cdf0e10cSrcweir 
455*cdf0e10cSrcweir     virtual sal_Int32 SAL_CALL
456*cdf0e10cSrcweir 	getInt( sal_Int32 columnIndex )
457*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
458*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
459*cdf0e10cSrcweir 
460*cdf0e10cSrcweir     virtual sal_Int64 SAL_CALL
461*cdf0e10cSrcweir 	getLong( sal_Int32 columnIndex )
462*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
463*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
464*cdf0e10cSrcweir 
465*cdf0e10cSrcweir     virtual float SAL_CALL
466*cdf0e10cSrcweir 	getFloat( sal_Int32 columnIndex )
467*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
468*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
469*cdf0e10cSrcweir 
470*cdf0e10cSrcweir     virtual double SAL_CALL
471*cdf0e10cSrcweir 	getDouble( sal_Int32 columnIndex )
472*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
473*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
474*cdf0e10cSrcweir 
475*cdf0e10cSrcweir     virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
476*cdf0e10cSrcweir 	getBytes( sal_Int32 columnIndex )
477*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
478*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
479*cdf0e10cSrcweir 
480*cdf0e10cSrcweir     virtual com::sun::star::util::Date SAL_CALL
481*cdf0e10cSrcweir 	getDate( sal_Int32 columnIndex )
482*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
483*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
484*cdf0e10cSrcweir 
485*cdf0e10cSrcweir     virtual com::sun::star::util::Time SAL_CALL
486*cdf0e10cSrcweir 	getTime( sal_Int32 columnIndex )
487*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
488*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
489*cdf0e10cSrcweir 
490*cdf0e10cSrcweir     virtual com::sun::star::util::DateTime SAL_CALL
491*cdf0e10cSrcweir 	getTimestamp( sal_Int32 columnIndex )
492*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
493*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
494*cdf0e10cSrcweir 
495*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
496*cdf0e10cSrcweir 				com::sun::star::io::XInputStream > SAL_CALL
497*cdf0e10cSrcweir 	getBinaryStream( sal_Int32 columnIndex )
498*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
499*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
500*cdf0e10cSrcweir 
501*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
502*cdf0e10cSrcweir 				com::sun::star::io::XInputStream > SAL_CALL
503*cdf0e10cSrcweir 	getCharacterStream( sal_Int32 columnIndex )
504*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
505*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
506*cdf0e10cSrcweir 
507*cdf0e10cSrcweir     virtual com::sun::star::uno::Any SAL_CALL
508*cdf0e10cSrcweir 	getObject( sal_Int32 columnIndex,
509*cdf0e10cSrcweir 			   const com::sun::star::uno::Reference<
510*cdf0e10cSrcweir 			   	com::sun::star::container::XNameAccess >& typeMap )
511*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
512*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
513*cdf0e10cSrcweir 
514*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
515*cdf0e10cSrcweir 				com::sun::star::sdbc::XRef > SAL_CALL
516*cdf0e10cSrcweir 	getRef( sal_Int32 columnIndex )
517*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
518*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
519*cdf0e10cSrcweir 
520*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
521*cdf0e10cSrcweir 				com::sun::star::sdbc::XBlob > SAL_CALL
522*cdf0e10cSrcweir 	getBlob( sal_Int32 columnIndex )
523*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
524*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
525*cdf0e10cSrcweir 
526*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
527*cdf0e10cSrcweir 				com::sun::star::sdbc::XClob > SAL_CALL
528*cdf0e10cSrcweir 	getClob( sal_Int32 columnIndex )
529*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
530*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
531*cdf0e10cSrcweir 
532*cdf0e10cSrcweir     virtual com::sun::star::uno::Reference<
533*cdf0e10cSrcweir 				com::sun::star::sdbc::XArray > SAL_CALL
534*cdf0e10cSrcweir 	getArray( sal_Int32 columnIndex )
535*cdf0e10cSrcweir 		throw( com::sun::star::sdbc::SQLException,
536*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
537*cdf0e10cSrcweir };
538*cdf0e10cSrcweir 
539*cdf0e10cSrcweir //=========================================================================
540*cdf0e10cSrcweir 
541*cdf0e10cSrcweir class ContentResultSetWrapperListener
542*cdf0e10cSrcweir 		: public cppu::OWeakObject
543*cdf0e10cSrcweir 		, public com::sun::star::beans::XPropertyChangeListener
544*cdf0e10cSrcweir 		, public com::sun::star::beans::XVetoableChangeListener
545*cdf0e10cSrcweir {
546*cdf0e10cSrcweir protected:
547*cdf0e10cSrcweir 	ContentResultSetWrapper*	m_pOwner;
548*cdf0e10cSrcweir 
549*cdf0e10cSrcweir public:
550*cdf0e10cSrcweir 	ContentResultSetWrapperListener( ContentResultSetWrapper* pOwner );
551*cdf0e10cSrcweir 
552*cdf0e10cSrcweir 	virtual ~ContentResultSetWrapperListener();
553*cdf0e10cSrcweir 
554*cdf0e10cSrcweir 	//-----------------------------------------------------------------
555*cdf0e10cSrcweir 	// XInterface
556*cdf0e10cSrcweir 	//-----------------------------------------------------------------
557*cdf0e10cSrcweir 	XINTERFACE_DECL()
558*cdf0e10cSrcweir 
559*cdf0e10cSrcweir 	//-----------------------------------------------------------------
560*cdf0e10cSrcweir 	//XEventListener
561*cdf0e10cSrcweir 	//-----------------------------------------------------------------
562*cdf0e10cSrcweir 	virtual void SAL_CALL
563*cdf0e10cSrcweir 		disposing( const com::sun::star::lang::EventObject& Source )
564*cdf0e10cSrcweir 		throw( com::sun::star::uno::RuntimeException );
565*cdf0e10cSrcweir 
566*cdf0e10cSrcweir 	//-----------------------------------------------------------------
567*cdf0e10cSrcweir 	//XPropertyChangeListener
568*cdf0e10cSrcweir 	//-----------------------------------------------------------------
569*cdf0e10cSrcweir 	virtual void SAL_CALL
570*cdf0e10cSrcweir 	propertyChange( const com::sun::star::beans::PropertyChangeEvent& evt )
571*cdf0e10cSrcweir 		throw( com::sun::star::uno::RuntimeException );
572*cdf0e10cSrcweir 
573*cdf0e10cSrcweir 	//-----------------------------------------------------------------
574*cdf0e10cSrcweir 	//XVetoableChangeListener
575*cdf0e10cSrcweir 	//-----------------------------------------------------------------
576*cdf0e10cSrcweir 	virtual void SAL_CALL
577*cdf0e10cSrcweir 	vetoableChange( const com::sun::star::beans::PropertyChangeEvent& aEvent )
578*cdf0e10cSrcweir 		throw( com::sun::star::beans::PropertyVetoException,
579*cdf0e10cSrcweir 			   com::sun::star::uno::RuntimeException );
580*cdf0e10cSrcweir 
581*cdf0e10cSrcweir 	//-----------------------------------------------------------------
582*cdf0e10cSrcweir 	// own methods:
583*cdf0e10cSrcweir 	void SAL_CALL impl_OwnerDies();
584*cdf0e10cSrcweir };
585*cdf0e10cSrcweir 
586*cdf0e10cSrcweir #endif
587*cdf0e10cSrcweir 
588