fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / ucb / source / ucp / ext / ucpext_content.hxx
blob40594f2114656f6b897e5b6b718d94df610b572c
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_EXT_UCPEXT_CONTENT_HXX
21 #define INCLUDED_UCB_SOURCE_UCP_EXT_UCPEXT_CONTENT_HXX
23 #include <com/sun/star/sdbc/XRow.hpp>
24 #include <com/sun/star/beans/PropertyValue.hpp>
26 #include <rtl/ref.hxx>
27 #include <ucbhelper/contenthelper.hxx>
29 #include <list>
30 #include <boost/optional.hpp>
33 namespace ucb { namespace ucp { namespace ext
38 //= ExtensionContentType
40 enum ExtensionContentType
42 E_ROOT,
43 E_EXTENSION_ROOT,
44 E_EXTENSION_CONTENT,
46 E_UNKNOWN
50 //= ContentProvider
52 typedef ::ucbhelper::ContentImplHelper Content_Base;
53 class Content : public Content_Base
55 public:
56 Content(
57 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
58 ::ucbhelper::ContentProviderImplHelper* pProvider,
59 const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContentIdentifier >& Identifier
62 static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow >
63 getArtificialNodePropertyValues(
64 const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
65 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& rProperties,
66 const OUString& rTitle
69 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow >
70 getPropertyValues(
71 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& rProperties,
72 const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& xEnv
75 static OUString
76 encodeIdentifier( const OUString& i_rIdentifier );
77 static OUString
78 decodeIdentifier( const OUString& i_rIdentifier );
80 virtual OUString getParentURL() SAL_OVERRIDE;
82 ExtensionContentType getExtensionContentType() const { return m_eExtContentType; }
84 /** retrieves the URL of the underlying physical content. Not to be called when getExtensionContentType()
85 returns E_ROOT.
87 OUString getPhysicalURL() const;
89 protected:
90 virtual ~Content();
92 // XServiceInfo
93 virtual OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
94 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
96 // XContent
97 virtual OUString SAL_CALL getContentType() throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
99 // XCommandProcessor
100 virtual com::sun::star::uno::Any SAL_CALL
101 execute(
102 const com::sun::star::ucb::Command& aCommand,
103 sal_Int32 CommandId,
104 const com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >& Environment
106 throw ( ::com::sun::star::uno::Exception
107 , ::com::sun::star::ucb::CommandAbortedException
108 , ::com::sun::star::uno::RuntimeException, std::exception
109 ) SAL_OVERRIDE;
111 virtual void SAL_CALL
112 abort(
113 sal_Int32 CommandId
115 throw ( ::com::sun::star::uno::RuntimeException, std::exception
116 ) SAL_OVERRIDE;
118 private:
119 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > getProperties( const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& i_rEnv ) SAL_OVERRIDE;
120 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::ucb::CommandInfo > getCommands( const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& i_rEnv ) SAL_OVERRIDE;
122 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >
123 setPropertyValues(
124 const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rValues,
125 const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >& xEnv
128 static bool denotesRootContent( const OUString& i_rContentIdentifier );
130 bool impl_isFolder();
131 void impl_determineContentType();
133 private:
134 ExtensionContentType m_eExtContentType;
135 ::boost::optional< bool > m_aIsFolder;
136 ::boost::optional< OUString > m_aContentType;
137 OUString m_sExtensionId;
138 OUString m_sPathIntoExtension;
142 } } } // namespace ucb::ucp::ext
145 #endif // INCLUDED_UCB_SOURCE_UCP_EXT_UCPEXT_CONTENT_HXX
147 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */