1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: kdebackend.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef KDEBACKEND_HXX_
32 #define KDEBACKEND_HXX_
34 #ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XSCHEMASUPPLIER_HPP_
35 #include <com/sun/star/configuration/backend/XSingleLayerStratum.hpp>
37 #include <com/sun/star/lang/XInitialization.hpp>
38 #include <com/sun/star/uno/XComponentContext.hpp>
39 #include <com/sun/star/lang/XServiceInfo.hpp>
40 #include <com/sun/star/configuration/InvalidBootstrapFileException.hpp>
41 #include <com/sun/star/configuration/backend/CannotConnectException.hpp>
42 #include <cppuhelper/compbase2.hxx>
49 namespace css
= com::sun::star
;
50 namespace uno
= css::uno
;
51 namespace lang
= css::lang
;
52 namespace backend
= css::configuration::backend
;
55 //------------------------------------------------------------------------------
56 typedef cppu::WeakComponentImplHelper2
<backend::XSingleLayerStratum
,
57 lang::XServiceInfo
> BackendBase
;
60 Implements the SingleLayerStratum service for KDE access.
62 class KDEBackend
: public BackendBase
{
65 static KDEBackend
* createInstance(const uno::Reference
<uno::XComponentContext
>& xContext
);
68 virtual rtl::OUString SAL_CALL
getImplementationName( )
69 throw (uno::RuntimeException
) ;
71 virtual sal_Bool SAL_CALL
supportsService( const rtl::OUString
& aServiceName
)
72 throw (uno::RuntimeException
) ;
74 virtual uno::Sequence
<rtl::OUString
> SAL_CALL
getSupportedServiceNames( )
75 throw (uno::RuntimeException
) ;
78 Provides the implementation name.
80 @return implementation name
82 static rtl::OUString SAL_CALL
getBackendName(void) ;
85 Provides the supported services names
89 static uno::Sequence
<rtl::OUString
> SAL_CALL
getBackendServiceNames(void) ;
92 virtual uno::Reference
<backend::XLayer
> SAL_CALL
93 getLayer( const rtl::OUString
& aLayerId
, const rtl::OUString
& aTimestamp
)
94 throw (backend::BackendAccessException
, lang::IllegalArgumentException
) ;
96 virtual uno::Reference
<backend::XUpdatableLayer
> SAL_CALL
97 getUpdatableLayer( const rtl::OUString
& aLayerId
)
98 throw (backend::BackendAccessException
, lang::NoSupportException
,
99 lang::IllegalArgumentException
) ;
103 Service constructor from a service factory.
105 @param xContext component context
107 KDEBackend(const uno::Reference
<uno::XComponentContext
>& xContext
)
108 throw (backend::BackendAccessException
);
115 /** Build KDE/OO mapping table */
116 void initializeMappingTable ();
119 /** The component context */
120 uno::Reference
<uno::XComponentContext
> m_xContext
;
122 /** Mutex for reOOurces protection */
125 static KDEBackend
* mInstance
;
128 #endif // CONFIGMGR_LOCALBE_LOCALSINGLESTRATUM_HXX_