19#include <com/sun/star/io/XInputStream.hpp>
20#include <com/sun/star/io/XOutputStream.hpp>
21#include <com/sun/star/ucb/CheckinArgument.hpp>
22#include <com/sun/star/ucb/CommandFailedException.hpp>
23#include <com/sun/star/ucb/ContentCreationException.hpp>
24#include <com/sun/star/ucb/OpenCommandArgument2.hpp>
25#include <com/sun/star/ucb/TransferInfo.hpp>
26#include <com/sun/star/ucb/XContentCreator.hpp>
27#include <com/sun/star/document/CmisVersion.hpp>
30#if defined __GNUC__ && !defined __clang__
31#pragma GCC diagnostic push
32#pragma GCC diagnostic ignored "-Wdeprecated"
33#pragma GCC diagnostic ignored "-Wunused-but-set-parameter"
35#include <libcmis/libcmis.hxx>
36#if defined __GNUC__ && !defined __clang__
37#pragma GCC diagnostic pop
58inline constexpr OUStringLiteral
CMIS_FILE_TYPE =
u"application/vnd.libreoffice.cmis-file";
59inline constexpr OUStringLiteral
CMIS_FOLDER_TYPE =
u"application/vnd.libreoffice.cmis-folder";
63 public css::ucb::XContentCreator,
81 bool isFolder(
const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
82 void setCmisProperty(
const std::string& rName,
const std::string& rValue,
83 const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
87 css::uno::Reference< css::sdbc::XRow >
89 const css::uno::Sequence< css::beans::Property >& rProperties,
90 const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
92 libcmis::Session*
getSession(
const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
93 libcmis::ObjectTypePtr
const &
getObjectType(
const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
101 css::uno::Any
open(
const css::ucb::OpenCommandArgument2 & rArg,
102 const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
105 void transfer(
const css::ucb::TransferInfo& rTransferInfo,
106 const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
109 void insert(
const css::uno::Reference< css::io::XInputStream > & xInputStream,
110 bool bReplaceExisting, std::u16string_view rMimeType,
111 const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
114 OUString
checkIn(
const css::ucb::CheckinArgument& rArg,
115 const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
118 OUString
checkOut(
const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
121 OUString
cancelCheckOut(
const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
123 static void copyData(
const css::uno::Reference< css::io::XInputStream >& xIn,
124 const css::uno::Reference< css::io::XOutputStream >& xOut );
126 css::uno::Sequence< css::uno::Any >
128 const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
131 css::uno::Sequence< css::document::CmisVersion >
132 getAllVersions(
const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
134 bool feedSink(
const css::uno::Reference< css::uno::XInterface>& aSink,
135 const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
139 Content(
const css::uno::Reference< css::uno::XComponentContext >& rxContext,
141 const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier,
142 libcmis::ObjectPtr pObject = libcmis::ObjectPtr( ) );
145 Content(
const css::uno::Reference< css::uno::XComponentContext >& rxContext,
147 const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier,
152 virtual css::uno::Sequence< css::beans::Property >
153 getProperties(
const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv )
override;
156 const css::uno::Any& iCmisProps,
157 const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv);
159 virtual css::uno::Sequence< css::ucb::CommandInfo >
160 getCommands(
const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv )
override;
165 virtual css::uno::Any SAL_CALL
queryInterface(
const css::uno::Type & rType )
override;
166 virtual void SAL_CALL
acquire()
168 virtual
void SAL_CALL
release()
174 virtual OUString SAL_CALL
177 virtual css::
uno::Sequence< OUString > SAL_CALL
180 virtual OUString SAL_CALL
183 virtual css::
uno::Any SAL_CALL
186 const css::
uno::Reference< css::
ucb::XCommandEnvironment >& Environment ) override;
188 virtual
void SAL_CALL
abort( sal_Int32 CommandId ) override;
193 virtual css::
uno::Reference< css::
ucb::XContent >
205 libcmis::ObjectPtr const &
getObject( const css::
uno::Reference< css::
ucb::XCommandEnvironment >& xEnv );
void transfer(const css::ucb::TransferInfo &rTransferInfo, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
bool feedSink(const css::uno::Reference< css::uno::XInterface > &aSink, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
void insert(const css::uno::Reference< css::io::XInputStream > &xInputStream, bool bReplaceExisting, std::u16string_view rMimeType, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
virtual css::uno::Sequence< css::ucb::CommandInfo > getCommands(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) override
virtual css::uno::Reference< css::ucb::XContent > SAL_CALL createNewContent(const css::ucb::ContentInfo &Info) override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
OUString checkIn(const css::ucb::CheckinArgument &rArg, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
css::uno::Sequence< css::document::CmisVersion > getAllVersions(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
virtual std::vector< css::uno::Reference< css::ucb::XContent > > getChildren() override
virtual void SAL_CALL acquire() noexcept override
virtual ~Content() override
virtual OUString SAL_CALL getContentType() override
libcmis::ObjectPtr m_pObject
virtual css::uno::Sequence< css::ucb::ContentInfo > SAL_CALL queryCreatableContentsInfo() override
libcmis::ObjectTypePtr const & getObjectType(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
std::vector< ContentRef > ContentRefList
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
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 void SAL_CALL abort(sal_Int32 CommandId) override
void setCmisProperty(const std::string &rName, const std::string &rValue, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
libcmis::ObjectPtr updateProperties(const css::uno::Any &iCmisProps, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
std::map< std::string, libcmis::PropertyPtr > m_pObjectProps
ContentProvider * m_pProvider
libcmis::Session * m_pSession
css::uno::Any getBadArgExcept()
libcmis::ObjectTypePtr m_pObjectType
libcmis::Session * getSession(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
css::uno::Sequence< css::uno::Any > setPropertyValues(const css::uno::Sequence< css::beans::PropertyValue > &rValues, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
css::uno::Any open(const css::ucb::OpenCommandArgument2 &rArg, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
css::uno::Reference< css::sdbc::XRow > getPropertyValues(const css::uno::Sequence< css::beans::Property > &rProperties, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
virtual void SAL_CALL release() noexcept override
Content(const css::uno::Reference< css::uno::XComponentContext > &rxContext, ContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier, bool bIsFolder)
libcmis::ObjectPtr const & getObject(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
static void copyData(const css::uno::Reference< css::io::XInputStream > &xIn, const css::uno::Reference< css::io::XOutputStream > &xOut)
rtl::Reference< Content > ContentRef
OUString checkOut(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
OUString cancelCheckOut(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
bool isFolder(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
Content(const css::uno::Reference< css::uno::XComponentContext > &rxContext, ContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier, libcmis::ObjectPtr pObject=libcmis::ObjectPtr())
virtual OUString getParentURL() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Sequence< css::beans::Property > getProperties(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) override
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
constexpr OUStringLiteral CMIS_FOLDER_TYPE
constexpr OUStringLiteral CMIS_FILE_TYPE