Bump for 3.6-28
[LibreOffice.git] / ucb / source / ucp / cmis / cmis_datasupplier.hxx
blob14ad404c90f0fe3944ca6ebc02c0ac04640bd95d
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * Copyright 2012 LibreOffice contributors.
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/.
8 */
10 #ifndef CMIS_DATASUPPLIER_HXX
11 #define CMIS_DATASUPPLIER_HXX
13 #include <vector>
15 #include <ucbhelper/resultset.hxx>
17 #include "cmis_content.hxx"
19 namespace cmis
22 class Content;
24 struct ResultListEntry
26 ::rtl::OUString aId;
27 com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier > xId;
28 com::sun::star::uno::Reference< com::sun::star::ucb::XContent > xContent;
29 com::sun::star::uno::Reference< com::sun::star::sdbc::XRow > xRow;
30 libcmis::ObjectPtr pObject;
32 ResultListEntry( libcmis::ObjectPtr pObj ) : pObject( pObj )
36 ~ResultListEntry()
41 typedef std::vector< ResultListEntry* > ResultList;
43 class DataSupplier : public ucbhelper::ResultSetDataSupplier
45 private:
46 com::sun::star::uno::Reference< ::cmis::Content > mxContent;
47 com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
48 sal_Int32 mnOpenMode;
49 bool mbCountFinal;
50 bool getData();
51 ResultList maResults;
53 public:
54 DataSupplier( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
55 const com::sun::star::uno::Reference< Content >& rContent, sal_Int32 nOpenMode );
56 virtual ~DataSupplier();
58 virtual rtl::OUString queryContentIdentifierString( sal_uInt32 nIndex );
59 virtual com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier >
60 queryContentIdentifier( sal_uInt32 nIndex );
61 virtual com::sun::star::uno::Reference< com::sun::star::ucb::XContent >
62 queryContent( sal_uInt32 nIndex );
64 virtual sal_Bool getResult( sal_uInt32 nIndex );
66 virtual sal_uInt32 totalCount();
67 virtual sal_uInt32 currentCount();
68 virtual sal_Bool isCountFinal();
70 virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XRow >
71 queryPropertyValues( sal_uInt32 nIndex );
72 virtual void releasePropertyValues( sal_uInt32 nIndex );
74 virtual void close();
76 virtual void validate()
77 throw( com::sun::star::ucb::ResultSetException );
82 #endif
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */