nss: upgrade to release 3.73
[LibreOffice.git] / ucb / source / ucp / cmis / cmis_repo_content.hxx
blob67548a542570d848bf48a23262a630bfdbba847b
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 #ifndef INCLUDED_UCB_SOURCE_UCP_CMIS_CMIS_REPO_CONTENT_HXX
11 #define INCLUDED_UCB_SOURCE_UCP_CMIS_CMIS_REPO_CONTENT_HXX
13 #include "cmis_url.hxx"
14 #include "children_provider.hxx"
16 #include <com/sun/star/io/XInputStream.hpp>
17 #include <com/sun/star/io/XOutputStream.hpp>
18 #include <com/sun/star/ucb/ContentCreationException.hpp>
19 #include <com/sun/star/ucb/OpenCommandArgument2.hpp>
20 #include <com/sun/star/ucb/TransferInfo.hpp>
21 #include <com/sun/star/ucb/XContentCreator.hpp>
22 #include <ucbhelper/contenthelper.hxx>
23 #include <libcmis/libcmis.hxx>
25 #include <vector>
26 #include <list>
28 namespace com::sun::star {
29 namespace beans {
30 struct Property;
31 struct PropertyValue;
33 namespace sdbc {
34 class XRow;
37 namespace ucbhelper
39 class Content;
43 namespace cmis
45 #define CMIS_REPO_TYPE "application/vnd.libreoffice.cmis-repository"
47 class ContentProvider;
48 class RepoContent : public ::ucbhelper::ContentImplHelper,
49 public ChildrenProvider
51 private:
52 ContentProvider* m_pProvider;
53 URL m_aURL;
54 OUString m_sRepositoryId;
56 std::vector< libcmis::RepositoryPtr > m_aRepositories;
58 private:
60 css::uno::Any getBadArgExcept();
62 css::uno::Reference< css::sdbc::XRow >
63 getPropertyValues(
64 const css::uno::Sequence< css::beans::Property >& rProperties,
65 const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
68 * Call me to ensure the repositories have been fetched
70 void getRepositories( const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
72 libcmis::RepositoryPtr getRepository( const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
74 public:
75 /// @throws css::ucb::ContentCreationException
76 RepoContent( const css::uno::Reference<
77 css::uno::XComponentContext >& rxContext, ContentProvider *pProvider,
78 const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier,
79 std::vector< libcmis::RepositoryPtr > const & aRepos = std::vector< libcmis::RepositoryPtr > ( ) );
81 virtual ~RepoContent() override;
83 virtual css::uno::Sequence< css::beans::Property >
84 getProperties( const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) override;
86 virtual css::uno::Sequence< css::ucb::CommandInfo >
87 getCommands( const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv ) override;
89 virtual OUString getParentURL() override;
91 // XInterface
93 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
94 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
96 virtual OUString SAL_CALL
97 getImplementationName() override;
99 virtual css::uno::Sequence< OUString > SAL_CALL
100 getSupportedServiceNames() override;
102 virtual OUString SAL_CALL
103 getContentType() override;
105 virtual css::uno::Any SAL_CALL
106 execute( const css::ucb::Command& aCommand,
107 sal_Int32 CommandId,
108 const css::uno::Reference< css::ucb::XCommandEnvironment >& Environment ) override;
110 virtual void SAL_CALL abort( sal_Int32 CommandId ) override;
112 virtual std::vector< css::uno::Reference< css::ucb::XContent > > getChildren( ) override;
117 #endif
119 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */