bump product version to 4.1.6.2
[LibreOffice.git] / ucb / source / ucp / cmis / cmis_repo_content.hxx
blob404acfa840943c770066e0f76fa7b9b565d3532a
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 CMIS_REPO_CONTENT_HXX
11 #define 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/repository.hxx>
25 #include <list>
27 namespace com { namespace sun { namespace star {
28 namespace beans {
29 struct Property;
30 struct PropertyValue;
32 namespace sdbc {
33 class XRow;
35 }}}
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::list< libcmis::RepositoryPtr > m_aRepositories;
57 private:
59 com::sun::star::uno::Any getBadArgExcept();
61 com::sun::star::uno::Reference< com::sun::star::sdbc::XRow >
62 getPropertyValues(
63 const com::sun::star::uno::Sequence< com::sun::star::beans::Property >& rProperties,
64 const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& xEnv );
67 * Call me to ensure the repositories have been fetched
69 void getRepositories( const com::sun::star::uno::Reference<
70 com::sun::star::ucb::XCommandEnvironment >& xEnv );
72 libcmis::RepositoryPtr getRepository( const com::sun::star::uno::Reference<
73 com::sun::star::ucb::XCommandEnvironment >& xEnv );
75 public:
76 RepoContent( const com::sun::star::uno::Reference<
77 com::sun::star::uno::XComponentContext >& rxContext, ContentProvider *pProvider,
78 const com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier >& Identifier,
79 std::list< libcmis::RepositoryPtr > aRepos = std::list< libcmis::RepositoryPtr > ( ) )
80 throw ( com::sun::star::ucb::ContentCreationException );
82 virtual ~RepoContent();
84 virtual com::sun::star::uno::Sequence< com::sun::star::beans::Property >
85 getProperties( const com::sun::star::uno::Reference<
86 com::sun::star::ucb::XCommandEnvironment > & xEnv );
88 virtual com::sun::star::uno::Sequence< com::sun::star::ucb::CommandInfo >
89 getCommands( const com::sun::star::uno::Reference<
90 com::sun::star::ucb::XCommandEnvironment > & xEnv );
92 virtual OUString getParentURL();
94 XINTERFACE_DECL()
96 XTYPEPROVIDER_DECL()
98 virtual OUString SAL_CALL
99 getImplementationName()
100 throw( com::sun::star::uno::RuntimeException );
102 virtual com::sun::star::uno::Sequence< OUString > SAL_CALL
103 getSupportedServiceNames()
104 throw( com::sun::star::uno::RuntimeException );
106 virtual OUString SAL_CALL
107 getContentType()
108 throw( com::sun::star::uno::RuntimeException );
110 virtual com::sun::star::uno::Any SAL_CALL
111 execute( const com::sun::star::ucb::Command& aCommand,
112 sal_Int32 CommandId,
113 const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& Environment )
114 throw( com::sun::star::uno::Exception, com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::RuntimeException );
116 virtual void SAL_CALL abort( sal_Int32 CommandId )
117 throw( com::sun::star::uno::RuntimeException );
119 virtual std::list< com::sun::star::uno::Reference< com::sun::star::ucb::XContent > > getChildren( );
124 #endif
126 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */