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
23 #include <com/sun/star/ucb/XCommandInfo.hpp>
24 #include <com/sun/star/ucb/XCommandEnvironment.hpp>
25 #include <com/sun/star/lang/XTypeProvider.hpp>
26 #include <com/sun/star/beans/XPropertySetInfo.hpp>
27 #include <cppuhelper/weak.hxx>
29 #include <osl/mutex.hxx>
30 #include <ucbhelper/macros.hxx>
35 // class PropertySetInfo.
38 class ContentImplHelper
;
41 * This class provides a propertyset info ( the complete implementation of
42 * the interface XPropertySetInfo ) for an object derived from class
43 * ucb::ContentImplHelper. The implementation takes care about Additional
44 * Core Properties that may have been added to the content.
46 class PropertySetInfo
:
47 public cppu::OWeakObject
,
48 public css::lang::XTypeProvider
,
49 public css::beans::XPropertySetInfo
51 css::uno::Reference
< css::ucb::XCommandEnvironment
>
53 css::uno::Sequence
< css::beans::Property
>*
56 ContentImplHelper
* m_pContent
;
59 bool queryProperty( const OUString
& rName
,
60 css::beans::Property
& rProp
);
63 PropertySetInfo( const css::uno::Reference
< css::ucb::XCommandEnvironment
>& rxEnv
,
64 ContentImplHelper
* pContent
);
65 virtual ~PropertySetInfo() override
;
68 virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type
& rType
)
69 throw( css::uno::RuntimeException
, std::exception
) override
;
70 virtual void SAL_CALL
acquire()
72 virtual void SAL_CALL
release()
76 virtual css::uno::Sequence
< sal_Int8
> SAL_CALL
78 throw( css::uno::RuntimeException
, std::exception
) override
;
79 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
81 throw( css::uno::RuntimeException
, std::exception
) override
;
84 virtual css::uno::Sequence
<
85 css::beans::Property
> SAL_CALL
87 throw( css::uno::RuntimeException
, std::exception
) override
;
88 virtual css::beans::Property SAL_CALL
89 getPropertyByName( const OUString
& aName
)
90 throw( css::beans::UnknownPropertyException
,
91 css::uno::RuntimeException
, std::exception
) override
;
92 virtual sal_Bool SAL_CALL
93 hasPropertyByName( const OUString
& Name
)
94 throw( css::uno::RuntimeException
, std::exception
) override
;
96 // Non-Interface methods.
101 // class CommandProcessorInfo.
105 * This class provides a command info ( the complete implementation of
106 * the interface XCommandInfo ) for an object derived from class
107 * ucb::ContentImplHelper.
109 class CommandProcessorInfo
:
110 public cppu::OWeakObject
,
111 public css::lang::XTypeProvider
,
112 public css::ucb::XCommandInfo
114 css::uno::Reference
< css::ucb::XCommandEnvironment
>
116 css::uno::Sequence
< css::ucb::CommandInfo
>*
119 ContentImplHelper
* m_pContent
;
122 bool queryCommand( const OUString
& rName
,
123 css::ucb::CommandInfo
& rCommand
);
124 bool queryCommand( sal_Int32 nHandle
,
125 css::ucb::CommandInfo
& rCommand
);
128 CommandProcessorInfo( const css::uno::Reference
< css::ucb::XCommandEnvironment
>& rxEnv
,
129 ContentImplHelper
* pContent
);
130 virtual ~CommandProcessorInfo() override
;
133 virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type
& rType
)
134 throw( css::uno::RuntimeException
, std::exception
) override
;
135 virtual void SAL_CALL
acquire()
137 virtual void SAL_CALL
release()
141 virtual css::uno::Sequence
< sal_Int8
> SAL_CALL
142 getImplementationId()
143 throw( css::uno::RuntimeException
, std::exception
) override
;
144 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
146 throw( css::uno::RuntimeException
, std::exception
) override
;
149 virtual css::uno::Sequence
<
150 css::ucb::CommandInfo
> SAL_CALL
152 throw( css::uno::RuntimeException
, std::exception
) override
;
153 virtual css::ucb::CommandInfo SAL_CALL
154 getCommandInfoByName( const OUString
& Name
)
155 throw( css::ucb::UnsupportedCommandException
,
156 css::uno::RuntimeException
, std::exception
) override
;
157 virtual css::ucb::CommandInfo SAL_CALL
158 getCommandInfoByHandle( sal_Int32 Handle
)
159 throw( css::ucb::UnsupportedCommandException
,
160 css::uno::RuntimeException
, std::exception
) override
;
161 virtual sal_Bool SAL_CALL
162 hasCommandByName( const OUString
& Name
)
163 throw( css::uno::RuntimeException
, std::exception
) override
;
164 virtual sal_Bool SAL_CALL
165 hasCommandByHandle( sal_Int32 Handle
)
166 throw( css::uno::RuntimeException
, std::exception
) override
;
168 // Non-Interface methods.
172 } // namespace ucbhelper
174 #endif /* ! INCLUDED_UCBHELPER_CONTENTINFO_HXX */
176 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */