bump product version to 4.1.6.2
[LibreOffice.git] / ucb / source / ucp / hierarchy / hierarchydatasource.hxx
blob752e8a659aa02b657a491086690047cf4b02249f
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 _HIERARCHYDATASOURCE_HXX
21 #define _HIERARCHYDATASOURCE_HXX
23 #include <osl/mutex.hxx>
24 #include <com/sun/star/lang/XComponent.hpp>
25 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
26 #include <com/sun/star/lang/XServiceInfo.hpp>
27 #include <com/sun/star/lang/XTypeProvider.hpp>
28 #include <com/sun/star/uno/XComponentContext.hpp>
29 #include <cppuhelper/weak.hxx>
30 #include <ucbhelper/macros.hxx>
32 namespace cppu { class OInterfaceContainerHelper; }
34 namespace hierarchy_ucp {
36 //=========================================================================
38 class HierarchyDataSource : public cppu::OWeakObject,
39 public com::sun::star::lang::XServiceInfo,
40 public com::sun::star::lang::XTypeProvider,
41 public com::sun::star::lang::XComponent,
42 public com::sun::star::lang::XMultiServiceFactory
44 osl::Mutex m_aMutex;
45 com::sun::star::uno::Reference<
46 com::sun::star::uno::XComponentContext > m_xContext;
47 com::sun::star::uno::Reference<
48 com::sun::star::lang::XMultiServiceFactory > m_xConfigProvider;
49 cppu::OInterfaceContainerHelper * m_pDisposeEventListeners;
51 public:
52 HierarchyDataSource( const com::sun::star::uno::Reference<
53 com::sun::star::uno::XComponentContext > &
54 rxContext );
55 virtual ~HierarchyDataSource();
57 // XInterface
58 XINTERFACE_DECL()
60 // XServiceInfo
61 XSERVICEINFO_DECL()
63 // XTypeProvider
64 XTYPEPROVIDER_DECL()
66 // XComponent
67 virtual void SAL_CALL
68 dispose()
69 throw ( com::sun::star::uno::RuntimeException );
70 virtual void SAL_CALL
71 addEventListener( const com::sun::star::uno::Reference<
72 com::sun::star::lang::XEventListener > & xListener )
73 throw ( com::sun::star::uno::RuntimeException );
74 virtual void SAL_CALL
75 removeEventListener( const com::sun::star::uno::Reference<
76 com::sun::star::lang::XEventListener > & aListener )
77 throw ( com::sun::star::uno::RuntimeException );
79 // XMultiServiceFactory
80 virtual com::sun::star::uno::Reference<
81 com::sun::star::uno::XInterface > SAL_CALL
82 createInstance( const OUString & aServiceSpecifier )
83 throw ( com::sun::star::uno::Exception,
84 com::sun::star::uno::RuntimeException );
85 virtual com::sun::star::uno::Reference<
86 com::sun::star::uno::XInterface > SAL_CALL
87 createInstanceWithArguments( const OUString & ServiceSpecifier,
88 const com::sun::star::uno::Sequence<
89 com::sun::star::uno::Any > & Arguments )
90 throw ( com::sun::star::uno::Exception,
91 com::sun::star::uno::RuntimeException );
92 virtual com::sun::star::uno::Sequence< OUString > SAL_CALL
93 getAvailableServiceNames()
94 throw ( com::sun::star::uno::RuntimeException );
96 // Non-Interface methods
98 private:
99 com::sun::star::uno::Reference<
100 com::sun::star::uno::XInterface > SAL_CALL
101 createInstanceWithArguments( const OUString & ServiceSpecifier,
102 const com::sun::star::uno::Sequence<
103 com::sun::star::uno::Any > & Arguments,
104 bool bCheckArgs )
105 throw ( com::sun::star::uno::Exception,
106 com::sun::star::uno::RuntimeException );
108 com::sun::star::uno::Reference<
109 com::sun::star::lang::XMultiServiceFactory >
110 getConfigProvider();
112 bool
113 createConfigPath( const OUString & rInPath, OUString & rOutPath );
116 } // namespace hierarchy_ucp
118 #endif /* !_HIERARCHYDATASOURCE_HXX */
120 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */