/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ /* * This file is part of the LibreOffice project. * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. * * This file incorporates work covered by the following license notice: * * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed * with this work for additional information regarding copyright * ownership. The ASF licenses this file to you under the Apache * License, Version 2.0 (the "License"); you may not use this file * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
FirebirdDriver::FirebirdDriver(const css::uno::Reference< css::uno::XComponentContext >& _rxContext)
: ODriver_BASE(m_aMutex)
, m_aContext(_rxContext)
, m_firebirdTMPDirectory(nullptr, true)
, m_firebirdLockDirectory(nullptr, true)
{ // ::utl::TempFile uses a unique temporary directory (subdirectory of // /tmp or other user specific tmp directory) per instance in which // we can create directories for firebird at will.
m_firebirdTMPDirectory.EnableKillingFile(true);
m_firebirdLockDirectory.EnableKillingFile(true);
// Overrides firebird's default of /tmp or c:\temp
osl_setEnvironment(our_sFirebirdTmpVar.pData, m_firebirdTMPDirectory.GetFileName().pData);
// Overrides firebird's default of /tmp/firebird or c:\temp\firebird
osl_setEnvironment(our_sFirebirdLockVar.pData, m_firebirdLockDirectory.GetFileName().pData);
#ifndef SYSTEM_FIREBIRD // Overrides firebird's hardcoded default of /usr/local/firebird on *nix, // however on Windows it seems to use the current directory as a default.
OUString sMsgURL(u"$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/firebird"_ustr);
::rtl::Bootstrap::expandMacros(sMsgURL);
OUString sMsgPath;
::osl::FileBase::getSystemPathFromFileURL(sMsgURL, sMsgPath);
osl_setEnvironment(our_sFirebirdMsgVar.pData, sMsgPath.pData); #ifdef MACOSX // Set an env. variable to specify library location // for dlopen used in fbclient.
OUString sLibURL("$LO_LIB_DIR");
::rtl::Bootstrap::expandMacros(sLibURL);
OUString sLibPath;
::osl::FileBase::getSystemPathFromFileURL(sLibURL, sLibPath);
osl_setEnvironment(our_sFirebirdLibVar.pData, sLibPath.pData); #endif/*MACOSX*/ #endif/*!SYSTEM_FIREBIRD*/
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.