fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / ucb / source / ucp / gio / gio_datasupplier.hxx
blobc610ed1996c1c07cce687bcb011a1a12adf5825c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef INCLUDED_UCB_SOURCE_UCP_GIO_GIO_DATASUPPLIER_HXX
21 #define INCLUDED_UCB_SOURCE_UCP_GIO_GIO_DATASUPPLIER_HXX
23 #include <ucbhelper/resultset.hxx>
24 #include "gio_content.hxx"
25 #include <vector>
27 namespace gio
30 class Content;
32 struct ResultListEntry
34 OUString aId;
35 com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier > xId;
36 com::sun::star::uno::Reference< com::sun::star::ucb::XContent > xContent;
37 com::sun::star::uno::Reference< com::sun::star::sdbc::XRow > xRow;
38 GFileInfo *pInfo;
40 ResultListEntry( GFileInfo *pInInfo ) : pInfo(pInInfo)
42 g_object_ref( pInfo );
45 ~ResultListEntry()
47 g_object_unref( pInfo );
51 typedef std::vector< ResultListEntry* > ResultList;
53 class DataSupplier : public ucbhelper::ResultSetDataSupplier
55 private:
56 com::sun::star::uno::Reference< ::gio::Content > mxContent;
57 com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
58 sal_Int32 mnOpenMode;
59 bool mbCountFinal;
60 bool getData();
61 ResultList maResults;
62 public:
63 DataSupplier( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
64 const com::sun::star::uno::Reference< Content >& rContent, sal_Int32 nOpenMode );
65 virtual ~DataSupplier();
67 virtual OUString queryContentIdentifierString( sal_uInt32 nIndex ) SAL_OVERRIDE;
68 virtual com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier >
69 queryContentIdentifier( sal_uInt32 nIndex ) SAL_OVERRIDE;
70 virtual com::sun::star::uno::Reference< com::sun::star::ucb::XContent >
71 queryContent( sal_uInt32 nIndex ) SAL_OVERRIDE;
73 virtual bool getResult( sal_uInt32 nIndex ) SAL_OVERRIDE;
75 virtual sal_uInt32 totalCount() SAL_OVERRIDE;
76 virtual sal_uInt32 currentCount() SAL_OVERRIDE;
77 virtual bool isCountFinal() SAL_OVERRIDE;
79 virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XRow >
80 queryPropertyValues( sal_uInt32 nIndex ) SAL_OVERRIDE;
81 virtual void releasePropertyValues( sal_uInt32 nIndex ) SAL_OVERRIDE;
83 virtual void close() SAL_OVERRIDE;
85 virtual void validate()
86 throw( com::sun::star::ucb::ResultSetException ) SAL_OVERRIDE;
91 #endif
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */