Stop leaking all ScPostIt instances.
[LibreOffice.git] / ucb / source / ucp / cmis / cmis_repo_content.hxx
blob7c7061243c1a555615fc28fb9e91f4a530265c02
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/libcmis.hxx>
25 #include <vector>
26 #include <list>
28 namespace com { namespace sun { namespace star {
29 namespace beans {
30 struct Property;
31 struct PropertyValue;
33 namespace sdbc {
34 class XRow;
36 }}}
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 com::sun::star::uno::Any getBadArgExcept();
62 com::sun::star::uno::Reference< com::sun::star::sdbc::XRow >
63 getPropertyValues(
64 const com::sun::star::uno::Sequence< com::sun::star::beans::Property >& rProperties,
65 const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& xEnv );
68 * Call me to ensure the repositories have been fetched
70 void getRepositories( const com::sun::star::uno::Reference<
71 com::sun::star::ucb::XCommandEnvironment >& xEnv );
73 libcmis::RepositoryPtr getRepository( const com::sun::star::uno::Reference<
74 com::sun::star::ucb::XCommandEnvironment >& xEnv );
76 public:
77 RepoContent( const com::sun::star::uno::Reference<
78 com::sun::star::uno::XComponentContext >& rxContext, ContentProvider *pProvider,
79 const com::sun::star::uno::Reference< com::sun::star::ucb::XContentIdentifier >& Identifier,
80 std::vector< libcmis::RepositoryPtr > aRepos = std::vector< libcmis::RepositoryPtr > ( ) )
81 throw ( com::sun::star::ucb::ContentCreationException );
83 virtual ~RepoContent();
85 virtual com::sun::star::uno::Sequence< com::sun::star::beans::Property >
86 getProperties( const com::sun::star::uno::Reference<
87 com::sun::star::ucb::XCommandEnvironment > & xEnv );
89 virtual com::sun::star::uno::Sequence< com::sun::star::ucb::CommandInfo >
90 getCommands( const com::sun::star::uno::Reference<
91 com::sun::star::ucb::XCommandEnvironment > & xEnv );
93 virtual OUString getParentURL();
95 XINTERFACE_DECL()
97 XTYPEPROVIDER_DECL()
99 virtual OUString SAL_CALL
100 getImplementationName()
101 throw( com::sun::star::uno::RuntimeException );
103 virtual com::sun::star::uno::Sequence< OUString > SAL_CALL
104 getSupportedServiceNames()
105 throw( com::sun::star::uno::RuntimeException );
107 virtual OUString SAL_CALL
108 getContentType()
109 throw( com::sun::star::uno::RuntimeException );
111 virtual com::sun::star::uno::Any SAL_CALL
112 execute( const com::sun::star::ucb::Command& aCommand,
113 sal_Int32 CommandId,
114 const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& Environment )
115 throw( com::sun::star::uno::Exception, com::sun::star::ucb::CommandAbortedException, com::sun::star::uno::RuntimeException );
117 virtual void SAL_CALL abort( sal_Int32 CommandId )
118 throw( com::sun::star::uno::RuntimeException );
120 virtual std::list< com::sun::star::uno::Reference< com::sun::star::ucb::XContent > > getChildren( );
125 #endif
127 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */