merge the formfield patch from ooo-build
[ooovba.git] / shell / source / backends / macbe / macbackend.hxx
blobed5aed163fb5b4d6118ff8bd846562b0ddffb13a
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: macbackend.hxx,v $
10 * $Revision: 1.4 $
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 _MACBACKEND_HXX_
32 #define _MACBACKEND_HXX_
34 #include <com/sun/star/configuration/backend/XSingleLayerStratum.hpp>
35 #include <com/sun/star/uno/XComponentContext.hpp>
36 #include <com/sun/star/lang/XServiceInfo.hpp>
37 #include <com/sun/star/configuration/backend/XBackendChangesNotifier.hpp>
38 #include <cppuhelper/implbase2.hxx>
39 #include <rtl/string.hxx>
41 // FIXME: stdio.h only for debugging...
42 #include <stdio.h>
44 namespace css = com::sun::star;
45 namespace uno = css::uno;
46 namespace lang = css::lang;
47 namespace backend = css::configuration::backend;
50 /**
51 Implements the SingleLayerStratum service.
53 class MacOSXBackend : public ::cppu::WeakImplHelper2 <backend::XSingleLayerStratum, lang::XServiceInfo >
56 public:
58 static MacOSXBackend* createInstance(const uno::Reference<uno::XComponentContext>& xContext);
60 // XServiceInfo
61 virtual rtl::OUString SAL_CALL getImplementationName()
62 throw (uno::RuntimeException);
64 virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& aServiceName)
65 throw (uno::RuntimeException);
67 virtual uno::Sequence<rtl::OUString> SAL_CALL getSupportedServiceNames()
68 throw (uno::RuntimeException);
70 /**
71 Provides the implementation name.
73 @return implementation name
75 static rtl::OUString SAL_CALL getBackendName(void);
77 /**
78 Provides the supported services names
80 @return service names
82 static uno::Sequence<rtl::OUString> SAL_CALL getBackendServiceNames(void);
84 /**
85 Provides the supported component nodes
87 @return supported component nodes
89 static uno::Sequence<rtl::OUString> SAL_CALL getSupportedComponents(void);
91 // XSingleLayerStratum
92 virtual uno::Reference<backend::XLayer> SAL_CALL getLayer(const rtl::OUString& aLayerId, const rtl::OUString& aTimestamp)
93 throw (backend::BackendAccessException, lang::IllegalArgumentException);
95 virtual uno::Reference<backend::XUpdatableLayer> SAL_CALL getUpdatableLayer(const rtl::OUString& aLayerId)
96 throw (backend::BackendAccessException, lang::NoSupportException, lang::IllegalArgumentException);
98 protected:
101 Service constructor from a service factory.
103 @param xContext component context
105 MacOSXBackend(const uno::Reference<uno::XComponentContext>& xContext)
106 throw (backend::BackendAccessException);
108 /** Destructor */
109 ~MacOSXBackend(void);
111 private:
113 uno::Reference<uno::XComponentContext> m_xContext;
114 uno::Reference<backend::XLayer> m_xSystemLayer;
115 uno::Reference<backend::XLayer> m_xPathLayer;
119 #endif // _MACBACKEND_HXX_