bump product version to 5.0.4.1
[LibreOffice.git] / xmlhelp / source / cxxhelp / provider / content.hxx
blob542b69ba29c0c97bc5d255d29cb095ce44e38f03
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_XMLHELP_SOURCE_CXXHELP_PROVIDER_CONTENT_HXX
21 #define INCLUDED_XMLHELP_SOURCE_CXXHELP_PROVIDER_CONTENT_HXX
23 #include <ucbhelper/contenthelper.hxx>
24 #include <com/sun/star/io/XInputStream.hpp>
26 #include "urlparameter.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 } } } }
37 namespace chelp
40 // UNO service name for the content.
41 #define MYUCP_CONTENT_SERVICE_NAME \
42 "com.sun.star.ucb.CHelpContent"
44 class Databases;
46 struct ContentProperties
48 OUString aTitle; // Title
49 OUString aContentType; // ContentType
51 ContentProperties() {}
54 class Content : public ::ucbhelper::ContentImplHelper
56 public:
58 Content( const ::com::sun::star::uno::Reference<
59 ::com::sun::star::uno::XComponentContext >& rxContext,
60 ::ucbhelper::ContentProviderImplHelper* pProvider,
61 const ::com::sun::star::uno::Reference<
62 ::com::sun::star::ucb::XContentIdentifier >& Identifier,
63 Databases* pDatabases );
65 virtual ~Content();
67 // XInterface
68 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType )
69 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
70 virtual void SAL_CALL acquire()
71 throw() SAL_OVERRIDE;
72 virtual void SAL_CALL release()
73 throw() SAL_OVERRIDE;
75 // XTypeProvider
76 virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId()
77 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
78 virtual css::uno::Sequence< com::sun::star::uno::Type > SAL_CALL getTypes()
79 throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
81 // XServiceInfo
82 virtual OUString SAL_CALL
83 getImplementationName()
84 throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
86 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL
87 getSupportedServiceNames()
88 throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
90 // XContent
91 virtual OUString SAL_CALL
92 getContentType()
93 throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
95 // XCommandProcessor
96 virtual com::sun::star::uno::Any SAL_CALL
97 execute( const com::sun::star::ucb::Command& aCommand,
98 sal_Int32 CommandId,
99 const com::sun::star::uno::Reference<
100 com::sun::star::ucb::XCommandEnvironment >& Environment )
101 throw( com::sun::star::uno::Exception,
102 com::sun::star::ucb::CommandAbortedException,
103 com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
105 virtual void SAL_CALL
106 abort( sal_Int32 CommandId )
107 throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
109 private:
111 // private members;
113 ContentProperties m_aProps;
114 URLParameter m_aURLParameter;
115 Databases* m_pDatabases;
117 // private methods
119 virtual com::sun::star::uno::Sequence< com::sun::star::beans::Property >
120 getProperties( const com::sun::star::uno::Reference<
121 com::sun::star::ucb::XCommandEnvironment > & xEnv ) SAL_OVERRIDE;
122 virtual com::sun::star::uno::Sequence< com::sun::star::ucb::CommandInfo >
123 getCommands( const com::sun::star::uno::Reference<
124 com::sun::star::ucb::XCommandEnvironment > & xEnv ) SAL_OVERRIDE;
126 virtual OUString getParentURL() SAL_OVERRIDE { return OUString(); }
128 ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow >
129 getPropertyValues( const ::com::sun::star::uno::Sequence<
130 ::com::sun::star::beans::Property >& rProperties );
131 void setPropertyValues(
132 const ::com::sun::star::uno::Sequence<
133 ::com::sun::star::beans::PropertyValue >& rValues );
139 #endif
141 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */