22#include <com/sun/star/io/XInputStream.hpp>
23#include <com/sun/star/io/XOutputStream.hpp>
24#include <com/sun/star/ucb/ContentCreationException.hpp>
25#include <com/sun/star/ucb/OpenCommandArgument2.hpp>
26#include <com/sun/star/ucb/TransferInfo.hpp>
27#include <com/sun/star/ucb/XContentCreator.hpp>
52inline constexpr OUStringLiteral
GIO_FILE_TYPE =
u"application/vnd.sun.staroffice.gio-file";
53inline constexpr OUStringLiteral
GIO_FOLDER_TYPE =
u"application/vnd.sun.staroffice.gio-folder";
56 const css::uno::Reference< css::uno::XInterface >& rContext,
bool bThrow=
true);
60 const css::uno::Reference< css::uno::XInterface >& rContext);
71 GFileInfo *
getGFileInfo(
const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv,
72 GError **ppError=
nullptr);
73 bool isFolder(
const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv);
78 css::uno::Reference< css::sdbc::XRow >
80 const css::uno::Sequence< css::beans::Property >& rProperties,
81 const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
91 css::uno::Any
open(
const css::ucb::OpenCommandArgument2 & rArg,
92 const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
95 void transfer(
const css::ucb::TransferInfo& rTransferInfo,
96 const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
99 void insert(
const css::uno::Reference< css::io::XInputStream > & xInputStream,
100 bool bReplaceExisting,
const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
103 void destroy(
bool bDeletePhysical );
105 static void copyData(
const css::uno::Reference< css::io::XInputStream >& xIn,
106 const css::uno::Reference< css::io::XOutputStream >& xOut );
108 css::uno::Sequence< css::uno::Any >
110 css::beans::PropertyValue >& rValues,
111 const css::uno::Reference<
112 css::ucb::XCommandEnvironment >& xEnv );
114 bool feedSink(
const css::uno::Reference< css::uno::XInterface>& aSink );
116 bool exchangeIdentity(
const css::uno::Reference< css::ucb::XContentIdentifier >& xNewId);
119 css::uno::Reference<css::ucb::XCommandEnvironment>
const & env, GFileInfo ** info,
124 Content(
const css::uno::Reference<
126 const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier);
129 Content(
const css::uno::Reference<
131 const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier,
136 virtual css::uno::Sequence< css::beans::Property >
138 css::ucb::XCommandEnvironment > & xEnv )
override;
140 virtual css::uno::Sequence< css::ucb::CommandInfo >
142 css::ucb::XCommandEnvironment > & xEnv )
override;
147 virtual css::uno::Any SAL_CALL
queryInterface(
const css::uno::Type & rType )
override;
148 virtual void SAL_CALL
acquire()
150 virtual
void SAL_CALL
release()
156 virtual OUString SAL_CALL
159 virtual css::
uno::Sequence< OUString > SAL_CALL
162 virtual OUString SAL_CALL
165 virtual css::
uno::Any SAL_CALL
168 const css::
uno::Reference< css::
ucb::XCommandEnvironment >& Environment ) override;
170 virtual
void SAL_CALL
abort( sal_Int32 CommandId ) override;
174 virtual css::
uno::Reference< css::
ucb::XContent >
180 const css::
uno::Reference< css::
ucb::XCommandEnvironment >& xEnv);
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
bool exchangeIdentity(const css::uno::Reference< css::ucb::XContentIdentifier > &xNewId)
bool isFolder(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
css::uno::Any getBadArgExcept()
void getFileInfo(css::uno::Reference< css::ucb::XCommandEnvironment > const &env, GFileInfo **info, bool fail)
virtual css::uno::Reference< css::ucb::XContent > SAL_CALL createNewContent(const css::ucb::ContentInfo &Info) override
void destroy(bool bDeletePhysical)
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
css::uno::Any mapGIOError(GError *error)
bool feedSink(const css::uno::Reference< css::uno::XInterface > &aSink)
void insert(const css::uno::Reference< css::io::XInputStream > &xInputStream, bool bReplaceExisting, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
ContentProvider * m_pProvider
bool doSetFileInfo(GFileInfo *pNewInfo)
css::uno::Sequence< css::uno::Any > setPropertyValues(const css::uno::Sequence< css::beans::PropertyValue > &rValues, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
virtual void SAL_CALL acquire() noexcept override
virtual css::uno::Sequence< css::beans::Property > getProperties(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) override
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 abort(sal_Int32 CommandId) override
virtual css::uno::Sequence< css::ucb::CommandInfo > getCommands(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) override
virtual ~Content() override
virtual css::uno::Sequence< css::ucb::ContentInfo > SAL_CALL queryCreatableContentsInfo() override
void transfer(const css::ucb::TransferInfo &rTransferInfo, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
virtual void SAL_CALL release() noexcept override
rtl::Reference< Content > ContentRef
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
Content(const css::uno::Reference< css::uno::XComponentContext > &rxContext, ContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier)
void queryChildren(ContentRefList &rChildren)
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
GFileInfo * getGFileInfo(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv, GError **ppError=nullptr)
virtual OUString SAL_CALL getImplementationName() 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
static void copyData(const css::uno::Reference< css::io::XInputStream > &xIn, const css::uno::Reference< css::io::XOutputStream > &xOut)
virtual OUString SAL_CALL getContentType() override
virtual OUString getParentURL() override
std::vector< ContentRef > ContentRefList
constexpr OUStringLiteral GIO_FILE_TYPE
css::uno::Any convertToException(GError *pError, const css::uno::Reference< css::uno::XInterface > &rContext, bool bThrow)
constexpr OUStringLiteral GIO_FOLDER_TYPE
void convertToIOException(GError *pError, const css::uno::Reference< css::uno::XInterface > &rContext)