fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / jvmfwk / source / framework.hxx
blobfcd687c2ff68ae8786649470161bc3c7111195d4
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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,
34 sal_Int32 nLenList,
35 JavaInfo*** parJavaInfo,
36 sal_Int32 *nLenInfoList);
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);
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>
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);
60 typedef javaPluginError (*jfw_plugin_existJRE_ptr)(
61 const JavaInfo *info,
62 sal_Bool *exist);
65 namespace jfw
68 class CJavaInfo
70 static JavaInfo * copyJavaInfo(const JavaInfo * pInfo);
72 enum _transfer_ownership {TRANSFER};
73 /*Attaching the pointer to this class. The argument pInfo must not
74 be freed afterwards.
76 CJavaInfo(::JavaInfo * info, _transfer_ownership);
78 public:
79 ::JavaInfo * pInfo;
83 CJavaInfo();
84 CJavaInfo(const CJavaInfo &);
85 ~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
94 be freed afterwards.
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
109 public:
111 FrameworkException(javaFrameworkError err, const OString& msg):
112 errorCode(err), message(msg)
115 virtual ~FrameworkException() throw () {}
116 javaFrameworkError errorCode;
117 OString message;
120 #endif
122 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */