LibreOffice Module ucb (master) 1
cmis_repo_content.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
10#pragma once
11
12#include "cmis_url.hxx"
13#include "children_provider.hxx"
14
15#include <com/sun/star/io/XInputStream.hpp>
16#include <com/sun/star/io/XOutputStream.hpp>
17#include <com/sun/star/ucb/ContentCreationException.hpp>
18#include <com/sun/star/ucb/OpenCommandArgument2.hpp>
19#include <com/sun/star/ucb/TransferInfo.hpp>
20#include <com/sun/star/ucb/XContentCreator.hpp>
22#include <libcmis/libcmis.hxx>
23
24#include <vector>
25#include <list>
26
27namespace com::sun::star {
28 namespace beans {
29 struct Property;
30 struct PropertyValue;
31 }
32 namespace sdbc {
33 class XRow;
34 }
35}
36namespace ucbhelper
37{
38 class Content;
39}
40
41
42namespace cmis
43{
44inline constexpr OUStringLiteral CMIS_REPO_TYPE = u"application/vnd.libreoffice.cmis-repository";
45
46class ContentProvider;
48 public ChildrenProvider
49{
50private:
54
55 std::vector< libcmis::RepositoryPtr > m_aRepositories;
56
57private:
58
59 css::uno::Any getBadArgExcept();
60
61 css::uno::Reference< css::sdbc::XRow >
63 const css::uno::Sequence< css::beans::Property >& rProperties,
64 const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
65
66 /*
67 * Call me to ensure the repositories have been fetched
68 */
69 void getRepositories( const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
70
71 libcmis::RepositoryPtr getRepository( const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
72
73public:
75 RepoContent( const css::uno::Reference<
76 css::uno::XComponentContext >& rxContext, ContentProvider *pProvider,
77 const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier,
78 std::vector< libcmis::RepositoryPtr > && aRepos = std::vector< libcmis::RepositoryPtr > ( ) );
79
80 virtual ~RepoContent() override;
81
82 virtual css::uno::Sequence< css::beans::Property >
83 getProperties( const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) override;
84
85 virtual css::uno::Sequence< css::ucb::CommandInfo >
86 getCommands( const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) override;
87
88 virtual OUString getParentURL() override;
89
90 // XInterface
91
92 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
93 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
94
95 virtual OUString SAL_CALL
96 getImplementationName() override;
97
98 virtual css::uno::Sequence< OUString > SAL_CALL
99 getSupportedServiceNames() override;
100
101 virtual OUString SAL_CALL
102 getContentType() override;
103
104 virtual css::uno::Any SAL_CALL
105 execute( const css::ucb::Command& aCommand,
106 sal_Int32 CommandId,
107 const css::uno::Reference< css::ucb::XCommandEnvironment >& Environment ) override;
108
109 virtual void SAL_CALL abort( sal_Int32 CommandId ) override;
110
111 virtual std::vector< css::uno::Reference< css::ucb::XContent > > getChildren( ) override;
112};
113
114}
115
116/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual css::uno::Sequence< css::beans::Property > getProperties(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) override
virtual std::vector< css::uno::Reference< css::ucb::XContent > > getChildren() override
css::uno::Reference< css::sdbc::XRow > getPropertyValues(const css::uno::Sequence< css::beans::Property > &rProperties, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
RepoContent(const css::uno::Reference< css::uno::XComponentContext > &rxContext, ContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier, std::vector< libcmis::RepositoryPtr > &&aRepos=std::vector< libcmis::RepositoryPtr >())
virtual css::uno::Any SAL_CALL execute(const css::ucb::Command &aCommand, sal_Int32 CommandId, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment) override
virtual OUString SAL_CALL getImplementationName() override
ContentProvider * m_pProvider
virtual css::uno::Sequence< css::ucb::CommandInfo > getCommands(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) override
std::vector< libcmis::RepositoryPtr > m_aRepositories
void getRepositories(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
css::uno::Any getBadArgExcept()
virtual void SAL_CALL abort(sal_Int32 CommandId) override
virtual ~RepoContent() override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
libcmis::RepositoryPtr getRepository(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
virtual OUString getParentURL() override
virtual OUString SAL_CALL getContentType() override
float u
constexpr OUStringLiteral CMIS_REPO_TYPE