1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
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
{
33 namespace com
{ namespace sun
{ namespace star
{ namespace sdbc
{
40 //=========================================================================
42 // UNO service name for the content.
43 #define MYUCP_CONTENT_SERVICE_NAME \
44 "com.sun.star.ucb.CHelpContent"
46 //=========================================================================
50 struct ContentProperties
52 OUString aTitle
; // Title
53 OUString aContentType
; // ContentType
55 ContentProperties() {}
58 //=========================================================================
60 class Content
: public ::ucbhelper::ContentImplHelper
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
);
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
);
89 virtual OUString SAL_CALL
91 throw( com::sun::star::uno::RuntimeException
);
94 virtual com::sun::star::uno::Any SAL_CALL
95 execute( const com::sun::star::ucb::Command
& aCommand
,
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
);
112 ContentProperties m_aProps
;
113 URLParameter m_aURLParameter
;
114 Databases
* m_pDatabases
;
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
);
142 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */