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();
66 virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type
& rType
)
67 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
68 virtual void SAL_CALL
acquire()
70 virtual void SAL_CALL
release()
74 virtual css::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId()
75 throw( css::uno::RuntimeException
,
76 std::exception
) SAL_OVERRIDE
;
77 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
getTypes()
78 throw( css::uno::RuntimeException
,
79 std::exception
) SAL_OVERRIDE
;
82 virtual OUString SAL_CALL
getImplementationName()
83 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
84 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
)
85 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
86 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
87 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
89 static OUString
getImplementationName_Static();
90 static css::uno::Sequence
< OUString
> getSupportedServiceNames_Static();
92 static css::uno::Reference
< css::lang::XSingleServiceFactory
>
93 createServiceFactory( const css::uno::Reference
<
94 css::lang::XMultiServiceFactory
>& rxServiceMgr
);
97 virtual OUString SAL_CALL
getContentType()
98 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
101 virtual css::uno::Any SAL_CALL
execute( const css::ucb::Command
& aCommand
,
103 const css::uno::Reference
<
104 css::ucb::XCommandEnvironment
>& Environment
)
105 throw( css::uno::Exception
,
106 css::ucb::CommandAbortedException
,
107 css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
109 virtual void SAL_CALL
abort(sal_Int32 CommandId
)
110 throw( css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
113 virtual css::uno::Sequence
<
114 css::ucb::ContentInfo
> SAL_CALL
115 queryCreatableContentsInfo( )
116 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
118 virtual css::uno::Reference
<
119 css::ucb::XContent
> SAL_CALL
120 createNewContent( const css::ucb::ContentInfo
& Info
)
121 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
125 virtual css::uno::Reference
< css::uno::XInterface
> SAL_CALL
getParent( )
126 throw (css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
128 virtual void SAL_CALL
setParent( const css::uno::Reference
< css::uno::XInterface
>& Parent
)
129 throw (css::lang::NoSupportException
,
130 css::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
132 static css::uno::Sequence
< css::ucb::ContentInfo
> queryCreatableContentsInfo_Static()
133 throw (css::uno::RuntimeException
);
137 FTPContentProvider
*m_pFCP
;
141 css::ucb::ContentInfo m_aInfo
;
143 virtual css::uno::Sequence
< css::beans::Property
>
144 getProperties( const css::uno::Reference
<
145 css::ucb::XCommandEnvironment
> & xEnv
) SAL_OVERRIDE
;
148 virtual css::uno::Sequence
< css::ucb::CommandInfo
>
149 getCommands(const css::uno::Reference
<
150 css::ucb::XCommandEnvironment
> & xEnv
) SAL_OVERRIDE
;
153 virtual OUString
getParentURL() SAL_OVERRIDE
;
155 css::uno::Reference
<css::sdbc::XRow
>
157 const css::uno::Sequence
<
158 css::beans::Property
>& seqProp
,
159 const css::uno::Reference
<
160 css::ucb::XCommandEnvironment
>& Environment
163 css::uno::Sequence
<css::uno::Any
>
164 setPropertyValues( const css::uno::Sequence
<
165 css::beans::PropertyValue
>& seqPropVal
);
167 void insert(const css::ucb::InsertCommandArgument
&,
168 const css::uno::Reference
<
169 css::ucb::XCommandEnvironment
>&);
176 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */