1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_JVMFWK_SOURCE_FRAMEWORK_HXX
20 #define INCLUDED_JVMFWK_SOURCE_FRAMEWORK_HXX
22 #include "rtl/ustring.hxx"
23 #include "rtl/byteseq.hxx"
24 #include "jvmfwk/framework.h"
25 #include "vendorplugin.hxx"
27 /** typedefs for functions from vendorplugin.hxx
29 typedef javaPluginError (*jfw_plugin_getAllJavaInfos_ptr
)(
30 rtl_uString
* sVendor
,
31 rtl_uString
* sMinVersion
,
32 rtl_uString
* sMaxVersion
,
33 rtl_uString
* * arExcludeList
,
35 JavaInfo
*** parJavaInfo
,
36 sal_Int32
*nLenInfoList
);
38 typedef javaPluginError (*jfw_plugin_getJavaInfoByPath_ptr
)(
40 rtl_uString
* sVendor
,
41 rtl_uString
* sMinVersion
,
42 rtl_uString
* sMaxVersion
,
43 rtl_uString
* * arExcludeList
,
47 /** starts a Java Virtual Machine.
49 The function shall ensure, that the VM does not abort the process
53 typedef javaPluginError (*jfw_plugin_startJavaVirtualMachine_ptr
)(
55 const JavaVMOption
* options
,
60 typedef javaPluginError (*jfw_plugin_existJRE_ptr
)(
70 static JavaInfo
* copyJavaInfo(const JavaInfo
* pInfo
);
72 enum _transfer_ownership
{TRANSFER
};
73 /*Attaching the pointer to this class. The argument pInfo must not
76 CJavaInfo(::JavaInfo
* info
, _transfer_ownership
);
84 CJavaInfo(const CJavaInfo
&);
86 CJavaInfo
& operator =(const ::JavaInfo
* info
);
87 CJavaInfo
& operator = (const CJavaInfo
& info
);
89 /* The returned class takes ownership of the argument info. info
90 must not been freed afterwards.
92 static CJavaInfo
createWrapper(::JavaInfo
* info
);
93 /*Attaching the pointer to this class. The argument pInfo must not
96 void attach(::JavaInfo
* pInfo
);
97 ::JavaInfo
* detach();
98 const ::JavaInfo
* operator ->() const { return pInfo
;}
99 operator ::JavaInfo
* () { return pInfo
;}
100 operator ::JavaInfo
const * () const { return pInfo
;}
101 ::JavaInfo
* cloneJavaInfo() const;
103 OUString
getLocation() const;
104 sal_uInt64
getFeatures() const;
107 class FrameworkException
: public std::exception
111 FrameworkException(javaFrameworkError err
, const OString
& msg
):
112 errorCode(err
), message(msg
)
115 virtual ~FrameworkException() throw () {}
116 javaFrameworkError errorCode
;
122 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */