1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #if !defined INCLUDED_JVMFWK_LOCAL_FRAMEWORK_HXX
29 #define INCLUDED_JVMFWK_LOCAL_FRAMEWORK_HXX
30 #include "rtl/ustring.hxx"
31 #include "rtl/byteseq.hxx"
32 #include "jvmfwk/framework.h"
33 #include "jvmfwk/vendorplugin.h"
35 /** typedefs for functions from vendorplugin.h
37 typedef javaPluginError (*jfw_plugin_getAllJavaInfos_ptr
)(
38 rtl_uString
* sVendor
,
39 rtl_uString
* sMinVersion
,
40 rtl_uString
* sMaxVersion
,
41 rtl_uString
* * arExcludeList
,
43 JavaInfo
*** parJavaInfo
,
44 sal_Int32
*nLenInfoList
);
46 typedef javaPluginError (*jfw_plugin_getJavaInfoByPath_ptr
)(
48 rtl_uString
* sVendor
,
49 rtl_uString
* sMinVersion
,
50 rtl_uString
* sMaxVersion
,
51 rtl_uString
* * arExcludeList
,
55 /** starts a Java Virtual Machine.
57 The function shall ensure, that the VM does not abort the process
61 typedef javaPluginError (*jfw_plugin_startJavaVirtualMachine_ptr
)(
63 const JavaVMOption
* options
,
68 typedef javaPluginError (*jfw_plugin_existJRE_ptr
)(
78 static JavaInfo
* copyJavaInfo(const JavaInfo
* pInfo
);
80 enum _transfer_ownership
{TRANSFER
};
81 /*Attaching the pointer to this class. The argument pInfo must not
84 CJavaInfo(::JavaInfo
* info
, _transfer_ownership
);
92 CJavaInfo(const CJavaInfo
&);
94 CJavaInfo
& operator =(const ::JavaInfo
* info
);
95 CJavaInfo
& operator = (const CJavaInfo
& info
);
97 /* The returned class takes ownership of the argument info. info
98 must not been freed afterwards.
100 static CJavaInfo
createWrapper(::JavaInfo
* info
);
101 /*Attaching the pointer to this class. The argument pInfo must not
104 void attach(::JavaInfo
* pInfo
);
105 ::JavaInfo
* detach();
106 const ::JavaInfo
* operator ->() const;
107 operator ::JavaInfo
* ();
108 operator ::JavaInfo
const * () const;
109 ::JavaInfo
* cloneJavaInfo() const;
111 rtl::OUString
getVendor() const;
112 rtl::OUString
getLocation() const;
113 sal_uInt64
getFeatures() const;
116 class FrameworkException
120 FrameworkException(javaFrameworkError err
, const rtl::OString
& msg
):
121 errorCode(err
), message(msg
)
124 javaFrameworkError errorCode
;
125 rtl::OString message
;
130 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */