LibreOffice Module connectivity (master) 1
mdrivermanager.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19
20#include <config_fuzzers.h>
21
22#include "mdrivermanager.hxx"
23#include <com/sun/star/configuration/theDefaultProvider.hpp>
24#include <com/sun/star/sdbc/XDriver.hpp>
25#include <com/sun/star/container/XContentEnumerationAccess.hpp>
26#include <com/sun/star/container/ElementExistException.hpp>
27#include <com/sun/star/beans/NamedValue.hpp>
28#include <com/sun/star/logging/LogLevel.hpp>
29
33#include <cppuhelper/weak.hxx>
34#include <osl/diagnose.h>
35
36#include <algorithm>
37#include <iterator>
38#include <utility>
39#include <vector>
40
42{
43
44using namespace ::com::sun::star::uno;
45using namespace ::com::sun::star::lang;
46using namespace ::com::sun::star::sdbc;
47using namespace ::com::sun::star::beans;
48using namespace ::com::sun::star::container;
49using namespace ::com::sun::star::logging;
50using namespace ::osl;
51
52constexpr OUStringLiteral SERVICE_SDBC_DRIVER = u"com.sun.star.sdbc.Driver";
53
56{
57 throw NoSuchElementException();
58}
59
60class ODriverEnumeration : public ::cppu::WeakImplHelper< XEnumeration >
61{
62 friend class OSDBCDriverManager;
63
64 typedef std::vector< Reference< XDriver > > DriverArray;
66 DriverArray::const_iterator m_aPos;
67 // order matters!
68
69protected:
70 virtual ~ODriverEnumeration() override;
71public:
72 explicit ODriverEnumeration(DriverArray&& _rDriverSequence);
73
74// XEnumeration
75 virtual sal_Bool SAL_CALL hasMoreElements( ) override;
76 virtual Any SAL_CALL nextElement( ) override;
77};
78
79
81 :m_aDrivers( std::move(_rDriverSequence) )
82 ,m_aPos( m_aDrivers.begin() )
83{
84}
85
86
88{
89}
90
91
93{
94 return m_aPos != m_aDrivers.end();
95}
96
97
99{
100 if ( !hasMoreElements() )
102
103 return Any( *m_aPos++ );
104}
105
106namespace
107{
109 struct EnsureDriver
110 {
111 explicit EnsureDriver( const Reference< XComponentContext > &rxContext )
112 : mxContext( rxContext ) {}
113
114 const DriverAccess& operator()( const DriverAccess& _rDescriptor ) const
115 {
116 // we did not load this driver, yet
117 if (_rDescriptor.xDriver.is())
118 return _rDescriptor;
119
120 // we have a factory for it
121 if (_rDescriptor.xComponentFactory.is())
122 {
123 DriverAccess& rDesc = const_cast<DriverAccess&>(_rDescriptor);
124 try
125 {
126 //load driver
127 rDesc.xDriver.set(
128 rDesc.xComponentFactory->createInstanceWithContext(mxContext), css::uno::UNO_QUERY);
129 }
130 catch (const Exception&)
131 {
132 //failure, abandon driver
133 rDesc.xComponentFactory.clear();
134 }
135 }
136 return _rDescriptor;
137 }
138
139 private:
140 Reference< XComponentContext > mxContext;
141 };
142
144 struct ExtractDriverFromAccess
145 {
146 const Reference<XDriver>& operator()( const DriverAccess& _rAccess ) const
147 {
148 return _rAccess.xDriver;
149 }
150 };
151
152 struct ExtractDriverFromCollectionElement
153 {
154 const Reference<XDriver>& operator()( const DriverCollection::value_type& _rElement ) const
155 {
156 return _rElement.second;
157 }
158 };
159
160 // predicate for checking whether or not a driver accepts a given URL
161 bool AcceptsURL( const OUString& _rURL, const Reference<XDriver>& _rDriver )
162 {
163 // ask the driver
164 return _rDriver.is() && _rDriver->acceptsURL( _rURL );
165 }
166
167#if !ENABLE_FUZZERS
168 sal_Int32 lcl_getDriverPrecedence( const Reference<XComponentContext>& _rContext, Sequence< OUString >& _rPrecedence )
169 {
170 _rPrecedence.realloc( 0 );
171 try
172 {
173 // create a configuration provider
174 Reference< XMultiServiceFactory > xConfigurationProvider(
175 css::configuration::theDefaultProvider::get( _rContext ) );
176
177 // one argument for creating the node access: the path to the configuration node
178 Sequence< Any > aCreationArgs{ Any(NamedValue(
179 "nodepath", Any( OUString("org.openoffice.Office.DataAccess/DriverManager") ) )) };
180
181 // create the node access
182 Reference< XNameAccess > xDriverManagerNode(
183 xConfigurationProvider->createInstanceWithArguments("com.sun.star.configuration.ConfigurationAccess", aCreationArgs),
184 UNO_QUERY);
185
186 OSL_ENSURE(xDriverManagerNode.is(), "lcl_getDriverPrecedence: could not open my configuration node!");
187 if (xDriverManagerNode.is())
188 {
189 // obtain the preference list
190 Any aPreferences = xDriverManagerNode->getByName("DriverPrecedence");
191 bool bSuccess = aPreferences >>= _rPrecedence;
192 OSL_ENSURE(bSuccess || !aPreferences.hasValue(), "lcl_getDriverPrecedence: invalid value for the preferences node (no string sequence but not NULL)!");
193 }
194 }
195 catch( const Exception& )
196 {
197 DBG_UNHANDLED_EXCEPTION("connectivity.manager");
198 }
199
200 return _rPrecedence.getLength();
201 }
202#endif
203
205 struct CompareDriverAccessByName
206 {
207
208 bool operator()( const DriverAccess& lhs, const DriverAccess& rhs )
209 {
210 return lhs.sImplementationName < rhs.sImplementationName;
211 }
212 };
213
215 struct EqualDriverAccessToName
216 {
217 OUString m_sImplName;
218 explicit EqualDriverAccessToName(OUString _sImplName) : m_sImplName(std::move(_sImplName)){}
219
220 bool operator()( const DriverAccess& lhs)
221 {
222 return lhs.sImplementationName == m_sImplName;
223 }
224 };
225}
226
227OSDBCDriverManager::OSDBCDriverManager( const Reference< XComponentContext >& _rxContext )
229 ,m_xContext( _rxContext )
230 ,m_aEventLogger( _rxContext, "org.openoffice.logging.sdbc.DriverManager" )
231 ,m_aDriverConfig(m_xContext)
232 ,m_nLoginTimeout(0)
233{
234 // bootstrap all objects supporting the .sdb.Driver service
236
237 // initialize the drivers order
239}
240
241
243{
244}
245
247{
248 Reference< XContentEnumerationAccess > xEnumAccess( m_xContext->getServiceManager(), UNO_QUERY );
249 Reference< XEnumeration > xEnumDrivers;
250 if (xEnumAccess.is())
251 xEnumDrivers = xEnumAccess->createContentEnumeration(SERVICE_SDBC_DRIVER);
252
253 OSL_ENSURE( xEnumDrivers.is(), "OSDBCDriverManager::bootstrapDrivers: no enumeration for the drivers available!" );
254 if (!xEnumDrivers.is())
255 return;
256
257 Reference< XSingleComponentFactory > xFactory;
258 Reference< XServiceInfo > xSI;
259 while (xEnumDrivers->hasMoreElements())
260 {
261 xFactory.set(xEnumDrivers->nextElement(), css::uno::UNO_QUERY);
262 OSL_ENSURE( xFactory.is(), "OSDBCDriverManager::bootstrapDrivers: no factory extracted" );
263
264 if ( xFactory.is() )
265 {
266 // we got a factory for the driver
267 DriverAccess aDriverDescriptor;
268 bool bValidDescriptor = false;
269
270 // can it tell us something about the implementation name?
271 xSI.set(xFactory, css::uno::UNO_QUERY);
272 if ( xSI.is() )
273 { // yes -> no need to load the driver immediately (load it later when needed)
274 aDriverDescriptor.sImplementationName = xSI->getImplementationName();
275 aDriverDescriptor.xComponentFactory = xFactory;
276 bValidDescriptor = true;
277
278 m_aEventLogger.log( LogLevel::CONFIG,
279 "found SDBC driver $1$, no need to load it",
280 aDriverDescriptor.sImplementationName
281 );
282 }
283 else
284 {
285 // no -> create the driver
286 Reference< XDriver > xDriver( xFactory->createInstanceWithContext( m_xContext ), UNO_QUERY );
287 OSL_ENSURE( xDriver.is(), "OSDBCDriverManager::bootstrapDrivers: a driver which is no driver?!" );
288
289 if ( xDriver.is() )
290 {
291 aDriverDescriptor.xDriver = xDriver;
292 // and obtain its implementation name
293 xSI.set(xDriver, css::uno::UNO_QUERY);
294 OSL_ENSURE( xSI.is(), "OSDBCDriverManager::bootstrapDrivers: a driver without service info?" );
295 if ( xSI.is() )
296 {
297 aDriverDescriptor.sImplementationName = xSI->getImplementationName();
298 bValidDescriptor = true;
299
300 m_aEventLogger.log( LogLevel::CONFIG,
301 "found SDBC driver $1$, needed to load it",
302 aDriverDescriptor.sImplementationName
303 );
304 }
305 }
306 }
307
308 if ( bValidDescriptor )
309 {
310 m_aDriversBS.push_back( aDriverDescriptor );
311 }
312 }
313 }
314}
315
316
318{
319#if !ENABLE_FUZZERS
320 if ( m_aDriversBS.empty() )
321 // nothing to do
322 return;
323
324 try
325 {
326 // get the precedence of the drivers from the configuration
327 Sequence< OUString > aDriverOrder;
328 if ( 0 == lcl_getDriverPrecedence( m_xContext, aDriverOrder ) )
329 // nothing to do
330 return;
331
332 // aDriverOrder now is the list of driver implementation names in the order they should be used
333
334 if ( m_aEventLogger.isLoggable( LogLevel::CONFIG ) )
335 {
336 sal_Int32 nOrderedCount = aDriverOrder.getLength();
337 for ( sal_Int32 i=0; i<nOrderedCount; ++i )
338 m_aEventLogger.log( LogLevel::CONFIG,
339 "configuration's driver order: driver $1$ of $2$: $3$",
340 static_cast<sal_Int32>(i + 1), nOrderedCount, aDriverOrder[i]
341 );
342 }
343
344 // sort our bootstrapped drivers
345 std::sort( m_aDriversBS.begin(), m_aDriversBS.end(), CompareDriverAccessByName() );
346
347 // the first driver for which there is no preference
348 DriverAccessArray::iterator aNoPrefDriversStart = m_aDriversBS.begin();
349 // at the moment this is the first of all drivers we know
350
351 // loop through the names in the precedence order
352 for ( const OUString& rDriverOrder : std::as_const(aDriverOrder) )
353 {
354 if (aNoPrefDriversStart == m_aDriversBS.end())
355 break;
356
357 DriverAccess driver_order;
358 driver_order.sImplementationName = rDriverOrder;
359
360 // look for the impl name in the DriverAccess array
361 std::pair< DriverAccessArray::iterator, DriverAccessArray::iterator > aPos =
362 std::equal_range( aNoPrefDriversStart, m_aDriversBS.end(), driver_order, CompareDriverAccessByName() );
363
364 if ( aPos.first != aPos.second )
365 { // we have a DriverAccess with this impl name
366
367 OSL_ENSURE( std::distance( aPos.first, aPos.second ) == 1,
368 "OSDBCDriverManager::initializeDriverPrecedence: more than one driver with this impl name? How this?" );
369 // move the DriverAccess pointed to by aPos.first to the position pointed to by aNoPrefDriversStart
370
371 if ( aPos.first != aNoPrefDriversStart )
372 { // if this does not hold, the DriverAccess already has the correct position
373
374 // rotate the range [aNoPrefDriversStart, aPos.second) right 1 element
375 std::rotate( aNoPrefDriversStart, aPos.second - 1, aPos.second );
376 }
377
378 // next round we start searching and pos right
379 ++aNoPrefDriversStart;
380 }
381 }
382 }
383 catch (Exception&)
384 {
385 TOOLS_WARN_EXCEPTION( "connectivity.hsqldb", "OSDBCDriverManager::initializeDriverPrecedence: caught an exception while sorting the drivers!");
386 }
387#endif
388}
389
390
391Reference< XConnection > SAL_CALL OSDBCDriverManager::getConnection( const OUString& _rURL )
392{
393 MutexGuard aGuard(m_aMutex);
394
395 m_aEventLogger.log( LogLevel::INFO,
396 "connection requested for URL $1$",
397 _rURL
398 );
399
400 Reference< XConnection > xConnection;
401 Reference< XDriver > xDriver = implGetDriverForURL(_rURL);
402 if (xDriver.is())
403 {
404 // TODO : handle the login timeout
405 xConnection = xDriver->connect(_rURL, Sequence< PropertyValue >());
406 // may throw an exception
407 m_aEventLogger.log( LogLevel::INFO,
408 "connection retrieved for URL $1$",
409 _rURL
410 );
411 }
412
413 return xConnection;
414}
415
416
417Reference< XConnection > SAL_CALL OSDBCDriverManager::getConnectionWithInfo( const OUString& _rURL, const Sequence< PropertyValue >& _rInfo )
418{
419 MutexGuard aGuard(m_aMutex);
420
421 m_aEventLogger.log( LogLevel::INFO,
422 "connection with info requested for URL $1$",
423 _rURL
424 );
425
426 Reference< XConnection > xConnection;
427 Reference< XDriver > xDriver = implGetDriverForURL(_rURL);
428 if (xDriver.is())
429 {
430 // TODO : handle the login timeout
431 xConnection = xDriver->connect(_rURL, _rInfo);
432 // may throw an exception
433 m_aEventLogger.log( LogLevel::INFO,
434 "connection with info retrieved for URL $1$",
435 _rURL
436 );
437 }
438
439 return xConnection;
440}
441
442
443void SAL_CALL OSDBCDriverManager::setLoginTimeout( sal_Int32 seconds )
444{
445 MutexGuard aGuard(m_aMutex);
446 m_nLoginTimeout = seconds;
447}
448
449
451{
452 MutexGuard aGuard(m_aMutex);
453 return m_nLoginTimeout;
454}
455
456
457Reference< XEnumeration > SAL_CALL OSDBCDriverManager::createEnumeration( )
458{
459 MutexGuard aGuard(m_aMutex);
460
462
463 // ensure that all our bootstrapped drivers are instantiated
464 std::for_each( m_aDriversBS.begin(), m_aDriversBS.end(), EnsureDriver( m_xContext ) );
465
466 // copy the bootstrapped drivers
467 std::transform(
468 m_aDriversBS.begin(), // "copy from" start
469 m_aDriversBS.end(), // "copy from" end
470 std::back_inserter( aDrivers ), // insert into
471 ExtractDriverFromAccess() // transformation to apply (extract a driver from a driver access)
472 );
473
474 // append the runtime drivers
475 std::transform(
476 m_aDriversRT.begin(), // "copy from" start
477 m_aDriversRT.end(), // "copy from" end
478 std::back_inserter( aDrivers ), // insert into
479 ExtractDriverFromCollectionElement() // transformation to apply (extract a driver from a driver access)
480 );
481
482 return new ODriverEnumeration( std::move(aDrivers) );
483}
484
485
486css::uno::Type SAL_CALL OSDBCDriverManager::getElementType( )
487{
489}
490
491
493{
494 MutexGuard aGuard(m_aMutex);
495 return !(m_aDriversBS.empty() && m_aDriversRT.empty());
496}
497
498
500{
501 return "com.sun.star.comp.sdbc.OSDBCDriverManager";
502}
503
504sal_Bool SAL_CALL OSDBCDriverManager::supportsService( const OUString& _rServiceName )
505{
506 return cppu::supportsService(this, _rServiceName);
507}
508
509
510Sequence< OUString > SAL_CALL OSDBCDriverManager::getSupportedServiceNames( )
511{
512 return { "com.sun.star.sdbc.DriverManager" };
513}
514
515
516Reference< XInterface > SAL_CALL OSDBCDriverManager::getRegisteredObject( const OUString& _rName )
517{
518 MutexGuard aGuard(m_aMutex);
519 DriverCollection::const_iterator aSearch = m_aDriversRT.find(_rName);
520 if (aSearch == m_aDriversRT.end())
522
523 return aSearch->second;
524}
525
526
527void SAL_CALL OSDBCDriverManager::registerObject( const OUString& _rName, const Reference< XInterface >& _rxObject )
528{
529 MutexGuard aGuard(m_aMutex);
530
531 m_aEventLogger.log( LogLevel::INFO,
532 "attempt to register new driver for name $1$",
533 _rName
534 );
535
536 DriverCollection::const_iterator aSearch = m_aDriversRT.find(_rName);
537 if (aSearch != m_aDriversRT.end())
538 throw ElementExistException();
539 Reference< XDriver > xNewDriver(_rxObject, UNO_QUERY);
540 if (!xNewDriver.is())
541 throw IllegalArgumentException();
542
543 m_aDriversRT.emplace(_rName, xNewDriver);
544
545 m_aEventLogger.log( LogLevel::INFO,
546 "new driver registered for name $1$",
547 _rName
548 );
549}
550
551
552void SAL_CALL OSDBCDriverManager::revokeObject( const OUString& _rName )
553{
554 MutexGuard aGuard(m_aMutex);
555
556 m_aEventLogger.log( LogLevel::INFO,
557 "attempt to revoke driver for name $1$",
558 _rName
559 );
560
561 DriverCollection::iterator aSearch = m_aDriversRT.find(_rName);
562 if (aSearch == m_aDriversRT.end())
564
565 m_aDriversRT.erase(aSearch); // we already have the iterator so we could use it
566
567 m_aEventLogger.log( LogLevel::INFO,
568 "driver revoked for name $1$",
569 _rName
570 );
571}
572
573
574Reference< XDriver > SAL_CALL OSDBCDriverManager::getDriverByURL( const OUString& _rURL )
575{
576 m_aEventLogger.log( LogLevel::INFO,
577 "driver requested for URL $1$",
578 _rURL
579 );
580
581 Reference< XDriver > xDriver( implGetDriverForURL( _rURL ) );
582
583 if ( xDriver.is() )
584 m_aEventLogger.log( LogLevel::INFO,
585 "driver obtained for URL $1$",
586 _rURL
587 );
588
589 return xDriver;
590}
591
592
593Reference< XDriver > OSDBCDriverManager::implGetDriverForURL(const OUString& _rURL)
594{
595 Reference< XDriver > xReturn;
596
597 {
598 const OUString sDriverFactoryName = m_aDriverConfig.getDriverFactoryName(_rURL);
599
600 EqualDriverAccessToName aEqual(sDriverFactoryName);
601 DriverAccessArray::const_iterator aFind = std::find_if(m_aDriversBS.begin(),m_aDriversBS.end(),aEqual);
602 if ( aFind == m_aDriversBS.end() )
603 {
604 // search all bootstrapped drivers
605 aFind = std::find_if(
606 m_aDriversBS.begin(), // begin of search range
607 m_aDriversBS.end(), // end of search range
608 [&_rURL, this] (const DriverAccessArray::value_type& driverAccess) {
609 // extract the driver from the access, then ask the resulting driver for acceptance
610#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13
611#pragma GCC diagnostic push
612#pragma GCC diagnostic ignored "-Wdangling-reference"
613#endif
614 const DriverAccess& ensuredAccess = EnsureDriver(m_xContext)(driverAccess);
615#if defined __GNUC__ && !defined __clang__ && __GNUC__ == 13
616#pragma GCC diagnostic pop
617#endif
618 const Reference<XDriver> driver = ExtractDriverFromAccess()(ensuredAccess);
619 return AcceptsURL(_rURL, driver);
620 });
621 } // if ( m_aDriversBS.find(sDriverFactoryName ) == m_aDriversBS.end() )
622 else
623 {
624 EnsureDriver aEnsure( m_xContext );
625 aEnsure(*aFind);
626 }
627
628 // found something?
629 if ( m_aDriversBS.end() != aFind && aFind->xDriver.is() && aFind->xDriver->acceptsURL(_rURL) )
630 xReturn = aFind->xDriver;
631 }
632
633 if ( !xReturn.is() )
634 {
635 // no -> search the runtime drivers
636 DriverCollection::const_iterator aPos = std::find_if(
637 m_aDriversRT.begin(), // begin of search range
638 m_aDriversRT.end(), // end of search range
639 [&_rURL] (const DriverCollection::value_type& element) {
640 // extract the driver from the collection element, then ask the resulting driver for acceptance
641 const Reference<XDriver> driver = ExtractDriverFromCollectionElement()(element);
642 return AcceptsURL(_rURL, driver);
643 });
644
645 if ( m_aDriversRT.end() != aPos )
646 xReturn = aPos->second;
647 }
648
649 return xReturn;
650}
651
652} // namespace drivermanager
653
654extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
656 css::uno::XComponentContext* context , css::uno::Sequence<css::uno::Any> const&)
657{
658 return cppu::acquire(new drivermanager::OSDBCDriverManager(context));
659}
660
661
662/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Reference< XComponentContext > m_xContext
bool isLoggable(const sal_Int32 _nLogLevel) const
void log(const sal_Int32 _nLogLevel, const OUString &rMessage) const
OUString getDriverFactoryName(std::u16string_view _sUrl) const
mutable::osl::Mutex m_aMutex
css::uno::Type const & get()
virtual sal_Bool SAL_CALL hasMoreElements() override
DriverArray::const_iterator m_aPos
virtual Any SAL_CALL nextElement() override
ODriverEnumeration(DriverArray &&_rDriverSequence)
virtual ~ODriverEnumeration() override
std::vector< Reference< XDriver > > DriverArray
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL getConnectionWithInfo(const OUString &url, const css::uno::Sequence< css::beans::PropertyValue > &info) override
css::uno::Reference< css::sdbc::XDriver > implGetDriverForURL(const OUString &_rURL)
css::uno::Reference< css::uno::XComponentContext > m_xContext
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL setLoginTimeout(sal_Int32 seconds) override
::comphelper::EventLogger m_aEventLogger
void initializeDriverPrecedence()
retrieve the driver order preferences from the configuration and sort m_aDriversBS accordingly.
virtual sal_Bool SAL_CALL hasElements() override
virtual css::uno::Type SAL_CALL getElementType() override
::connectivity::DriversConfig m_aDriverConfig
virtual void SAL_CALL revokeObject(const OUString &Name) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual css::uno::Reference< css::sdbc::XConnection > SAL_CALL getConnection(const OUString &url) override
virtual void SAL_CALL registerObject(const OUString &Name, const css::uno::Reference< css::uno::XInterface > &Object) override
virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() override
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Reference< css::sdbc::XDriver > SAL_CALL getDriverByURL(const OUString &url) override
OSDBCDriverManager(const css::uno::Reference< css::uno::XComponentContext > &_rxContext)
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL getRegisteredObject(const OUString &Name) override
virtual sal_Int32 SAL_CALL getLoginTimeout() override
#define TOOLS_WARN_EXCEPTION(area, stream)
#define DBG_UNHANDLED_EXCEPTION(...)
float u
Reference< XSingleServiceFactory > xFactory
std::mutex m_aMutex
Reference< XComponentContext > mxContext
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * connectivity_OSDBCDriverManager_get_implementation(css::uno::XComponentContext *context, css::uno::Sequence< css::uno::Any > const &)
OUString m_sImplName
@ Exception
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
::cppu::WeakComponentImplHelper< css::sdbc::XDriverManager2, css::lang::XServiceInfo, css::uno::XNamingService > OSDBCDriverManager_Base
constexpr OUStringLiteral SERVICE_SDBC_DRIVER
static void throwNoSuchElementException()
int i
enumrange< T >::Iterator begin(enumrange< T >)
css::uno::Reference< css::lang::XSingleComponentFactory > xComponentFactory
the driver itself
css::uno::Reference< css::sdbc::XDriver > xDriver
the implementation name of the driver
unsigned char sal_Bool