Version 6.4.0.3, tag libreoffice-6.4.0.3
[LibreOffice.git] / ucb / source / ucp / ftp / ftpcontent.hxx
blobf702fb84b3fd7d3a1966f9ac57871758a10e246c
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 #ifndef INCLUDED_UCB_SOURCE_UCP_FTP_FTPCONTENT_HXX
21 #define INCLUDED_UCB_SOURCE_UCP_FTP_FTPCONTENT_HXX
23 #include <ucbhelper/contenthelper.hxx>
24 #include <com/sun/star/ucb/InsertCommandArgument.hpp>
25 #include <com/sun/star/ucb/XContentCreator.hpp>
26 #include "ftpurl.hxx"
28 namespace com { namespace sun { namespace star { namespace beans {
29 struct Property;
30 struct PropertyValue;
31 } } } }
33 namespace com { namespace sun { namespace star { namespace sdbc {
34 class XRow;
35 } } } }
38 namespace ftp
41 class FTPContentProvider;
43 class FTPContent : public ::ucbhelper::ContentImplHelper,
44 public css::ucb::XContentCreator
46 public:
48 FTPContent( const css::uno::Reference<
49 css::uno::XComponentContext >& rxContext,
50 FTPContentProvider* pProvider,
51 const css::uno::Reference<
52 css::ucb::XContentIdentifier >& Identifier,
53 const FTPURL& FtpUrl);
55 FTPContent( const css::uno::Reference<
56 css::uno::XComponentContext >& rxContext,
57 FTPContentProvider* pProvider,
58 const css::uno::Reference<
59 css::ucb::XContentIdentifier >& Identifier,
60 const css::ucb::ContentInfo& aInfo);
63 virtual ~FTPContent() override;
65 // XInterface
66 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType ) override;
67 virtual void SAL_CALL acquire()
68 throw() override;
69 virtual void SAL_CALL release()
70 throw() override;
72 // XTypeProvider
73 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override;
74 virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override;
76 // XServiceInfo
77 virtual OUString SAL_CALL getImplementationName() override;
78 virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
79 virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override;
81 // XContent
82 virtual OUString SAL_CALL getContentType() override;
84 // XCommandProcessor
85 virtual css::uno::Any SAL_CALL execute( const css::ucb::Command& aCommand,
86 sal_Int32 CommandId,
87 const css::uno::Reference<
88 css::ucb::XCommandEnvironment >& Environment ) override;
90 virtual void SAL_CALL abort(sal_Int32 CommandId) override;
92 // XContentCreator
93 virtual css::uno::Sequence<
94 css::ucb::ContentInfo > SAL_CALL
95 queryCreatableContentsInfo( ) override;
97 virtual css::uno::Reference<
98 css::ucb::XContent > SAL_CALL
99 createNewContent( const css::ucb::ContentInfo& Info ) override;
101 // XChild
103 virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getParent( ) override;
105 virtual void SAL_CALL setParent( const css::uno::Reference< css::uno::XInterface >& Parent ) override;
107 /// @throws css::uno::RuntimeException
108 static css::uno::Sequence< css::ucb::ContentInfo > queryCreatableContentsInfo_Static();
110 private:
112 FTPContentProvider *m_pFCP;
113 FTPURL m_aFTPURL;
114 bool m_bInserted;
115 bool m_bTitleSet;
116 css::ucb::ContentInfo const m_aInfo;
118 virtual css::uno::Sequence< css::beans::Property >
119 getProperties( const css::uno::Reference<
120 css::ucb::XCommandEnvironment > & xEnv ) override;
123 virtual css::uno::Sequence< css::ucb::CommandInfo>
124 getCommands(const css::uno::Reference<
125 css::ucb::XCommandEnvironment > & xEnv) override;
128 virtual OUString getParentURL() override;
130 css::uno::Reference<css::sdbc::XRow>
131 getPropertyValues(
132 const css::uno::Sequence<
133 css::beans::Property>& seqProp
136 css::uno::Sequence<css::uno::Any>
137 setPropertyValues( const css::uno::Sequence<
138 css::beans::PropertyValue>& seqPropVal);
140 void insert(const css::ucb::InsertCommandArgument&,
141 const css::uno::Reference<
142 css::ucb::XCommandEnvironment>&);
147 #endif
149 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */