1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef DBA_DATASUPPLIER_HXX 29 #define DBA_DATASUPPLIER_HXX 30 31 #ifndef _RTL_REF_HXX_ 32 #include <rtl/ref.hxx> 33 #endif 34 #ifndef _UCBHELPER_RESULTSET_HXX 35 #include <ucbhelper/resultset.hxx> 36 #endif 37 #ifndef _DBA_COREDATAACCESS_DOCUMENTCONTAINER_HXX_ 38 #include "documentcontainer.hxx" 39 #endif 40 #include <memory> 41 42 namespace dbaccess { 43 44 struct DataSupplier_Impl; 45 class OContentHelper; 46 47 class DataSupplier : public ucbhelper::ResultSetDataSupplier 48 { 49 ::std::auto_ptr<DataSupplier_Impl> m_pImpl; 50 51 public: 52 DataSupplier( const com::sun::star::uno::Reference< 53 com::sun::star::lang::XMultiServiceFactory >& rxSMgr, 54 const rtl::Reference< ODocumentContainer >& rxContent, 55 sal_Int32 nOpenMode ); 56 virtual ~DataSupplier(); 57 58 virtual rtl::OUString queryContentIdentifierString( sal_uInt32 nIndex ); 59 virtual com::sun::star::uno::Reference< 60 com::sun::star::ucb::XContentIdentifier > 61 queryContentIdentifier( sal_uInt32 nIndex ); 62 virtual com::sun::star::uno::Reference< com::sun::star::ucb::XContent > 63 queryContent( sal_uInt32 nIndex ); 64 65 virtual sal_Bool getResult( sal_uInt32 nIndex ); 66 67 virtual sal_uInt32 totalCount(); 68 virtual sal_uInt32 currentCount(); 69 virtual sal_Bool isCountFinal(); 70 71 virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XRow > 72 queryPropertyValues( sal_uInt32 nIndex ); 73 virtual void releasePropertyValues( sal_uInt32 nIndex ); 74 75 virtual void close(); 76 77 virtual void validate() 78 throw( com::sun::star::ucb::ResultSetException ); 79 }; 80 81 } 82 83 #endif // DBA_DATASUPPLIER_HXX 84