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>
34 //============================================================================
36 // class PropertySetInfo.
38 //============================================================================
40 class ContentImplHelper
;
43 * This class provides a propertyset info ( the complete implementation of
44 * the interface XPropertySetInfo ) for an object derived from class
45 * ucb::ContentImplHelper. The implementation takes care about Additional
46 * Core Properties that may have been added to the content.
48 class PropertySetInfo
:
49 public cppu::OWeakObject
,
50 public com::sun::star::lang::XTypeProvider
,
51 public com::sun::star::beans::XPropertySetInfo
53 com::sun::star::uno::Reference
< com::sun::star::ucb::XCommandEnvironment
>
55 com::sun::star::uno::Sequence
< com::sun::star::beans::Property
>*
58 ContentImplHelper
* m_pContent
;
61 sal_Bool
queryProperty( const OUString
& rName
,
62 com::sun::star::beans::Property
& rProp
);
65 PropertySetInfo( const com::sun::star::uno::Reference
<
66 com::sun::star::ucb::XCommandEnvironment
>& rxEnv
,
67 ContentImplHelper
* pContent
);
68 virtual ~PropertySetInfo();
77 virtual com::sun::star::uno::Sequence
<
78 com::sun::star::beans::Property
> SAL_CALL
80 throw( com::sun::star::uno::RuntimeException
);
81 virtual com::sun::star::beans::Property SAL_CALL
82 getPropertyByName( const OUString
& aName
)
83 throw( com::sun::star::beans::UnknownPropertyException
,
84 com::sun::star::uno::RuntimeException
);
85 virtual sal_Bool SAL_CALL
86 hasPropertyByName( const OUString
& Name
)
87 throw( com::sun::star::uno::RuntimeException
);
89 // Non-Interface methods.
93 //============================================================================
95 // class CommandProcessorInfo.
97 //============================================================================
100 * This class provides a command info ( the complete implementation of
101 * the interface XCommandInfo ) for an object derived from class
102 * ucb::ContentImplHelper.
104 class CommandProcessorInfo
:
105 public cppu::OWeakObject
,
106 public com::sun::star::lang::XTypeProvider
,
107 public com::sun::star::ucb::XCommandInfo
109 com::sun::star::uno::Reference
< com::sun::star::ucb::XCommandEnvironment
>
111 com::sun::star::uno::Sequence
< com::sun::star::ucb::CommandInfo
>*
114 ContentImplHelper
* m_pContent
;
117 sal_Bool
queryCommand( const OUString
& rName
,
118 com::sun::star::ucb::CommandInfo
& rCommand
);
119 sal_Bool
queryCommand( sal_Int32 nHandle
,
120 com::sun::star::ucb::CommandInfo
& rCommand
);
123 CommandProcessorInfo( const com::sun::star::uno::Reference
<
124 com::sun::star::ucb::XCommandEnvironment
>& rxEnv
,
125 ContentImplHelper
* pContent
);
126 virtual ~CommandProcessorInfo();
135 virtual com::sun::star::uno::Sequence
<
136 com::sun::star::ucb::CommandInfo
> SAL_CALL
138 throw( com::sun::star::uno::RuntimeException
);
139 virtual com::sun::star::ucb::CommandInfo SAL_CALL
140 getCommandInfoByName( const OUString
& Name
)
141 throw( com::sun::star::ucb::UnsupportedCommandException
,
142 com::sun::star::uno::RuntimeException
);
143 virtual com::sun::star::ucb::CommandInfo SAL_CALL
144 getCommandInfoByHandle( sal_Int32 Handle
)
145 throw( com::sun::star::ucb::UnsupportedCommandException
,
146 com::sun::star::uno::RuntimeException
);
147 virtual sal_Bool SAL_CALL
148 hasCommandByName( const OUString
& Name
)
149 throw( com::sun::star::uno::RuntimeException
);
150 virtual sal_Bool SAL_CALL
151 hasCommandByHandle( sal_Int32 Handle
)
152 throw( com::sun::star::uno::RuntimeException
);
154 // Non-Interface methods.
158 } // namespace ucbhelper
160 #endif /* ! INCLUDED_UCBHELPER_CONTENTINFO_HXX */
162 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */