LCOV - code coverage report
Current view: top level - jvmfwk/source - framework.hxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 4 0.0 %
Date: 2014-04-14 Functions: 0 2 0.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             : #ifndef INCLUDED_JVMFWK_LOCAL_FRAMEWORK_HXX
      20             : #define INCLUDED_JVMFWK_LOCAL_FRAMEWORK_HXX
      21             : 
      22             : #include "rtl/ustring.hxx"
      23             : #include "rtl/byteseq.hxx"
      24             : #include "jvmfwk/framework.h"
      25             : #include "jvmfwk/vendorplugin.h"
      26             : 
      27             : /** typedefs for functions from vendorplugin.h
      28             :  */
      29             : typedef javaPluginError (*jfw_plugin_getAllJavaInfos_ptr)(
      30             :     rtl_uString * sVendor,
      31             :     rtl_uString * sMinVersion,
      32             :     rtl_uString * sMaxVersion,
      33             :     rtl_uString * * arExcludeList,
      34             :     sal_Int32  nLenList,
      35             :     JavaInfo*** parJavaInfo,
      36             :     sal_Int32 *nLenInfoList);
      37             : 
      38             : typedef javaPluginError (*jfw_plugin_getJavaInfoByPath_ptr)(
      39             :     rtl_uString * sPath,
      40             :     rtl_uString * sVendor,
      41             :     rtl_uString * sMinVersion,
      42             :     rtl_uString * sMaxVersion,
      43             :     rtl_uString * * arExcludeList,
      44             :     sal_Int32  nLenList,
      45             :     JavaInfo** ppInfo);
      46             : 
      47             : /** starts a Java Virtual Machine.
      48             :     <p>
      49             :     The function shall ensure, that the VM does not abort the process
      50             :     during instantiation.
      51             :     </p>
      52             :  */
      53             : typedef javaPluginError (*jfw_plugin_startJavaVirtualMachine_ptr)(
      54             :     const JavaInfo *info,
      55             :     const JavaVMOption* options,
      56             :     sal_Int32 cOptions,
      57             :     JavaVM ** ppVM,
      58             :     JNIEnv ** ppEnv);
      59             : 
      60             : typedef javaPluginError (*jfw_plugin_existJRE_ptr)(
      61             :     const JavaInfo *info,
      62             :     sal_Bool *exist);
      63             : 
      64             : 
      65             : namespace jfw
      66             : {
      67             : 
      68             : class CJavaInfo
      69             : {
      70             :     static JavaInfo * copyJavaInfo(const JavaInfo * pInfo);
      71             : 
      72             :     enum _transfer_ownership {TRANSFER};
      73             :     /*Attaching the pointer to this class. The argument pInfo must not
      74             :     be freed afterwards.
      75             :     */
      76             :     CJavaInfo(::JavaInfo * info, _transfer_ownership);
      77             : 
      78             : public:
      79             :     ::JavaInfo * pInfo;
      80             : 
      81             : 
      82             : 
      83             :     CJavaInfo();
      84             :     CJavaInfo(const CJavaInfo &);
      85             :     ~CJavaInfo();
      86             :     CJavaInfo& operator =(const ::JavaInfo* info);
      87             :     CJavaInfo & operator = (const CJavaInfo& info);
      88             : 
      89             :     /* The returned class takes ownership of the argument info. info
      90             :     must not been freed afterwards.
      91             :     */
      92             :     static CJavaInfo createWrapper(::JavaInfo* info);
      93             :     /*Attaching the pointer to this class. The argument pInfo must not
      94             :     be freed afterwards.
      95             :     */
      96             :     void attach(::JavaInfo* pInfo);
      97             :     ::JavaInfo * detach();
      98             :     const ::JavaInfo* operator ->() const;
      99             :     operator ::JavaInfo* ();
     100             :     operator ::JavaInfo const * () const;
     101             :     ::JavaInfo* cloneJavaInfo() const;
     102             : 
     103             :     OUString getVendor() const;
     104             :     OUString getLocation() const;
     105             :     sal_uInt64 getFeatures() const;
     106             : };
     107             : 
     108           0 : class FrameworkException
     109             : {
     110             : public:
     111             : 
     112           0 :     FrameworkException(javaFrameworkError err, const OString& msg):
     113           0 :         errorCode(err), message(msg)
     114             :         {
     115           0 :         }
     116             :     javaFrameworkError errorCode;
     117             :     OString message;
     118             : };
     119             : }
     120             : #endif
     121             : 
     122             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10