diff options
author | Oliver Bolte <obo@openoffice.org> | 2007-06-13 06:58:34 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2007-06-13 06:58:34 +0000 |
commit | 8a7de5a8b8f9b29ca27f743f7a98441ca85b61da (patch) | |
tree | 66b4852c4c7198095487ec84b80f74182af3eff6 /jvmfwk | |
parent | f5781cbd36f8e7dc1aea9ffa36a8c9dc7dbc4c1a (diff) |
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
Diffstat (limited to 'jvmfwk')
-rw-r--r-- | jvmfwk/source/fwkutil.hxx | 54 |
1 files changed, 40 insertions, 14 deletions
diff --git a/jvmfwk/source/fwkutil.hxx b/jvmfwk/source/fwkutil.hxx index 9bc84f9b7..61e733cbd 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, FwkMutex> {}; + +//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 |