bump product version to 5.0.4.1
[LibreOffice.git] / ucb / source / ucp / ftp / ftpcontent.hxx
blob265771ba1e3ca1874e1b861dacac8dfb5ad4550f
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();
65 // XInterface
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()
69 throw() SAL_OVERRIDE;
70 virtual void SAL_CALL release()
71 throw() SAL_OVERRIDE;
73 // XTypeProvider
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;
81 // XServiceInfo
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 );
96 // XContent
97 virtual OUString SAL_CALL getContentType()
98 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
100 // XCommandProcessor
101 virtual css::uno::Any SAL_CALL execute( const css::ucb::Command& aCommand,
102 sal_Int32 CommandId,
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;
112 // XContentCreator
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;
123 // XChild
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);
135 private:
137 FTPContentProvider *m_pFCP;
138 FTPURL m_aFTPURL;
139 bool m_bInserted;
140 bool m_bTitleSet;
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>
156 getPropertyValues(
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>&);
174 #endif
176 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */