Bump for 3.6-28
[LibreOffice.git] / ucb / source / ucp / ftp / ftpcontent.hxx
blob3970a22518094d10e2c9e9d2bd908e1335b9c41c
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
29 #ifndef _FTP_FTPCONTENT_HXX
30 #define _FTP_FTPCONTENT_HXX
32 #include <ucbhelper/contenthelper.hxx>
33 #include <com/sun/star/ucb/InsertCommandArgument.hpp>
34 #include <com/sun/star/ucb/XContentCreator.hpp>
35 #include "ftpurl.hxx"
38 namespace com { namespace sun { namespace star { namespace beans {
39 struct Property;
40 struct PropertyValue;
41 } } } }
43 namespace com { namespace sun { namespace star { namespace sdbc {
44 class XRow;
45 } } } }
48 namespace ftp
51 //=========================================================================
53 // UNO service name for the content.
54 #define FTP_CONTENT_SERVICE_NAME "com.sun.star.ucb.FTPContent"
56 //=========================================================================
58 class FTPContentProvider;
60 //=========================================================================
62 class FTPContent
63 : public ::ucbhelper::ContentImplHelper,
64 public com::sun::star::ucb::XContentCreator
66 public:
68 FTPContent( const ::com::sun::star::uno::Reference<
69 ::com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
70 FTPContentProvider* pProvider,
71 const ::com::sun::star::uno::Reference<
72 ::com::sun::star::ucb::XContentIdentifier >& Identifier,
73 const FTPURL& FtpUrl);
75 FTPContent( const ::com::sun::star::uno::Reference<
76 ::com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
77 FTPContentProvider* pProvider,
78 const ::com::sun::star::uno::Reference<
79 ::com::sun::star::ucb::XContentIdentifier >& Identifier,
80 const com::sun::star::ucb::ContentInfo& aInfo);
83 virtual ~FTPContent();
85 // XInterface
86 XINTERFACE_DECL()
88 // XTypeProvider
89 XTYPEPROVIDER_DECL()
91 // XServiceInfo
92 XSERVICEINFO_DECL()
94 // XContent
95 virtual rtl::OUString SAL_CALL
96 getContentType()
97 throw( com::sun::star::uno::RuntimeException );
99 // XCommandProcessor
100 virtual com::sun::star::uno::Any SAL_CALL
101 execute( const com::sun::star::ucb::Command& aCommand,
102 sal_Int32 CommandId,
103 const com::sun::star::uno::Reference<
104 com::sun::star::ucb::XCommandEnvironment >& Environment )
105 throw( com::sun::star::uno::Exception,
106 com::sun::star::ucb::CommandAbortedException,
107 com::sun::star::uno::RuntimeException );
109 virtual void SAL_CALL
110 abort(sal_Int32 CommandId)
111 throw( com::sun::star::uno::RuntimeException);
113 // XContentCreator
114 virtual com::sun::star::uno::Sequence<
115 com::sun::star::ucb::ContentInfo > SAL_CALL
116 queryCreatableContentsInfo( )
117 throw (com::sun::star::uno::RuntimeException);
119 virtual com::sun::star::uno::Reference<
120 com::sun::star::ucb::XContent > SAL_CALL
121 createNewContent( const com::sun::star::ucb::ContentInfo& Info )
122 throw (com::sun::star::uno::RuntimeException);
124 // XChild
126 virtual ::com::sun::star::uno::Reference<
127 ::com::sun::star::uno::XInterface > SAL_CALL
128 getParent( )
129 throw (::com::sun::star::uno::RuntimeException);
131 virtual void SAL_CALL
132 setParent( const ::com::sun::star::uno::Reference<
133 ::com::sun::star::uno::XInterface >& Parent )
134 throw (::com::sun::star::lang::NoSupportException,
135 ::com::sun::star::uno::RuntimeException);
138 static com::sun::star::uno::Sequence<
139 com::sun::star::ucb::ContentInfo >
140 queryCreatableContentsInfo_Static( )
141 throw (com::sun::star::uno::RuntimeException);
143 private:
145 FTPContentProvider *m_pFCP;
146 FTPURL m_aFTPURL;
147 bool m_bInserted;
148 bool m_bTitleSet;
149 com::sun::star::ucb::ContentInfo m_aInfo;
151 virtual com::sun::star::uno::Sequence< com::sun::star::beans::Property >
152 getProperties( const com::sun::star::uno::Reference<
153 com::sun::star::ucb::XCommandEnvironment > & xEnv );
156 virtual com::sun::star::uno::Sequence<
157 com::sun::star::ucb::CommandInfo>
158 getCommands(const com::sun::star::uno::Reference<
159 com::sun::star::ucb::XCommandEnvironment > & xEnv);
162 virtual ::rtl::OUString getParentURL();
164 com::sun::star::uno::Reference<com::sun::star::sdbc::XRow>
165 getPropertyValues(
166 const com::sun::star::uno::Sequence<
167 com::sun::star::beans::Property>& seqProp,
168 const com::sun::star::uno::Reference<
169 com::sun::star::ucb::XCommandEnvironment >& Environment
172 com::sun::star::uno::Sequence<com::sun::star::uno::Any>
173 setPropertyValues(
174 const ::com::sun::star::uno::Sequence<
175 ::com::sun::star::beans::PropertyValue>& seqPropVal);
177 void insert(const com::sun::star::ucb::InsertCommandArgument&,
178 const com::sun::star::uno::Reference<
179 com::sun::star::ucb::XCommandEnvironment>&);
184 #endif
186 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */