LibreOffice Module ucb (master) 1
gio_datasupplier.hxx
Go to the documentation of this file.
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
20#pragma once
21
23#include "gio_content.hxx"
24#include <memory>
25#include <vector>
26
27namespace gio
28{
29
30class Content;
31
33{
34 OUString aId;
35 css::uno::Reference< css::ucb::XContentIdentifier > xId;
36 css::uno::Reference< css::ucb::XContent > xContent;
37 css::uno::Reference< css::sdbc::XRow > xRow;
38 GFileInfo *pInfo;
39
40 explicit ResultListEntry( GFileInfo *pInInfo ) : pInfo(pInInfo)
41 {
42 g_object_ref( pInfo );
43 }
44
46 {
47 g_object_unref( pInfo );
48 }
49};
50
51typedef std::vector< std::unique_ptr<ResultListEntry> > ResultList;
52
54{
55private:
57 sal_Int32 mnOpenMode;
59 bool getData();
61public:
62 DataSupplier( rtl::Reference< Content > xContent, sal_Int32 nOpenMode );
63 virtual ~DataSupplier() override;
64
65 virtual OUString queryContentIdentifierString( sal_uInt32 nIndex ) override;
66 virtual css::uno::Reference< css::ucb::XContentIdentifier >
67 queryContentIdentifier( sal_uInt32 nIndex ) override;
68 virtual css::uno::Reference< css::ucb::XContent >
69 queryContent( sal_uInt32 nIndex ) override;
70
71 virtual bool getResult( sal_uInt32 nIndex ) override;
72
73 virtual sal_uInt32 totalCount() override;
74 virtual sal_uInt32 currentCount() override;
75 virtual bool isCountFinal() override;
76
77 virtual css::uno::Reference< css::sdbc::XRow >
78 queryPropertyValues( sal_uInt32 nIndex ) override;
79 virtual void releasePropertyValues( sal_uInt32 nIndex ) override;
80
81 virtual void close() override;
82
83 virtual void validate() override;
84};
85
86}
87
88/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual sal_uInt32 totalCount() override
virtual void releasePropertyValues(sal_uInt32 nIndex) override
virtual css::uno::Reference< css::sdbc::XRow > queryPropertyValues(sal_uInt32 nIndex) override
virtual OUString queryContentIdentifierString(sal_uInt32 nIndex) override
virtual bool isCountFinal() override
DataSupplier(rtl::Reference< Content > xContent, sal_Int32 nOpenMode)
virtual css::uno::Reference< css::ucb::XContentIdentifier > queryContentIdentifier(sal_uInt32 nIndex) override
virtual ~DataSupplier() override
virtual bool getResult(sal_uInt32 nIndex) override
virtual sal_uInt32 currentCount() override
rtl::Reference< ::gio::Content > mxContent
virtual css::uno::Reference< css::ucb::XContent > queryContent(sal_uInt32 nIndex) override
virtual void validate() override
virtual void close() override
std::vector< std::unique_ptr< ResultListEntry > > ResultList
css::uno::Reference< css::ucb::XContentIdentifier > xId
ResultListEntry(GFileInfo *pInInfo)
css::uno::Reference< css::sdbc::XRow > xRow
css::uno::Reference< css::ucb::XContent > xContent