bump product version to 7.2.5.1
[LibreOffice.git] / ucb / source / ucp / cmis / cmis_repo_content.hxx
blob00fc4e244960df55d10a45450ac587a8b0ff97f4
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
10 #pragma once
12 #include "cmis_url.hxx"
13 #include "children_provider.hxx"
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>
21 #include <ucbhelper/contenthelper.hxx>
22 #include <libcmis/libcmis.hxx>
24 #include <vector>
25 #include <list>
27 namespace com::sun::star {
28 namespace beans {
29 struct Property;
30 struct PropertyValue;
32 namespace sdbc {
33 class XRow;
36 namespace ucbhelper
38 class Content;
42 namespace cmis
44 #define CMIS_REPO_TYPE "application/vnd.libreoffice.cmis-repository"
46 class ContentProvider;
47 class RepoContent : public ::ucbhelper::ContentImplHelper,
48 public ChildrenProvider
50 private:
51 ContentProvider* m_pProvider;
52 URL m_aURL;
53 OUString m_sRepositoryId;
55 std::vector< libcmis::RepositoryPtr > m_aRepositories;
57 private:
59 css::uno::Any getBadArgExcept();
61 css::uno::Reference< css::sdbc::XRow >
62 getPropertyValues(
63 const css::uno::Sequence< css::beans::Property >& rProperties,
64 const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
67 * Call me to ensure the repositories have been fetched
69 void getRepositories( const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
71 libcmis::RepositoryPtr getRepository( const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
73 public:
74 /// @throws css::ucb::ContentCreationException
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 > const & aRepos = std::vector< libcmis::RepositoryPtr > ( ) );
80 virtual ~RepoContent() override;
82 virtual css::uno::Sequence< css::beans::Property >
83 getProperties( const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) override;
85 virtual css::uno::Sequence< css::ucb::CommandInfo >
86 getCommands( const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) override;
88 virtual OUString getParentURL() override;
90 // XInterface
92 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
93 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
95 virtual OUString SAL_CALL
96 getImplementationName() override;
98 virtual css::uno::Sequence< OUString > SAL_CALL
99 getSupportedServiceNames() override;
101 virtual OUString SAL_CALL
102 getContentType() override;
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;
109 virtual void SAL_CALL abort( sal_Int32 CommandId ) override;
111 virtual std::vector< css::uno::Reference< css::ucb::XContent > > getChildren( ) override;
116 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */