Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*
3 : : * This file is part of the LibreOffice project.
4 : : *
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 : : *
9 : : * This file incorporates work covered by the following license notice:
10 : : *
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 .
18 : : */
19 : : #ifndef _GVFS_UCP_RESULTSET_HXX
20 : : #define _GVFS_UCP_RESULTSET_HXX
21 : :
22 : : #include <rtl/ref.hxx>
23 : : #include <ucbhelper/resultset.hxx>
24 : : #include <ucbhelper/resultsethelper.hxx>
25 : : #include "gvfs_content.hxx"
26 : :
27 : : namespace gvfs {
28 : :
29 : 0 : class DynamicResultSet : public ::ucbhelper::ResultSetImplHelper
30 : : {
31 : : rtl::Reference< Content > m_xContent;
32 : : com::sun::star::uno::Reference<
33 : : com::sun::star::ucb::XCommandEnvironment > m_xEnv;
34 : :
35 : : private:
36 : : virtual void initStatic();
37 : : virtual void initDynamic();
38 : :
39 : : public:
40 : : DynamicResultSet( const com::sun::star::uno::Reference<
41 : : com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
42 : : const rtl::Reference< Content >& rxContent,
43 : : const com::sun::star::ucb::OpenCommandArgument2& rCommand,
44 : : const com::sun::star::uno::Reference<
45 : : com::sun::star::ucb::XCommandEnvironment >& rxEnv );
46 : : };
47 : :
48 : :
49 : : struct DataSupplier_Impl;
50 : : class DataSupplier : public ucbhelper::ResultSetDataSupplier
51 : : {
52 : : private:
53 : : gvfs::DataSupplier_Impl *m_pImpl;
54 : : sal_Bool getData();
55 : :
56 : : public:
57 : : DataSupplier( const com::sun::star::uno::Reference<
58 : : com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
59 : : const rtl::Reference< Content >& rContent,
60 : : sal_Int32 nOpenMode);
61 : :
62 : : virtual ~DataSupplier();
63 : :
64 : : virtual rtl::OUString queryContentIdentifierString( sal_uInt32 nIndex );
65 : : virtual com::sun::star::uno::Reference<
66 : : com::sun::star::ucb::XContentIdentifier >
67 : : queryContentIdentifier( sal_uInt32 nIndex );
68 : : virtual com::sun::star::uno::Reference< com::sun::star::ucb::XContent >
69 : : queryContent( sal_uInt32 nIndex );
70 : :
71 : : virtual sal_Bool getResult( sal_uInt32 nIndex );
72 : :
73 : : virtual sal_uInt32 totalCount();
74 : : virtual sal_uInt32 currentCount();
75 : : virtual sal_Bool isCountFinal();
76 : :
77 : : virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XRow >
78 : : queryPropertyValues( sal_uInt32 nIndex );
79 : : virtual void releasePropertyValues( sal_uInt32 nIndex );
80 : : virtual void close();
81 : : virtual void validate()
82 : : throw( com::sun::star::ucb::ResultSetException );
83 : : };
84 : :
85 : : }
86 : :
87 : : #endif
88 : :
89 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|