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::uno::XComponentContext >& rxContext,
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 rtl::Reference< Content >& rContent,
58 : sal_Int32 nOpenMode);
59 :
60 : virtual ~DataSupplier();
61 :
62 : virtual rtl::OUString queryContentIdentifierString( sal_uInt32 nIndex );
63 : virtual com::sun::star::uno::Reference<
64 : com::sun::star::ucb::XContentIdentifier >
65 : queryContentIdentifier( sal_uInt32 nIndex );
66 : virtual com::sun::star::uno::Reference< com::sun::star::ucb::XContent >
67 : queryContent( sal_uInt32 nIndex );
68 :
69 : virtual sal_Bool getResult( sal_uInt32 nIndex );
70 :
71 : virtual sal_uInt32 totalCount();
72 : virtual sal_uInt32 currentCount();
73 : virtual sal_Bool isCountFinal();
74 :
75 : virtual com::sun::star::uno::Reference< com::sun::star::sdbc::XRow >
76 : queryPropertyValues( sal_uInt32 nIndex );
77 : virtual void releasePropertyValues( sal_uInt32 nIndex );
78 : virtual void close();
79 : virtual void validate()
80 : throw( com::sun::star::ucb::ResultSetException );
81 : };
82 :
83 : }
84 :
85 : #endif
86 :
87 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|