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 _PKGDATASUPPLIER_HXX
29 #define _PKGDATASUPPLIER_HXX
30 
31 #include <rtl/ref.hxx>
32 #include <ucbhelper/resultset.hxx>
33 
34 namespace package_ucp {
35 
36 struct DataSupplier_Impl;
37 class Content;
38 
39 class DataSupplier : public ::ucbhelper::ResultSetDataSupplier
40 {
41 	DataSupplier_Impl* m_pImpl;
42 
43 public:
44 	DataSupplier( const com::sun::star::uno::Reference<
45 				  	com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
46                   const rtl::Reference< Content >& rContent,
47 				  sal_Int32 nOpenMode );
48 	virtual ~DataSupplier();
49 
50 	virtual rtl::OUString queryContentIdentifierString( sal_uInt32 nIndex );
51 	virtual com::sun::star::uno::Reference<
52 				com::sun::star::ucb::XContentIdentifier >
53 	queryContentIdentifier( sal_uInt32 nIndex );
54 	virtual com::sun::star::uno::Reference< com::sun::star::ucb::XContent >
55 	queryContent( sal_uInt32 nIndex );
56 
57 	virtual sal_Bool getResult( sal_uInt32 nIndex );
58 
59 	virtual sal_uInt32 totalCount();
60 	virtual sal_uInt32 currentCount();
61 	virtual sal_Bool isCountFinal();
62 
63 	virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XRow >
64 	queryPropertyValues( sal_uInt32 nIndex  );
65 	virtual void releasePropertyValues( sal_uInt32 nIndex );
66 
67 	virtual void close();
68 
69 	virtual void validate()
70 		throw( com::sun::star::ucb::ResultSetException );
71 
72 	::rtl::OUString assembleChildURL( const ::rtl::OUString& aName );
73 };
74 
75 }
76 
77 #endif
78