merge the formfield patch from ooo-build
[ooovba.git] / shell / source / backends / wininetbe / wininetbackend.hxx
blob865872ecc0d48f4eb62538dbfd688b875150936b
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: wininetbackend.hxx,v $
10 * $Revision: 1.5 $
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 _FIXEDVALUEBACKEND_HXX_
32 #define _FIXEDVALUEBACKEND_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 #if defined _MSC_VER
42 #pragma warning(push, 1)
43 #endif
44 #include <windows.h>
45 #include <wininet.h>
46 #if defined _MSC_VER
47 #pragma warning(pop)
48 #endif
50 namespace css = com::sun::star ;
51 namespace uno = css::uno ;
52 namespace lang = css::lang ;
53 namespace backend = css::configuration::backend ;
56 /**
57 Implements the SingleLayerStratum service.
59 class WinInetBackend : public ::cppu::WeakImplHelper2 <
60 backend::XSingleLayerStratum,
61 lang::XServiceInfo > {
63 public :
65 static WinInetBackend* createInstance(const uno::Reference<uno::XComponentContext>& xContext);
67 // XServiceInfo
68 virtual rtl::OUString SAL_CALL
69 getImplementationName( )
70 throw (uno::RuntimeException) ;
72 virtual sal_Bool SAL_CALL
73 supportsService( const rtl::OUString& aServiceName )
74 throw (uno::RuntimeException) ;
76 virtual uno::Sequence<rtl::OUString> SAL_CALL
77 getSupportedServiceNames( )
78 throw (uno::RuntimeException) ;
80 /**
81 Provides the implementation name.
83 @return implementation name
85 static rtl::OUString SAL_CALL getBackendName(void) ;
86 /**
87 Provides the supported services names
89 @return service names
91 static uno::Sequence<rtl::OUString> SAL_CALL getBackendServiceNames(void) ;
92 /**
93 Provides the supported component nodes
95 @return supported component nodes
97 static uno::Sequence<rtl::OUString> SAL_CALL getSupportedComponents(void) ;
99 //XSingleLayerStratum
100 virtual uno::Reference<backend::XLayer> SAL_CALL
101 getLayer( const rtl::OUString& aLayerId, const rtl::OUString& aTimestamp )
102 throw (backend::BackendAccessException,
103 lang::IllegalArgumentException) ;
105 virtual uno::Reference<backend::XUpdatableLayer> SAL_CALL
106 getUpdatableLayer( const rtl::OUString& aLayerId )
107 throw (backend::BackendAccessException,
108 lang::NoSupportException,
109 lang::IllegalArgumentException) ;
110 protected:
112 Service constructor from a service factory.
114 @param xContext component context
116 WinInetBackend(const uno::Reference<uno::XComponentContext>& xContext)
117 throw (backend::BackendAccessException);
119 /** Destructor */
120 ~WinInetBackend(void) ;
122 private:
124 uno::Reference<uno::XComponentContext> m_xContext ;
125 uno::Reference<backend::XLayer> m_xSystemLayer ;
127 // The wininet.dll module handle
128 HMODULE m_hWinInetDll;
132 #endif // _FIXEDVALUEBACKEND_HXX_