From ce33a153119fe2cff85fa0f5cce77f0291293b4e Mon Sep 17 00:00:00 2001 From: Oliver Bolte Date: Wed, 13 Jun 2007 06:58:34 +0000 Subject: INTEGRATION: CWS jl64 (1.12.80); FILE MERGED 2007/06/07 07:52:58 jl 1.12.80.2: #i76390# support of new bootstrap variable UNO_JAVA_JFW_INSTALL_DATA and UNO_JAVA_JFW_INSTALL_EXPIRE 2007/06/04 08:05:45 jl 1.12.80.1: #i76390 do not create user installation when installing java extensions during setup --- jvmfwk/source/fwkutil.hxx | 54 +++++++++++++++++++++++++++++++++++------------ 1 file changed, 40 insertions(+), 14 deletions(-) (limited to 'jvmfwk/source/fwkutil.hxx') diff --git a/jvmfwk/source/fwkutil.hxx b/jvmfwk/source/fwkutil.hxx index 42937f467ea7..2749e2e22000 100644 --- a/jvmfwk/source/fwkutil.hxx +++ b/jvmfwk/source/fwkutil.hxx @@ -4,9 +4,9 @@ * * $RCSfile: fwkutil.hxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: rt $ $Date: 2005-09-07 19:35:48 $ + * last change: $Author: obo $ $Date: 2007-06-13 07:58:34 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -35,30 +35,59 @@ #if !defined INCLUDED_JVMFWK_FWKUTIL_HXX #define INCLUDED_JVMFWK_FWKUTIL_HXX +#include "sal/config.h" #include "osl/mutex.hxx" #include "rtl/bootstrap.hxx" +#include "rtl/instance.hxx" +#include "rtl/ustrbuf.hxx" +#include "rtl/byteseq.hxx" +#include "osl/thread.hxx" + + + namespace jfw { -osl::Mutex * getFwkMutex(); -rtl::ByteSequence encodeBase16(const rtl::ByteSequence& rawData); -rtl::ByteSequence decodeBase16(const rtl::ByteSequence& data); +/** Returns the file URL of the directory where the framework library + (this library) resides. +*/ +rtl::OUString getLibraryLocation(); -rtl::OUString getPlatform(); /** provides a bootstrap class which already knows the values from the jvmfkwrc file. */ -const rtl::Bootstrap& getBootstrap(); +struct Bootstrap : + public ::rtl::StaticWithInit< const rtl::Bootstrap *, Bootstrap > { + const rtl::Bootstrap * operator () () { + ::rtl::OUStringBuffer buf(256); + buf.append(getLibraryLocation()); + buf.appendAscii(SAL_CONFIGFILE("/jvmfwk3")); + ::rtl::OUString sIni = buf.makeStringAndClear(); + ::rtl::Bootstrap * bootstrap = new ::rtl::Bootstrap(sIni); +#if OSL_DEBUG_LEVEL >=2 + rtl::OString o = rtl::OUStringToOString( sIni , osl_getThreadTextEncoding() ); + fprintf(stderr, "[Java framework] Using configuration file %s\n" , o.getStr() ); +#endif + return bootstrap; + } +}; + +struct FwkMutex: public ::rtl::Static {}; + +//osl::Mutex * getFwkMutex(); + +rtl::ByteSequence encodeBase16(const rtl::ByteSequence& rawData); +rtl::ByteSequence decodeBase16(const rtl::ByteSequence& data); + +rtl::OUString getPlatform(); + +//const rtl::Bootstrap& getBootstrap(); rtl::OUString getDirFromFile(const rtl::OUString& usFilePath); rtl::OUString getFileFromURL(const rtl::OUString& sFileURL); -/** Returns the file URL of the directory where the framework library - (this library) resides. -*/ -rtl::OUString getLibraryLocation(); /** Returns the file URL of the folder where the executable resides. */ @@ -79,9 +108,6 @@ rtl::OUString getExecutableDirectory(); */ rtl::OUString findPlugin( const rtl::OUString & baseUrl, const rtl::OUString & plugin); -//Todo still needed? -rtl::OUString searchFileNextToThisLib(const rtl::OUString & sFile); -class CNodeJava; enum FileStatus -- cgit