1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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>
28 namespace com
{ namespace sun
{ namespace star
{ namespace beans
{
33 namespace com
{ namespace sun
{ namespace star
{ namespace sdbc
{
41 class FTPContentProvider
;
43 class FTPContent
: public ::ucbhelper::ContentImplHelper
,
44 public css::ucb::XContentCreator
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
;
66 virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type
& rType
) override
;
67 virtual void SAL_CALL
acquire()
69 virtual void SAL_CALL
release()
73 virtual css::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId() override
;
74 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
getTypes() override
;
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
;
82 virtual OUString SAL_CALL
getContentType() override
;
85 virtual css::uno::Any SAL_CALL
execute( const css::ucb::Command
& aCommand
,
87 const css::uno::Reference
<
88 css::ucb::XCommandEnvironment
>& Environment
) override
;
90 virtual void SAL_CALL
abort(sal_Int32 CommandId
) override
;
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
;
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();
112 FTPContentProvider
*m_pFCP
;
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
>
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
>&);
149 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */