Branch data Line data Source code
1 : : #ifndef INCLUDED_COM_SUN_STAR_REGISTRY_XSIMPLEREGISTRY_HPP
2 : : #define INCLUDED_COM_SUN_STAR_REGISTRY_XSIMPLEREGISTRY_HPP
3 : :
4 : : #include "sal/config.h"
5 : :
6 : : #include "com/sun/star/registry/XSimpleRegistry.hdl"
7 : :
8 : : #include "com/sun/star/uno/RuntimeException.hpp"
9 : : #include "com/sun/star/registry/XRegistryKey.hpp"
10 : : #include "com/sun/star/registry/InvalidRegistryException.hpp"
11 : : #include "com/sun/star/registry/MergeConflictException.hpp"
12 : : #include "com/sun/star/uno/XInterface.hpp"
13 : : #include "com/sun/star/uno/Reference.hxx"
14 : : #include "com/sun/star/uno/Type.hxx"
15 : : #include "cppu/unotype.hxx"
16 : : #include "osl/mutex.hxx"
17 : : #include "rtl/ustring.hxx"
18 : : #include "rtl/instance.hxx"
19 : : #include "sal/types.h"
20 : :
21 : : namespace com { namespace sun { namespace star { namespace registry { namespace detail {
22 : :
23 : : struct theXSimpleRegistryType : public rtl::StaticWithInit< ::com::sun::star::uno::Type *, theXSimpleRegistryType >
24 : : {
25 : 132 : ::com::sun::star::uno::Type * operator()() const
26 : : {
27 [ + - ]: 132 : ::rtl::OUString sTypeName( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.XSimpleRegistry") );
28 : :
29 : : // Start inline typedescription generation
30 : 132 : typelib_InterfaceTypeDescription * pTD = 0;
31 : :
32 : : typelib_TypeDescriptionReference * aSuperTypes[1];
33 [ + - ]: 132 : aSuperTypes[0] = ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > >::get().getTypeLibType();
34 : 132 : typelib_TypeDescriptionReference * pMembers[8] = { 0,0,0,0,0,0,0,0 };
35 [ + - ]: 132 : ::rtl::OUString sMethodName0( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.XSimpleRegistry::getURL") );
36 : : typelib_typedescriptionreference_new( &pMembers[0],
37 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
38 : 132 : sMethodName0.pData );
39 [ + - ]: 132 : ::rtl::OUString sMethodName1( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.XSimpleRegistry::open") );
40 : : typelib_typedescriptionreference_new( &pMembers[1],
41 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
42 : 132 : sMethodName1.pData );
43 [ + - ]: 132 : ::rtl::OUString sMethodName2( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.XSimpleRegistry::isValid") );
44 : : typelib_typedescriptionreference_new( &pMembers[2],
45 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
46 : 132 : sMethodName2.pData );
47 [ + - ]: 132 : ::rtl::OUString sMethodName3( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.XSimpleRegistry::close") );
48 : : typelib_typedescriptionreference_new( &pMembers[3],
49 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
50 : 132 : sMethodName3.pData );
51 [ + - ]: 132 : ::rtl::OUString sMethodName4( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.XSimpleRegistry::destroy") );
52 : : typelib_typedescriptionreference_new( &pMembers[4],
53 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
54 : 132 : sMethodName4.pData );
55 [ + - ]: 132 : ::rtl::OUString sMethodName5( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.XSimpleRegistry::getRootKey") );
56 : : typelib_typedescriptionreference_new( &pMembers[5],
57 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
58 : 132 : sMethodName5.pData );
59 [ + - ]: 132 : ::rtl::OUString sMethodName6( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.XSimpleRegistry::isReadOnly") );
60 : : typelib_typedescriptionreference_new( &pMembers[6],
61 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
62 : 132 : sMethodName6.pData );
63 [ + - ]: 132 : ::rtl::OUString sMethodName7( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.XSimpleRegistry::mergeKey") );
64 : : typelib_typedescriptionreference_new( &pMembers[7],
65 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE_METHOD,
66 : 132 : sMethodName7.pData );
67 : :
68 : : typelib_typedescription_newMIInterface(
69 : : &pTD,
70 : : sTypeName.pData, 0x00000000, 0x0000, 0x0000, 0x00000000, 0x00000000,
71 : : 1, aSuperTypes,
72 : : 8,
73 : 132 : pMembers );
74 : :
75 : 132 : typelib_typedescription_register( (typelib_TypeDescription**)&pTD );
76 : 132 : typelib_typedescriptionreference_release( pMembers[0] );
77 : 132 : typelib_typedescriptionreference_release( pMembers[1] );
78 : 132 : typelib_typedescriptionreference_release( pMembers[2] );
79 : 132 : typelib_typedescriptionreference_release( pMembers[3] );
80 : 132 : typelib_typedescriptionreference_release( pMembers[4] );
81 : 132 : typelib_typedescriptionreference_release( pMembers[5] );
82 : 132 : typelib_typedescriptionreference_release( pMembers[6] );
83 : 132 : typelib_typedescriptionreference_release( pMembers[7] );
84 : 132 : typelib_typedescription_release( (typelib_TypeDescription*)pTD );
85 : :
86 : 132 : return new ::com::sun::star::uno::Type( ::com::sun::star::uno::TypeClass_INTERFACE, sTypeName ); // leaked
87 : : }
88 : : };
89 : :
90 : : } } } } }
91 : :
92 : : namespace com { namespace sun { namespace star { namespace registry {
93 : :
94 : 396 : inline ::com::sun::star::uno::Type const & cppu_detail_getUnoType(SAL_UNUSED_PARAMETER ::com::sun::star::registry::XSimpleRegistry const *) {
95 : 396 : const ::com::sun::star::uno::Type &rRet = *detail::theXSimpleRegistryType::get();
96 : : // End inline typedescription generation
97 : : static bool bInitStarted = false;
98 [ + + ]: 396 : if (!bInitStarted)
99 : : {
100 [ + - ][ + - ]: 132 : ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
101 [ + - ]: 132 : if (!bInitStarted)
102 : : {
103 : : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
104 : 132 : bInitStarted = true;
105 [ + - ]: 132 : ::cppu::UnoType< ::com::sun::star::uno::RuntimeException >::get();
106 : 132 : ::cppu::UnoType< ::com::sun::star::registry::InvalidRegistryException >::get();
107 [ + - ]: 132 : ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > >::get();
108 : 132 : ::cppu::UnoType< ::com::sun::star::registry::MergeConflictException >::get();
109 : :
110 : 132 : typelib_InterfaceMethodTypeDescription * pMethod = 0;
111 : : {
112 [ + - ]: 132 : ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
113 : 132 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
114 [ + - ]: 132 : ::rtl::OUString sReturnType0( RTL_CONSTASCII_USTRINGPARAM("string") );
115 [ + - ]: 132 : ::rtl::OUString sMethodName0( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.XSimpleRegistry::getURL") );
116 : : typelib_typedescription_newInterfaceMethod( &pMethod,
117 : : 3, sal_False,
118 : : sMethodName0.pData,
119 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING, sReturnType0.pData,
120 : : 0, 0,
121 : 132 : 1, the_Exceptions );
122 : 132 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
123 : : }
124 : : {
125 : : typelib_Parameter_Init aParameters[3];
126 [ + - ]: 132 : ::rtl::OUString sParamName0( RTL_CONSTASCII_USTRINGPARAM("rURL") );
127 [ + - ]: 132 : ::rtl::OUString sParamType0( RTL_CONSTASCII_USTRINGPARAM("string") );
128 : 132 : aParameters[0].pParamName = sParamName0.pData;
129 : 132 : aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
130 : 132 : aParameters[0].pTypeName = sParamType0.pData;
131 : 132 : aParameters[0].bIn = sal_True;
132 : 132 : aParameters[0].bOut = sal_False;
133 [ + - ]: 132 : ::rtl::OUString sParamName1( RTL_CONSTASCII_USTRINGPARAM("bReadOnly") );
134 [ + - ]: 132 : ::rtl::OUString sParamType1( RTL_CONSTASCII_USTRINGPARAM("boolean") );
135 : 132 : aParameters[1].pParamName = sParamName1.pData;
136 : 132 : aParameters[1].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_BOOLEAN;
137 : 132 : aParameters[1].pTypeName = sParamType1.pData;
138 : 132 : aParameters[1].bIn = sal_True;
139 : 132 : aParameters[1].bOut = sal_False;
140 [ + - ]: 132 : ::rtl::OUString sParamName2( RTL_CONSTASCII_USTRINGPARAM("bCreate") );
141 [ + - ]: 132 : ::rtl::OUString sParamType2( RTL_CONSTASCII_USTRINGPARAM("boolean") );
142 : 132 : aParameters[2].pParamName = sParamName2.pData;
143 : 132 : aParameters[2].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_BOOLEAN;
144 : 132 : aParameters[2].pTypeName = sParamType2.pData;
145 : 132 : aParameters[2].bIn = sal_True;
146 : 132 : aParameters[2].bOut = sal_False;
147 [ + - ]: 132 : ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.InvalidRegistryException"));
148 [ + - ]: 132 : ::rtl::OUString the_ExceptionName1(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
149 : 132 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData };
150 [ + - ]: 132 : ::rtl::OUString sReturnType1( RTL_CONSTASCII_USTRINGPARAM("void") );
151 [ + - ]: 132 : ::rtl::OUString sMethodName1( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.XSimpleRegistry::open") );
152 : : typelib_typedescription_newInterfaceMethod( &pMethod,
153 : : 4, sal_False,
154 : : sMethodName1.pData,
155 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_VOID, sReturnType1.pData,
156 : : 3, aParameters,
157 : 132 : 2, the_Exceptions );
158 : 132 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
159 : : }
160 : : {
161 [ + - ]: 132 : ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
162 : 132 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData };
163 [ + - ]: 132 : ::rtl::OUString sReturnType2( RTL_CONSTASCII_USTRINGPARAM("boolean") );
164 [ + - ]: 132 : ::rtl::OUString sMethodName2( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.XSimpleRegistry::isValid") );
165 : : typelib_typedescription_newInterfaceMethod( &pMethod,
166 : : 5, sal_False,
167 : : sMethodName2.pData,
168 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_BOOLEAN, sReturnType2.pData,
169 : : 0, 0,
170 : 132 : 1, the_Exceptions );
171 : 132 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
172 : : }
173 : : {
174 [ + - ]: 132 : ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.InvalidRegistryException"));
175 [ + - ]: 132 : ::rtl::OUString the_ExceptionName1(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
176 : 132 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData };
177 [ + - ]: 132 : ::rtl::OUString sReturnType3( RTL_CONSTASCII_USTRINGPARAM("void") );
178 [ + - ]: 132 : ::rtl::OUString sMethodName3( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.XSimpleRegistry::close") );
179 : : typelib_typedescription_newInterfaceMethod( &pMethod,
180 : : 6, sal_False,
181 : : sMethodName3.pData,
182 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_VOID, sReturnType3.pData,
183 : : 0, 0,
184 : 132 : 2, the_Exceptions );
185 : 132 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
186 : : }
187 : : {
188 [ + - ]: 132 : ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.InvalidRegistryException"));
189 [ + - ]: 132 : ::rtl::OUString the_ExceptionName1(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
190 : 132 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData };
191 [ + - ]: 132 : ::rtl::OUString sReturnType4( RTL_CONSTASCII_USTRINGPARAM("void") );
192 [ + - ]: 132 : ::rtl::OUString sMethodName4( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.XSimpleRegistry::destroy") );
193 : : typelib_typedescription_newInterfaceMethod( &pMethod,
194 : : 7, sal_False,
195 : : sMethodName4.pData,
196 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_VOID, sReturnType4.pData,
197 : : 0, 0,
198 : 132 : 2, the_Exceptions );
199 : 132 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
200 : : }
201 : : {
202 [ + - ]: 132 : ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.InvalidRegistryException"));
203 [ + - ]: 132 : ::rtl::OUString the_ExceptionName1(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
204 : 132 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData };
205 [ + - ]: 132 : ::rtl::OUString sReturnType5( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.XRegistryKey") );
206 [ + - ]: 132 : ::rtl::OUString sMethodName5( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.XSimpleRegistry::getRootKey") );
207 : : typelib_typedescription_newInterfaceMethod( &pMethod,
208 : : 8, sal_False,
209 : : sMethodName5.pData,
210 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_INTERFACE, sReturnType5.pData,
211 : : 0, 0,
212 : 132 : 2, the_Exceptions );
213 : 132 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
214 : : }
215 : : {
216 [ + - ]: 132 : ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.InvalidRegistryException"));
217 [ + - ]: 132 : ::rtl::OUString the_ExceptionName1(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
218 : 132 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData };
219 [ + - ]: 132 : ::rtl::OUString sReturnType6( RTL_CONSTASCII_USTRINGPARAM("boolean") );
220 [ + - ]: 132 : ::rtl::OUString sMethodName6( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.XSimpleRegistry::isReadOnly") );
221 : : typelib_typedescription_newInterfaceMethod( &pMethod,
222 : : 9, sal_False,
223 : : sMethodName6.pData,
224 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_BOOLEAN, sReturnType6.pData,
225 : : 0, 0,
226 : 132 : 2, the_Exceptions );
227 : 132 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
228 : : }
229 : : {
230 : : typelib_Parameter_Init aParameters[2];
231 [ + - ]: 132 : ::rtl::OUString sParamName0( RTL_CONSTASCII_USTRINGPARAM("aKeyName") );
232 [ + - ]: 132 : ::rtl::OUString sParamType0( RTL_CONSTASCII_USTRINGPARAM("string") );
233 : 132 : aParameters[0].pParamName = sParamName0.pData;
234 : 132 : aParameters[0].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
235 : 132 : aParameters[0].pTypeName = sParamType0.pData;
236 : 132 : aParameters[0].bIn = sal_True;
237 : 132 : aParameters[0].bOut = sal_False;
238 [ + - ]: 132 : ::rtl::OUString sParamName1( RTL_CONSTASCII_USTRINGPARAM("aUrl") );
239 [ + - ]: 132 : ::rtl::OUString sParamType1( RTL_CONSTASCII_USTRINGPARAM("string") );
240 : 132 : aParameters[1].pParamName = sParamName1.pData;
241 : 132 : aParameters[1].eTypeClass = (typelib_TypeClass)::com::sun::star::uno::TypeClass_STRING;
242 : 132 : aParameters[1].pTypeName = sParamType1.pData;
243 : 132 : aParameters[1].bIn = sal_True;
244 : 132 : aParameters[1].bOut = sal_False;
245 [ + - ]: 132 : ::rtl::OUString the_ExceptionName0(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.InvalidRegistryException"));
246 [ + - ]: 132 : ::rtl::OUString the_ExceptionName1(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.MergeConflictException"));
247 [ + - ]: 132 : ::rtl::OUString the_ExceptionName2(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.uno.RuntimeException"));
248 : 132 : rtl_uString * the_Exceptions[] = { the_ExceptionName0.pData, the_ExceptionName1.pData, the_ExceptionName2.pData };
249 [ + - ]: 132 : ::rtl::OUString sReturnType7( RTL_CONSTASCII_USTRINGPARAM("void") );
250 [ + - ]: 132 : ::rtl::OUString sMethodName7( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.XSimpleRegistry::mergeKey") );
251 : : typelib_typedescription_newInterfaceMethod( &pMethod,
252 : : 10, sal_False,
253 : : sMethodName7.pData,
254 : : (typelib_TypeClass)::com::sun::star::uno::TypeClass_VOID, sReturnType7.pData,
255 : : 2, aParameters,
256 : 132 : 3, the_Exceptions );
257 : 132 : typelib_typedescription_register( (typelib_TypeDescription**)&pMethod );
258 : : }
259 : 132 : typelib_typedescription_release( (typelib_TypeDescription*)pMethod );
260 [ + - ]: 132 : }
261 : : }
262 : : else
263 : : {
264 : : OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
265 : : }
266 : 396 : return rRet;
267 : : }
268 : :
269 : : } } } }
270 : :
271 : 332 : inline ::com::sun::star::uno::Type const & SAL_CALL getCppuType(SAL_UNUSED_PARAMETER ::com::sun::star::uno::Reference< ::com::sun::star::registry::XSimpleRegistry > const *) SAL_THROW(()) {
272 : 332 : return ::cppu::UnoType< ::com::sun::star::uno::Reference< ::com::sun::star::registry::XSimpleRegistry > >::get();
273 : : }
274 : :
275 : 332 : ::com::sun::star::uno::Type const & ::com::sun::star::registry::XSimpleRegistry::static_type(SAL_UNUSED_PARAMETER void *) {
276 : 332 : return ::getCppuType(static_cast< ::com::sun::star::uno::Reference< ::com::sun::star::registry::XSimpleRegistry > * >(0));
277 : : }
278 : :
279 : : #endif // INCLUDED_COM_SUN_STAR_REGISTRY_XSIMPLEREGISTRY_HPP
|