1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 #ifndef CMIS_DATASUPPLIER_HXX
11 #define CMIS_DATASUPPLIER_HXX
15 #include <ucbhelper/resultset.hxx>
17 #include "cmis_content.hxx"
24 struct ResultListEntry
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
)
41 typedef std::vector
< ResultListEntry
* > ResultList
;
43 class DataSupplier
: public ucbhelper::ResultSetDataSupplier
46 com::sun::star::uno::Reference
< ::cmis::Content
> mxContent
;
47 com::sun::star::uno::Reference
< com::sun::star::lang::XMultiServiceFactory
> m_xSMgr
;
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
);
76 virtual void validate()
77 throw( com::sun::star::ucb::ResultSetException
);
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */