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 .
20 #ifndef INCLUDED_UCBHELPER_CONTENTINFO_HXX
21 #define INCLUDED_UCBHELPER_CONTENTINFO_HXX
24 #include <com/sun/star/ucb/XCommandInfo.hpp>
25 #include <com/sun/star/ucb/XCommandEnvironment.hpp>
26 #include <com/sun/star/lang/XTypeProvider.hpp>
27 #include <com/sun/star/beans/XPropertySetInfo.hpp>
28 #include <cppuhelper/weak.hxx>
30 #include <osl/mutex.hxx>
31 #include <ucbhelper/macros.hxx>
36 // class PropertySetInfo.
39 class ContentImplHelper
;
42 * This class provides a propertyset info ( the complete implementation of
43 * the interface XPropertySetInfo ) for an object derived from class
44 * ucb::ContentImplHelper. The implementation takes care about Additional
45 * Core Properties that may have been added to the content.
47 class PropertySetInfo
:
48 public cppu::OWeakObject
,
49 public css::lang::XTypeProvider
,
50 public css::beans::XPropertySetInfo
52 css::uno::Reference
< css::ucb::XCommandEnvironment
>
54 std::unique_ptr
<css::uno::Sequence
< css::beans::Property
>>
57 ContentImplHelper
* m_pContent
;
60 bool queryProperty( const OUString
& rName
,
61 css::beans::Property
& rProp
);
64 PropertySetInfo( const css::uno::Reference
< css::ucb::XCommandEnvironment
>& rxEnv
,
65 ContentImplHelper
* pContent
);
66 virtual ~PropertySetInfo() override
;
69 virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type
& rType
) override
;
70 virtual void SAL_CALL
acquire()
72 virtual void SAL_CALL
release()
76 virtual css::uno::Sequence
< sal_Int8
> SAL_CALL
77 getImplementationId() override
;
78 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
82 virtual css::uno::Sequence
<
83 css::beans::Property
> SAL_CALL
84 getProperties() override
;
85 virtual css::beans::Property SAL_CALL
86 getPropertyByName( const OUString
& aName
) override
;
87 virtual sal_Bool SAL_CALL
88 hasPropertyByName( const OUString
& Name
) override
;
90 // Non-Interface methods.
95 // class CommandProcessorInfo.
99 * This class provides a command info ( the complete implementation of
100 * the interface XCommandInfo ) for an object derived from class
101 * ucb::ContentImplHelper.
103 class CommandProcessorInfo
:
104 public cppu::OWeakObject
,
105 public css::lang::XTypeProvider
,
106 public css::ucb::XCommandInfo
108 css::uno::Reference
< css::ucb::XCommandEnvironment
>
110 std::unique_ptr
<css::uno::Sequence
< css::ucb::CommandInfo
>>
113 ContentImplHelper
* m_pContent
;
116 bool queryCommand( const OUString
& rName
,
117 css::ucb::CommandInfo
& rCommand
);
118 bool queryCommand( sal_Int32 nHandle
,
119 css::ucb::CommandInfo
& rCommand
);
122 CommandProcessorInfo( const css::uno::Reference
< css::ucb::XCommandEnvironment
>& rxEnv
,
123 ContentImplHelper
* pContent
);
124 virtual ~CommandProcessorInfo() override
;
127 virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type
& rType
) override
;
128 virtual void SAL_CALL
acquire()
130 virtual void SAL_CALL
release()
134 virtual css::uno::Sequence
< sal_Int8
> SAL_CALL
135 getImplementationId() override
;
136 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
140 virtual css::uno::Sequence
<
141 css::ucb::CommandInfo
> SAL_CALL
142 getCommands() override
;
143 virtual css::ucb::CommandInfo SAL_CALL
144 getCommandInfoByName( const OUString
& Name
) override
;
145 virtual css::ucb::CommandInfo SAL_CALL
146 getCommandInfoByHandle( sal_Int32 Handle
) override
;
147 virtual sal_Bool SAL_CALL
148 hasCommandByName( const OUString
& Name
) override
;
149 virtual sal_Bool SAL_CALL
150 hasCommandByHandle( sal_Int32 Handle
) override
;
152 // Non-Interface methods.
156 } // namespace ucbhelper
158 #endif /* ! INCLUDED_UCBHELPER_CONTENTINFO_HXX */
160 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */