Branch data Line data Source code
1 : : #ifndef INCLUDED_COM_SUN_STAR_UCB_LOCK_HPP
2 : : #define INCLUDED_COM_SUN_STAR_UCB_LOCK_HPP
3 : :
4 : : #include "sal/config.h"
5 : :
6 : : #include "com/sun/star/ucb/Lock.hdl"
7 : :
8 : : #include "com/sun/star/ucb/LockDepth.hpp"
9 : : #include "com/sun/star/ucb/LockEntry.hpp"
10 : : #include "com/sun/star/uno/Any.hxx"
11 : : #include "com/sun/star/uno/Sequence.hxx"
12 : : #include "com/sun/star/uno/Type.hxx"
13 : : #include "cppu/unotype.hxx"
14 : : #include "rtl/ustring.hxx"
15 : : #include "sal/types.h"
16 : : #include "typelib/typeclass.h"
17 : : #include "typelib/typedescription.h"
18 : :
19 : : namespace com { namespace sun { namespace star { namespace ucb {
20 : :
21 : 0 : inline Lock::Lock() SAL_THROW(())
22 : : : ::com::sun::star::ucb::LockEntry()
23 : : , Depth(::com::sun::star::ucb::LockDepth_ZERO)
24 : : , Owner()
25 : : , Timeout(0)
26 [ # # ]: 0 : , LockTokens()
27 : : {
28 : 0 : }
29 : :
30 : 0 : inline Lock::Lock(const ::com::sun::star::ucb::LockScope& Scope_, const ::com::sun::star::ucb::LockType& Type_, const ::com::sun::star::ucb::LockDepth& Depth_, const ::com::sun::star::uno::Any& Owner_, const ::sal_Int64& Timeout_, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& LockTokens_) SAL_THROW(())
31 : : : ::com::sun::star::ucb::LockEntry(Scope_, Type_)
32 : : , Depth(Depth_)
33 : : , Owner(Owner_)
34 : : , Timeout(Timeout_)
35 [ # # ]: 0 : , LockTokens(LockTokens_)
36 : : {
37 : 0 : }
38 : :
39 : : } } } }
40 : :
41 : : namespace com { namespace sun { namespace star { namespace ucb {
42 : :
43 : 0 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::com::sun::star::ucb::Lock const *) {
44 : : //TODO: On certain platforms with weak memory models, the following code can result in some threads observing that the_type points to garbage
45 : : static ::typelib_TypeDescriptionReference * the_type = 0;
46 [ # # ]: 0 : if (the_type == 0) {
47 : 0 : ::typelib_static_type_init(&the_type, typelib_TypeClass_STRUCT, "com.sun.star.ucb.Lock");
48 : : }
49 : 0 : return *reinterpret_cast< ::com::sun::star::uno::Type * >(&the_type);
50 : : }
51 : :
52 : : } } } }
53 : :
54 : : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::ucb::Lock const *) SAL_THROW(()) {
55 : : return ::cppu::UnoType< ::com::sun::star::ucb::Lock >::get();
56 : : }
57 : :
58 : : #endif // INCLUDED_COM_SUN_STAR_UCB_LOCK_HPP
|