LCOV - code coverage report
Current view: top level - jvmfwk/plugins/sunmajor/pluginlib - otherjre.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 3 13 23.1 %
Date: 2014-04-14 Functions: 1 5 20.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : 
      21             : #include "osl/thread.h"
      22             : #include "otherjre.hxx"
      23             : 
      24             : using namespace std;
      25             : 
      26             : using ::rtl::Reference;
      27             : namespace jfw_plugin
      28             : {
      29             : 
      30           0 : Reference<VendorBase> OtherInfo::createInstance()
      31             : {
      32           0 :     return new OtherInfo;
      33             : }
      34             : 
      35             : 
      36         396 : char const* const* OtherInfo::getJavaExePaths(int * size)
      37             : {
      38             :     static char const * ar[] = {
      39             : #if defined(WNT)
      40             :         "bin/java.exe",
      41             :         "jre/bin/java.exe"
      42             : #elif defined UNX
      43             :         "bin/java",
      44             :         "jre/bin/java"
      45             : #endif
      46             :     };
      47         396 :         *size = sizeof (ar) / sizeof (char*);
      48         396 :     return ar;
      49             : }
      50             : 
      51           0 : char const* const* OtherInfo::getRuntimePaths(int * size)
      52             : {
      53             :     static char const* ar[]= {
      54             : #if defined(WNT)
      55             :         "/bin/client/jvm.dll",
      56             :         "/bin/hotspot/jvm.dll",
      57             :         "/bin/classic/jvm.dll",
      58             :     "/bin/jrockit/jvm.dll"
      59             : #elif defined UNX
      60             : #ifdef MACOSX
      61             :         "/../../../../../Frameworks/JavaVM.framework/JavaVM"  //as of  1.6.0_22
      62             : #else
      63             :         "/lib/" JFW_PLUGIN_ARCH "/client/libjvm.so", // for Blackdown PPC
      64             :         "/lib/" JFW_PLUGIN_ARCH "/server/libjvm.so", // for Blackdown AMD64
      65             :         "/lib/" JFW_PLUGIN_ARCH "/classic/libjvm.so", // for Blackdown PPC
      66             :         "/lib/" JFW_PLUGIN_ARCH "/jrockit/libjvm.so", // for Java of BEA Systems
      67             :         "/bin/classic/libjvm.so", // fallback for older for IBM Java
      68             :         "/jre/bin/classic/libjvm.so" // fallback for older for IBM Java
      69             : #endif
      70             : #endif
      71             : 
      72             :     };
      73           0 :     *size = sizeof(ar) / sizeof (char*);
      74           0 :     return ar;
      75             : }
      76             : 
      77           0 : char const* const* OtherInfo::getLibraryPaths(int* size)
      78             : {
      79             : 
      80             : #if defined(UNX) && !defined(MACOSX)
      81             :     //mac version does not have a ld library path anymore
      82             :     static char const * ar[] = {
      83             :         "/bin",
      84             :         "/jre/bin",
      85             :         "/bin/classic",
      86             :         "/jre/bin/classic",
      87             :         "/lib/" JFW_PLUGIN_ARCH "/client",
      88             :         "/lib/" JFW_PLUGIN_ARCH "/server",
      89             :         "/lib/" JFW_PLUGIN_ARCH "/classic",
      90             :         "/lib/" JFW_PLUGIN_ARCH "/jrockit",
      91             :         "/lib/" JFW_PLUGIN_ARCH "/native_threads",
      92             :         "/lib/" JFW_PLUGIN_ARCH
      93             :     };
      94             : 
      95           0 :     *size = sizeof(ar) / sizeof (char*);
      96           0 :     return ar;
      97             : #else
      98             :     *size = 0;
      99             :     return NULL;
     100             : #endif
     101             : }
     102             : 
     103           0 : int OtherInfo::compareVersions(const OUString& /*sSecond*/) const
     104             : {
     105             :     //Need to provide an own algorithm for comparing version.
     106             :     //Because this function returns always 0, which means the version of
     107             :     //this JRE and the provided version "sSecond" are equal, one cannot put
     108             :     //any excludeVersion entries in the javavendors.xml file.
     109           0 :     return 0;
     110             : }
     111             : 
     112             : }
     113             : 
     114             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10