Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / ucb / source / ucp / ftp / ftpcontent.hxx
blob6eef6c30a5c6b926ae82dc2308ad0584d576f5d6
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/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #pragma once
22 #include <ucbhelper/contenthelper.hxx>
23 #include <com/sun/star/ucb/InsertCommandArgument.hpp>
24 #include <com/sun/star/ucb/XContentCreator.hpp>
25 #include "ftpurl.hxx"
27 namespace com::sun::star::beans {
28 struct Property;
29 struct PropertyValue;
32 namespace com::sun::star::sdbc {
33 class XRow;
37 namespace ftp
40 class FTPContentProvider;
42 class FTPContent : public ::ucbhelper::ContentImplHelper,
43 public css::ucb::XContentCreator
45 public:
47 FTPContent( const css::uno::Reference<
48 css::uno::XComponentContext >& rxContext,
49 FTPContentProvider* pProvider,
50 const css::uno::Reference<
51 css::ucb::XContentIdentifier >& Identifier,
52 const FTPURL& FtpUrl);
54 FTPContent( const css::uno::Reference<
55 css::uno::XComponentContext >& rxContext,
56 FTPContentProvider* pProvider,
57 const css::uno::Reference<
58 css::ucb::XContentIdentifier >& Identifier,
59 css::ucb::ContentInfo aInfo);
62 virtual ~FTPContent() override;
64 // XInterface
65 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
66 virtual void SAL_CALL acquire()
67 noexcept override;
68 virtual void SAL_CALL release()
69 noexcept override;
71 // XTypeProvider
72 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
73 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
75 // XServiceInfo
76 virtual OUString SAL_CALL getImplementationName() override;
77 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
78 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
80 // XContent
81 virtual OUString SAL_CALL getContentType() override;
83 // XCommandProcessor
84 virtual css::uno::Any SAL_CALL execute( const css::ucb::Command& aCommand,
85 sal_Int32 CommandId,
86 const css::uno::Reference<
87 css::ucb::XCommandEnvironment >& Environment ) override;
89 virtual void SAL_CALL abort(sal_Int32 CommandId) override;
91 // XContentCreator
92 virtual css::uno::Sequence<
93 css::ucb::ContentInfo > SAL_CALL
94 queryCreatableContentsInfo( ) override;
96 virtual css::uno::Reference<
97 css::ucb::XContent > SAL_CALL
98 createNewContent( const css::ucb::ContentInfo& Info ) override;
100 // XChild
102 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent( ) override;
104 virtual void SAL_CALL setParent( const css::uno::Reference< css::uno::XInterface >& Parent ) override;
106 /// @throws css::uno::RuntimeException
107 static css::uno::Sequence< css::ucb::ContentInfo > queryCreatableContentsInfo_Static();
109 private:
111 FTPContentProvider *m_pFCP;
112 FTPURL m_aFTPURL;
113 bool m_bInserted;
114 bool m_bTitleSet;
115 css::ucb::ContentInfo m_aInfo;
117 virtual css::uno::Sequence< css::beans::Property >
118 getProperties( const css::uno::Reference<
119 css::ucb::XCommandEnvironment > & xEnv ) override;
122 virtual css::uno::Sequence< css::ucb::CommandInfo>
123 getCommands(const css::uno::Reference<
124 css::ucb::XCommandEnvironment > & xEnv) override;
127 virtual OUString getParentURL() override;
129 css::uno::Reference<css::sdbc::XRow>
130 getPropertyValues(
131 const css::uno::Sequence<
132 css::beans::Property>& seqProp
135 css::uno::Sequence<css::uno::Any>
136 setPropertyValues( const css::uno::Sequence<
137 css::beans::PropertyValue>& seqPropVal);
139 void insert(const css::ucb::InsertCommandArgument&,
140 const css::uno::Reference<
141 css::ucb::XCommandEnvironment>&);
146 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */