merge the formfield patch from ooo-build
[ooovba.git] / shell / source / backends / wininetbe / wininetlayer.hxx
blob540433362c08308583a2cdf443bc70ce2183e9f6
1 #ifndef _WinInetLayer_HXX_
2 #define _WinInetLayer_HXX_
4 #include <com/sun/star/uno/XComponentContext.hpp>
5 #include <com/sun/star/configuration/backend/XLayer.hpp>
6 #include <com/sun/star/configuration/backend/PropertyInfo.hpp>
7 #include <com/sun/star/configuration/backend/BackendAccessException.hpp>
9 #ifndef _COM_SUN_STAR_CONFIGURATION_BACKEND_XLAYERCONTENTDESCIBER_HPP_
10 #include <com/sun/star/configuration/backend/XLayerContentDescriber.hpp>
11 #endif
12 #include <com/sun/star/util/XTimeStamped.hpp>
13 #include <com/sun/star/uno/Sequence.hxx>
14 #include <cppuhelper/implbase2.hxx>
16 #if defined _MSC_VER
17 #pragma warning(push, 1)
18 #endif
19 #include <windows.h>
20 #include <wininet.h>
21 #if defined _MSC_VER
22 #pragma warning(pop)
23 #endif
25 namespace css = com::sun::star ;
26 namespace uno = css::uno ;
27 namespace lang = css::lang ;
28 namespace backend = css::configuration::backend ;
29 namespace util = css::util ;
31 /**
32 Implementation of the XLayer interfaces for fixed values
35 class WinInetLayer : public cppu::WeakImplHelper2<backend::XLayer, util::XTimeStamped>
37 public :
38 typedef BOOL ( WINAPI *InternetQueryOption_Proc_T )( HINTERNET, DWORD, LPVOID, LPDWORD );
40 /**
41 Constructor given the requested component name
43 @param lpfnInternetQueryOption function pointer into wininet.dll
44 @param aTimestamp timestamp indicating last modifictaion
46 WinInetLayer(InternetQueryOption_Proc_T lpfnInternetQueryOption,
47 const uno::Reference<uno::XComponentContext>& xContext);
49 /** Destructor */
50 ~WinInetLayer(void) {}
52 // XLayer
53 virtual void SAL_CALL readData(const uno::Reference<backend::XLayerHandler>& xHandler)
54 throw ( backend::MalformedDataException,
55 lang::NullPointerException,
56 lang::WrappedTargetException,
57 uno::RuntimeException) ;
59 // XTimeStamped
60 virtual rtl::OUString SAL_CALL getTimestamp(void)
61 throw (uno::RuntimeException);
63 private :
65 rtl::OUString m_aComponent ;
67 uno::Reference<backend::XLayerContentDescriber> m_xLayerContentDescriber ;
69 // The InternetQueryOption function pointer
70 InternetQueryOption_Proc_T m_lpfnInternetQueryOption;
71 } ;
73 #endif // _WinInetLayer_HXX_