bump product version to 4.1.6.2
[LibreOffice.git] / ucb / source / ucp / ftp / ftpcontent.hxx
blob4573c41b5779b20508be3ef2b9d4099cd0b8f67d
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 _FTP_FTPCONTENT_HXX
21 #define _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"
29 namespace com { namespace sun { namespace star { namespace beans {
30 struct Property;
31 struct PropertyValue;
32 } } } }
34 namespace com { namespace sun { namespace star { namespace sdbc {
35 class XRow;
36 } } } }
39 namespace ftp
42 //=========================================================================
44 class FTPContentProvider;
46 //=========================================================================
48 class FTPContent
49 : public ::ucbhelper::ContentImplHelper,
50 public com::sun::star::ucb::XContentCreator
52 public:
54 FTPContent( const ::com::sun::star::uno::Reference<
55 ::com::sun::star::uno::XComponentContext >& rxContext,
56 FTPContentProvider* pProvider,
57 const ::com::sun::star::uno::Reference<
58 ::com::sun::star::ucb::XContentIdentifier >& Identifier,
59 const FTPURL& FtpUrl);
61 FTPContent( const ::com::sun::star::uno::Reference<
62 ::com::sun::star::uno::XComponentContext >& rxContext,
63 FTPContentProvider* pProvider,
64 const ::com::sun::star::uno::Reference<
65 ::com::sun::star::ucb::XContentIdentifier >& Identifier,
66 const com::sun::star::ucb::ContentInfo& aInfo);
69 virtual ~FTPContent();
71 // XInterface
72 XINTERFACE_DECL()
74 // XTypeProvider
75 XTYPEPROVIDER_DECL()
77 // XServiceInfo
78 XSERVICEINFO_DECL()
80 // XContent
81 virtual OUString SAL_CALL
82 getContentType()
83 throw( com::sun::star::uno::RuntimeException );
85 // XCommandProcessor
86 virtual com::sun::star::uno::Any SAL_CALL
87 execute( const com::sun::star::ucb::Command& aCommand,
88 sal_Int32 CommandId,
89 const com::sun::star::uno::Reference<
90 com::sun::star::ucb::XCommandEnvironment >& Environment )
91 throw( com::sun::star::uno::Exception,
92 com::sun::star::ucb::CommandAbortedException,
93 com::sun::star::uno::RuntimeException );
95 virtual void SAL_CALL
96 abort(sal_Int32 CommandId)
97 throw( com::sun::star::uno::RuntimeException);
99 // XContentCreator
100 virtual com::sun::star::uno::Sequence<
101 com::sun::star::ucb::ContentInfo > SAL_CALL
102 queryCreatableContentsInfo( )
103 throw (com::sun::star::uno::RuntimeException);
105 virtual com::sun::star::uno::Reference<
106 com::sun::star::ucb::XContent > SAL_CALL
107 createNewContent( const com::sun::star::ucb::ContentInfo& Info )
108 throw (com::sun::star::uno::RuntimeException);
110 // XChild
112 virtual ::com::sun::star::uno::Reference<
113 ::com::sun::star::uno::XInterface > SAL_CALL
114 getParent( )
115 throw (::com::sun::star::uno::RuntimeException);
117 virtual void SAL_CALL
118 setParent( const ::com::sun::star::uno::Reference<
119 ::com::sun::star::uno::XInterface >& Parent )
120 throw (::com::sun::star::lang::NoSupportException,
121 ::com::sun::star::uno::RuntimeException);
124 static com::sun::star::uno::Sequence<
125 com::sun::star::ucb::ContentInfo >
126 queryCreatableContentsInfo_Static( )
127 throw (com::sun::star::uno::RuntimeException);
129 private:
131 FTPContentProvider *m_pFCP;
132 FTPURL m_aFTPURL;
133 bool m_bInserted;
134 bool m_bTitleSet;
135 com::sun::star::ucb::ContentInfo m_aInfo;
137 virtual com::sun::star::uno::Sequence< com::sun::star::beans::Property >
138 getProperties( const com::sun::star::uno::Reference<
139 com::sun::star::ucb::XCommandEnvironment > & xEnv );
142 virtual com::sun::star::uno::Sequence<
143 com::sun::star::ucb::CommandInfo>
144 getCommands(const com::sun::star::uno::Reference<
145 com::sun::star::ucb::XCommandEnvironment > & xEnv);
148 virtual OUString getParentURL();
150 com::sun::star::uno::Reference<com::sun::star::sdbc::XRow>
151 getPropertyValues(
152 const com::sun::star::uno::Sequence<
153 com::sun::star::beans::Property>& seqProp,
154 const com::sun::star::uno::Reference<
155 com::sun::star::ucb::XCommandEnvironment >& Environment
158 com::sun::star::uno::Sequence<com::sun::star::uno::Any>
159 setPropertyValues(
160 const ::com::sun::star::uno::Sequence<
161 ::com::sun::star::beans::PropertyValue>& seqPropVal);
163 void insert(const com::sun::star::ucb::InsertCommandArgument&,
164 const com::sun::star::uno::Reference<
165 com::sun::star::ucb::XCommandEnvironment>&);
170 #endif
172 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */