Kaydet (Commit) 7f57933b authored tarafından Kurt Zenker's avatar Kurt Zenker

INTEGRATION: CWS jl15 (1.2.20); FILE MERGED

2004/11/24 12:39:42 jl 1.2.20.1: #i37225#
üst ad2916ee
......@@ -2,9 +2,9 @@
*
* $RCSfile: sunjre.cxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: hr $ $Date: 2004-07-23 11:51:49 $
* last change: $Author: kz $ $Date: 2004-12-16 11:44:52 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -61,11 +61,13 @@
#include "osl/thread.h"
#include "sunjre.hxx"
#include "sunversion.hxx"
#include "diagnostics.h"
using namespace rtl;
using namespace std;
#define OUSTR(x) ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(x) )
namespace jfw_plugin
{
......@@ -125,5 +127,25 @@ char const* const* SunInfo::getLibraryPaths(int* size)
return NULL;
}
int SunInfo::compareVersions(const rtl::OUString& sSecond) const
{
OUString sFirst = getVersion();
SunVersion version1(sFirst);
JFW_ENSURE(version1, OUSTR("[Java framework] sunjavaplugin"SAL_DLLEXTENSION
" does not know the version: ")
+ sFirst + OUSTR(" as valid for a SUN JRE."));
SunVersion version2(sSecond);
if ( ! version2)
throw MalformedVersionException();
if(version1 == version2)
return 0;
if(version1 > version2)
return 1;
else
return -1;
}
}
......@@ -2,9 +2,9 @@
*
* $RCSfile: sunjre.hxx,v $
*
* $Revision: 1.2 $
* $Revision: 1.3 $
*
* last change: $Author: hr $ $Date: 2004-07-23 11:52:03 $
* last change: $Author: kz $ $Date: 2004-12-16 11:45:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -78,6 +78,7 @@ public:
virtual char const* const* getRuntimePaths(int * size);
virtual char const* const* getLibraryPaths(int* size);
virtual int compareVersions(const rtl::OUString& sSecond) const;
};
}
......
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