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