Kaydet (Commit) a11075a9 authored tarafından Jens-Heiner Rechtien's avatar Jens-Heiner Rechtien

INTEGRATION: CWS jl13 (1.9.10); FILE MERGED

2004/10/20 13:30:39 jl 1.9.10.3: #i29390#
2004/10/08 17:31:04 jl 1.9.10.2: #29930#
2004/09/29 13:43:50 jl 1.9.10.1: #i29390# using framework in other applications
üst 871dd7fd
......@@ -2,9 +2,9 @@
*
* $RCSfile: fwkutil.hxx,v $
*
* $Revision: 1.9 $
* $Revision: 1.10 $
*
* last change: $Author: hr $ $Date: 2004-07-23 11:55:20 $
* last change: $Author: hr $ $Date: 2004-11-09 14:01:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -62,13 +62,7 @@
#define INCLUDED_JVMFWK_FWKUTIL_HXX
#include "osl/mutex.hxx"
#include "osl/module.hxx"
#include "rtl/byteseq.hxx"
#include "libxml/parser.h"
#include "libxml/xpath.h"
#define ENVIRONMENT_VAR_JRE_PATH "JAVA_HOME"
#include "rtl/bootstrap.hxx"
namespace jfw
{
osl::Mutex * getFwkMutex();
......@@ -77,146 +71,66 @@ rtl::ByteSequence encodeBase16(const rtl::ByteSequence& rawData);
rtl::ByteSequence decodeBase16(const rtl::ByteSequence& data);
rtl::OUString getPlatform();
/** //Todo
Gets the directory where the user data is written
Can have these values:
- ~/.StarOffice/user/config (used in office)
- arbitrary directory determined by environment variable
- tmp directory (running out of office, e.g. regcomp)
@return
File URL of the directory
*/
rtl::OUString getJavaSettingsDirectory();
/** provides a bootstrap class which already knows the values from the
jvmfkwrc file.
*/
const rtl::Bootstrap& getBootstrap();
enum JFW_MODE
{
/** The mode is unknown.
*/
JFW_MODE_INDETERMINED,
/** This library is loaded in an office process.
*/
JFW_MODE_OFFICE,
/** We are NOT in an office process. The javavendors.xml is located next to
the jvmfwk.dll, the javasettings.xml is NEIHER created, NOR read or written.
As class path the environment variable CLASSPATH is used. The JRE, which
is to be used is determined by the environment variable JAVA_HOME. It must
contain a file URL to the JRE.
*/
JFW_MODE_ENV_SIMPLE
};
rtl::OUString getDirFromFile(const rtl::OUString& usFilePath);
JFW_MODE getMode();
/** Get the file URL to the javasettings.xml
*/
rtl::OUString getUserSettingsURL();
rtl::OString getUserSettingsPath();
rtl::OUString getFileFromURL(const rtl::OUString& sFileURL);
/** returns .../javasettings_wnt_x86.xml.
/** Returns the file URL of the directory where the framework library
(this library) resides.
*/
rtl::OUString getLibraryLocation();
Or other platform suffixes
/** Returns the file URL of the folder where the executable resides.
*/
rtl::OUString getSharedSettingsURL();
rtl::OString getSharedSettingsPath();
/** returns .../javasettings.xml.
rtl::OUString getExecutableDirectory();
/** Locates the plugin library and returns the file URL.
The argument is just the name of the plugin or a relative path
from the directory of the executable.
*/
rtl::OUString getSharedSettingsURLNoPlatformSuffix();
rtl::OString getSharedSettingsPathNoPlatformSuffix();
rtl::OUString getBaseInstallation();
rtl::OUString getVendorSettingsURL();
rtl::OString getVendorSettingsPath();
rtl::OUString getDirFromFile(const rtl::OUString& usFilePath);
rtl::OUString getFileFromURL(const rtl::OUString& sFileURL);
rtl::OUString findPlugin(const rtl::OUString & plugin);
//Todo still needed?
rtl::OUString searchFileNextToThisLib(const rtl::OUString & sFile);
class CNodeJava;
/** creates the -Djava.class.path option with the complete classpath.
If param mode is JFW_MODE_ENV_SIMPLE then the param javaSettings is ignored.
*/
javaFrameworkError makeClassPathOption(
JFW_MODE mode, CNodeJava & javaSettings, /*out*/rtl::OString & sOption);
struct PluginLibrary;
class VersionInfo;
class CJavaInfo;
javaFrameworkError getVendorPluginURLs(
const xmlDocPtr doc,
const xmlXPathContextPtr context,
std::vector<PluginLibrary> * vecPlugins);
javaFrameworkError getSupportedVendors(
const xmlDocPtr doc,
const xmlXPathContextPtr context,
std::vector<rtl::OUString> * vecVendors);
bool isAccessibilitySupportDesired();
enum FileStatus
{
FILE_OK,
FILE_DOES_NOT_EXIST,
FILE_INVALID
};
/** checks if the URL is a file.
If it is a link to a file than
it is resolved. Assuming that the argument
represents a relative URL then FILE_INVALID
is returned.
javaFrameworkError getVersionInformation(
const xmlDocPtr doc,
const xmlXPathContextPtr context,
const rtl::OUString & sVendor,
VersionInfo *pVersionInfo);
@return
one of the values of FileStatus.
/** Gets the file URL to the plubin library for the currently selected Java.
@exception
Errors occured during determining if the file exists
*/
javaFrameworkError getPluginLibrary(
const rtl::OUString & sVendor, rtl::OUString & sLibPathe);
/** Called from writeJavaInfoData. It sets the process identifier. When
java is to be started, then the current id is compared to the one set by
this function. If they are identical then the Java was selected in the
same process. If that Java needs a prepared environment, such as a
LD_LIBRARY_PATH, then it must not be started in this process.
*/
void setJavaSelected();
FileStatus checkFileURL(const rtl::OUString & path);
/** Determines if the currently selected Java was set in this process.
@see setProcessId()
*/
bool wasJavaSelectedInSameProcess();
/**
@param pDoc
must not be freed within the function.
@param pJavaInfoNode
must not be freed within the function.
*/
javaFrameworkError writeElementJavaInfo(xmlDoc* pDoc,
xmlNode* pJavaInfoNode,
const jfw::CJavaInfo & aInfo);
struct PluginLibrary;
class VersionInfo;
class CJavaInfo;
bool isAccessibilitySupportDesired();
javaFrameworkError buildClassPathFromDirectory(const rtl::OUString & relPath,
rtl::OUString & sClassPath);
rtl::OUString buildClassPathFromDirectory(const rtl::OUString & relPath);
rtl::OUString retrieveClassPath( ::rtl::OUString const & macro );
// class CProcessId
// {
// sal_uInt8 m_arId[16];
// bool m_bValid;
// public:
// CProcessId();
// /**
// If the argument is NULL or the object is invalid then
// false is returned.
// */
// bool operator == (const sal_uInt8 * arId) const;
// void set();
// bool isValid() const;
// };
}
#endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment