fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / xmlhelp / source / cxxhelp / provider / content.hxx
blob98b80dcee5416dd7b2f85963c209103e00f362bf
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 _CONTENT_HXX
21 #define _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 //=========================================================================
42 // UNO service name for the content.
43 #define MYUCP_CONTENT_SERVICE_NAME \
44 "com.sun.star.ucb.CHelpContent"
46 //=========================================================================
48 class Databases;
50 struct ContentProperties
52 OUString aTitle; // Title
53 OUString aContentType; // ContentType
55 ContentProperties() {}
58 //=========================================================================
60 class Content : public ::ucbhelper::ContentImplHelper
62 public:
64 Content( const ::com::sun::star::uno::Reference<
65 ::com::sun::star::uno::XComponentContext >& rxContext,
66 ::ucbhelper::ContentProviderImplHelper* pProvider,
67 const ::com::sun::star::uno::Reference<
68 ::com::sun::star::ucb::XContentIdentifier >& Identifier,
69 Databases* pDatabases );
71 virtual ~Content();
73 // XInterface
74 XINTERFACE_DECL()
76 // XTypeProvider
77 XTYPEPROVIDER_DECL()
79 // XServiceInfo
80 virtual OUString SAL_CALL
81 getImplementationName()
82 throw( ::com::sun::star::uno::RuntimeException );
84 virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL
85 getSupportedServiceNames()
86 throw( ::com::sun::star::uno::RuntimeException );
88 // XContent
89 virtual OUString SAL_CALL
90 getContentType()
91 throw( com::sun::star::uno::RuntimeException );
93 // XCommandProcessor
94 virtual com::sun::star::uno::Any SAL_CALL
95 execute( const com::sun::star::ucb::Command& aCommand,
96 sal_Int32 CommandId,
97 const com::sun::star::uno::Reference<
98 com::sun::star::ucb::XCommandEnvironment >& Environment )
99 throw( com::sun::star::uno::Exception,
100 com::sun::star::ucb::CommandAbortedException,
101 com::sun::star::uno::RuntimeException );
103 virtual void SAL_CALL
104 abort( sal_Int32 CommandId )
105 throw( com::sun::star::uno::RuntimeException );
108 private:
110 // private members;
112 ContentProperties m_aProps;
113 URLParameter m_aURLParameter;
114 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 );
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 );
126 virtual OUString getParentURL() { 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 );
140 #endif
142 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */