LibreOffice Module ucb (master)  1
ucpext_content.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #ifndef INCLUDED_UCB_SOURCE_UCP_EXT_UCPEXT_CONTENT_HXX
21 #define INCLUDED_UCB_SOURCE_UCP_EXT_UCPEXT_CONTENT_HXX
22 
23 #include <com/sun/star/sdbc/XRow.hpp>
24 #include <com/sun/star/beans/PropertyValue.hpp>
25 
27 
28 #include <boost/optional.hpp>
29 
30 
31 namespace ucb { namespace ucp { namespace ext
32 {
33 
34 
35  //= ExtensionContentType
36 
38  {
42 
44  };
45 
46 
47  //= ContentProvider
48 
49  typedef ::ucbhelper::ContentImplHelper Content_Base;
50  class Content : public Content_Base
51  {
52  public:
53  Content(
54  const css::uno::Reference< css::uno::XComponentContext >& rxContext,
56  const css::uno::Reference< css::ucb::XContentIdentifier >& Identifier
57  );
58 
59  static css::uno::Reference< css::sdbc::XRow >
61  const css::uno::Reference< css::uno::XComponentContext >& rxContext,
62  const css::uno::Sequence< css::beans::Property >& rProperties,
63  const OUString& rTitle
64  );
65 
66  css::uno::Reference< css::sdbc::XRow >
68  const css::uno::Sequence< css::beans::Property >& rProperties,
69  const css::uno::Reference< css::ucb::XCommandEnvironment >& xEnv
70  );
71 
72  static OUString
73  encodeIdentifier( const OUString& i_rIdentifier );
74  static OUString
75  decodeIdentifier( const OUString& i_rIdentifier );
76 
77  virtual OUString getParentURL() override;
78 
80 
84  OUString getPhysicalURL() const;
85 
86  protected:
87  virtual ~Content() override;
88 
89  // XServiceInfo
90  virtual OUString SAL_CALL getImplementationName( ) override;
91  virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
92 
93  // XContent
94  virtual OUString SAL_CALL getContentType() override;
95 
96  // XCommandProcessor
97  virtual css::uno::Any SAL_CALL
98  execute(
99  const css::ucb::Command& aCommand,
100  sal_Int32 CommandId,
101  const css::uno::Reference< css::ucb::XCommandEnvironment >& Environment
102  ) override;
103 
104  virtual void SAL_CALL
105  abort(
106  sal_Int32 CommandId
107  ) override;
108 
109  private:
110  virtual css::uno::Sequence< css::beans::Property > getProperties( const css::uno::Reference< css::ucb::XCommandEnvironment >& i_rEnv ) override;
111  virtual css::uno::Sequence< css::ucb::CommandInfo > getCommands( const css::uno::Reference< css::ucb::XCommandEnvironment >& i_rEnv ) override;
112 
113  css::uno::Sequence< css::uno::Any >
115  const css::uno::Sequence< css::beans::PropertyValue >& rValues
116  );
117 
118  static bool denotesRootContent( const OUString& i_rContentIdentifier );
119 
120  bool impl_isFolder();
122 
123  private:
127  OUString m_sExtensionId;
129  };
130 
131 
132 } } } // namespace ucb::ucp::ext
133 
134 
135 #endif // INCLUDED_UCB_SOURCE_UCP_EXT_UCPEXT_CONTENT_HXX
136 
137 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static bool denotesRootContent(const OUString &i_rContentIdentifier)
::boost::optional< OUString > m_aContentType
virtual void SAL_CALL abort(sal_Int32 CommandId) override
virtual OUString getParentURL() override
virtual css::uno::Any SAL_CALL execute(const css::ucb::Command &aCommand, sal_Int32 CommandId, const css::uno::Reference< css::ucb::XCommandEnvironment > &Environment) override
OUString getPhysicalURL() const
retrieves the URL of the underlying physical content.
virtual css::uno::Sequence< css::beans::Property > getProperties(const css::uno::Reference< css::ucb::XCommandEnvironment > &i_rEnv) override
virtual OUString SAL_CALL getContentType() override
static css::uno::Reference< css::sdbc::XRow > getArtificialNodePropertyValues(const css::uno::Reference< css::uno::XComponentContext > &rxContext, const css::uno::Sequence< css::beans::Property > &rProperties, const OUString &rTitle)
virtual css::uno::Sequence< css::ucb::CommandInfo > getCommands(const css::uno::Reference< css::ucb::XCommandEnvironment > &i_rEnv) override
::ucbhelper::ContentImplHelper Content_Base
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
ExtensionContentType m_eExtContentType
Content(const css::uno::Reference< css::uno::XComponentContext > &rxContext,::ucbhelper::ContentProviderImplHelper *pProvider, const css::uno::Reference< css::ucb::XContentIdentifier > &Identifier)
ExtensionContentType getExtensionContentType() const
static OUString encodeIdentifier(const OUString &i_rIdentifier)
css::uno::Sequence< css::uno::Any > setPropertyValues(const css::uno::Sequence< css::beans::PropertyValue > &rValues)
::boost::optional< bool > m_aIsFolder
virtual ~Content() override
virtual OUString SAL_CALL getImplementationName() override
css::uno::Reference< css::sdbc::XRow > getPropertyValues(const css::uno::Sequence< css::beans::Property > &rProperties, const css::uno::Reference< css::ucb::XCommandEnvironment > &xEnv)
static OUString decodeIdentifier(const OUString &i_rIdentifier)