27#include <com/sun/star/ucb/XContentCreator.hpp>
32 namespace sdbc {
class XRow; }
33 namespace io {
class XInputStream;
class XOutputStream; }
34 namespace beans {
struct PropertyValue; }
35 namespace ucb {
struct OpenCommandArgument2;
struct TransferInfo;
76 css::uno::Sequence< css::ucb::ContentInfo >
89 public css::ucb::XContentCreator
102 Content(
const css::uno::Reference< css::uno::XComponentContext >& rxContext,
104 const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier,
106 Content(
const css::uno::Reference< css::uno::XComponentContext >& rxContext,
108 const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier,
109 const css::ucb::ContentInfo& Info );
111 virtual css::uno::Sequence< css::beans::Property >
112 getProperties(
const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv )
override;
113 virtual css::uno::Sequence< css::ucb::CommandInfo >
114 getCommands(
const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv )
override;
126 bool storeData(
const css::uno::Reference< css::io::XInputStream >& xData,
127 const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
128 void renameData(
const css::uno::Reference< css::ucb::XContentIdentifier >& xOldId,
129 const css::uno::Reference< css::ucb::XContentIdentifier >& xNewId );
132 bool copyData(
const Uri & rSourceUri,
const OUString & rNewName );
134 css::uno::Reference< css::ucb::XContentIdentifier >
142 const css::uno::Reference< css::ucb::XContentIdentifier >& xNewId );
144 css::uno::Reference< css::sdbc::XRow >
146 css::uno::Sequence< css::uno::Any >
149 const css::uno::Sequence< css::beans::PropertyValue >& rValues,
150 const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
154 open(
const css::ucb::OpenCommandArgument2& rArg,
155 const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv );
158 void insert(
const css::uno::Reference< css::io::XInputStream >& xData,
159 sal_Int32 nNameClashResolve,
160 const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
164 const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
167 void transfer(
const css::ucb::TransferInfo& rInfo,
168 const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
170 static css::uno::Reference< css::sdbc::XRow >
172 const css::uno::Sequence< css::beans::Property >& rProperties,
175 const OUString& rContentId );
179 const css::uno::Reference< css::embed::XStorage > & xStorage );
182 const css::uno::Reference< css::io::XOutputStream > & xOut );
187 css::uno::Reference< css::io::XInputStream >
188 getInputStream(
const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
193 css::uno::Reference< css::io::XOutputStream >
195 const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
197 css::uno::Reference< css::ucb::XContent >
203 css::uno::Reference< css::io::XStream >
204 getStream(
const css::uno::Reference< css::ucb::XCommandEnvironment > & xEnv );
209 const css::uno::Reference< css::uno::XComponentContext >& rxContext,
211 const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier );
215 const css::uno::Reference< css::uno::XComponentContext >& rxContext,
217 const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier,
218 const css::ucb::ContentInfo& Info );
223 virtual css::uno::Any SAL_CALL
queryInterface(
const css::uno::Type & rType )
override;
224 virtual void SAL_CALL
acquire()
226 virtual
void SAL_CALL
release()
234 virtual OUString SAL_CALL
236 virtual css::
uno::Sequence< OUString > SAL_CALL
240 virtual OUString SAL_CALL
242 virtual css::
uno::Reference< css::
ucb::XContentIdentifier > SAL_CALL
246 virtual css::
uno::Any SAL_CALL
249 const css::
uno::Reference< css::
ucb::XCommandEnvironment >& Environment ) override;
250 virtual
void SAL_CALL
251 abort( sal_Int32 CommandId ) override;
260 virtual css::
uno::Reference< css::
ucb::XContent > SAL_CALL
267 static css::
uno::Reference< css::sdbc::XRow >
269 const css::
uno::Sequence< css::beans::Property >& rProperties,
271 const OUString& rContentId );
bool isContentCreator() const
ContentType getType() const
css::uno::Sequence< css::ucb::ContentInfo > getCreatableContentsInfo() const
bool getIsDocument() const
const OUString & getContentType() const
void setTitle(const OUString &rTitle)
const OUString & getTitle() const
ContentProperties(const ContentType &rType, OUString aTitle)
static bool hasData(ContentProvider const *pProvider, const Uri &rUri)
static bool commitStorage(const css::uno::Reference< css::embed::XStorage > &xStorage)
virtual css::uno::Sequence< css::ucb::CommandInfo > getCommands(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) override
virtual css::uno::Sequence< css::beans::Property > getProperties(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv) override
css::uno::Reference< css::io::XOutputStream > getTruncatedOutputStream(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
virtual css::uno::Reference< css::ucb::XContentIdentifier > SAL_CALL getIdentifier() override
Content(const css::uno::Reference< css::uno::XComponentContext > &rxContext, ContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier, const css::ucb::ContentInfo &Info)
bool exchangeIdentity(const css::uno::Reference< css::ucb::XContentIdentifier > &xNewId)
void renameData(const css::uno::Reference< css::ucb::XContentIdentifier > &xOldId, const css::uno::Reference< css::ucb::XContentIdentifier > &xNewId)
css::uno::Sequence< css::uno::Any > setPropertyValues(const css::uno::Sequence< css::beans::PropertyValue > &rValues, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
void notifyDocumentClosed()
bool copyData(const Uri &rSourceUri, const OUString &rNewName)
virtual css::uno::Sequence< css::ucb::ContentInfo > SAL_CALL queryCreatableContentsInfo() override
ContentProvider * m_pProvider
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) 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
void insert(const css::uno::Reference< css::io::XInputStream > &xData, sal_Int32 nNameClashResolve, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
std::vector< ContentRef > ContentRefList
css::uno::Any open(const css::ucb::OpenCommandArgument2 &rArg, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
void destroy(bool bDeletePhysical, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
virtual css::uno::Reference< css::ucb::XContent > SAL_CALL createNewContent(const css::ucb::ContentInfo &Info) override
rtl::Reference< Content > ContentRef
static rtl::Reference< Content > create(const css::uno::Reference< css::uno::XComponentContext > &rxContext, ContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier)
css::uno::Reference< css::sdbc::XRow > getPropertyValues(const css::uno::Sequence< css::beans::Property > &rProperties)
void notifyChildInserted(std::u16string_view rRelativeChildUri)
css::uno::Reference< css::io::XStream > getStream(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
css::uno::Reference< css::io::XInputStream > getInputStream(const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
void notifyChildRemoved(std::u16string_view rRelativeChildUri)
virtual OUString SAL_CALL getImplementationName() override
void transfer(const css::ucb::TransferInfo &rInfo, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
virtual void SAL_CALL acquire() noexcept override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
css::uno::Reference< css::ucb::XContentIdentifier > makeNewIdentifier(const OUString &rTitle)
virtual void SAL_CALL release() noexcept override
static bool closeOutputStream(const css::uno::Reference< css::io::XOutputStream > &xOut)
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
bool storeData(const css::uno::Reference< css::io::XInputStream > &xData, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
void queryChildren(ContentRefList &rChildren)
rtl::Reference< ContentProvider > getContentProvider() const
virtual OUString SAL_CALL getContentType() override
virtual void SAL_CALL abort(sal_Int32 CommandId) override
bool hasData(const Uri &rUri) const
virtual OUString getParentURL() override
ContentProperties m_aProps
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
static rtl::Reference< Content > create(const css::uno::Reference< css::uno::XComponentContext > &rxContext, ContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier, const css::ucb::ContentInfo &Info)
static bool loadData(ContentProvider const *pProvider, const Uri &rUri, ContentProperties &rProps)
static css::uno::Reference< css::sdbc::XRow > getPropertyValues(const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Sequence< css::beans::Property > &rProperties, const ContentProperties &rData, ContentProvider *pProvider, const OUString &rContentId)
virtual ~Content() override
Content(const css::uno::Reference< css::uno::XComponentContext > &rxContext, ContentProvider *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier, ContentProperties aProps)
css::uno::Reference< css::ucb::XContent > queryChildContent(std::u16string_view rRelativeChildUri)
constexpr OUStringLiteral TDOC_ROOT_CONTENT_TYPE
constexpr OUStringLiteral TDOC_STREAM_CONTENT_TYPE
constexpr OUStringLiteral TDOC_DOCUMENT_CONTENT_TYPE
constexpr OUStringLiteral TDOC_FOLDER_CONTENT_TYPE