summaryrefslogtreecommitdiffstats
path: root/udkapi/com/sun/star/java
diff options
context:
space:
mode:
Diffstat (limited to 'udkapi/com/sun/star/java')
-rw-r--r--udkapi/com/sun/star/java/InvalidJavaSettingsException.idl44
-rw-r--r--udkapi/com/sun/star/java/JavaDisabledException.idl43
-rw-r--r--udkapi/com/sun/star/java/JavaInitializationException.idl51
-rw-r--r--udkapi/com/sun/star/java/JavaNotConfiguredException.idl42
-rw-r--r--udkapi/com/sun/star/java/JavaNotFoundException.idl40
-rw-r--r--udkapi/com/sun/star/java/JavaVMCreationFailureException.idl53
-rw-r--r--udkapi/com/sun/star/java/JavaVirtualMachine.idl41
-rw-r--r--udkapi/com/sun/star/java/MissingJavaRuntimeException.idl45
-rw-r--r--udkapi/com/sun/star/java/RestartRequiredException.idl40
-rw-r--r--udkapi/com/sun/star/java/WrongJavaVersionException.idl52
-rw-r--r--udkapi/com/sun/star/java/XJavaThreadRegister_11.idl58
-rw-r--r--udkapi/com/sun/star/java/XJavaVM.idl116
12 files changed, 625 insertions, 0 deletions
diff --git a/udkapi/com/sun/star/java/InvalidJavaSettingsException.idl b/udkapi/com/sun/star/java/InvalidJavaSettingsException.idl
new file mode 100644
index 000000000..85297053d
--- /dev/null
+++ b/udkapi/com/sun/star/java/InvalidJavaSettingsException.idl
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef __com_sun_star_java_InvalidJavaSettingsException_idl__
+#define __com_sun_star_java_InvalidJavaSettingsException_idl__
+
+#include <com/sun/star/java/JavaInitializationException.idl>
+
+module com { module sun { module star { module java {
+
+
+/** indicates the Java settings have been modified.
+
+ <p>The Java framework uses a configuration file, which can be used
+ by distributors to determine what versions are supported. If this
+ file is modified, then the current settings are regarded as invalid.</p>
+
+ @since OOo 2.0
+ */
+exception InvalidJavaSettingsException: JavaInitializationException
+{
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/udkapi/com/sun/star/java/JavaDisabledException.idl b/udkapi/com/sun/star/java/JavaDisabledException.idl
new file mode 100644
index 000000000..a8673b519
--- /dev/null
+++ b/udkapi/com/sun/star/java/JavaDisabledException.idl
@@ -0,0 +1,43 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef __com_sun_star_java_JavaDisabledException_idl__
+#define __com_sun_star_java_JavaDisabledException_idl__
+
+#include <com/sun/star/java/JavaInitializationException.idl>
+
+module com { module sun { module star { module java {
+
+
+/** indicates that Java could not be initialized because it has
+ been switched off.<p>
+ The user has switched off Java in the configuration of the office,
+ for example by means of the options dialog.
+
+ @since OOo 1.1.2
+ */
+published exception JavaDisabledException: JavaInitializationException
+{
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/udkapi/com/sun/star/java/JavaInitializationException.idl b/udkapi/com/sun/star/java/JavaInitializationException.idl
new file mode 100644
index 000000000..5021f1536
--- /dev/null
+++ b/udkapi/com/sun/star/java/JavaInitializationException.idl
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef __com_sun_star_java_JavaInitializationException_idl__
+#define __com_sun_star_java_JavaInitializationException_idl__
+
+#include <com/sun/star/uno/DeploymentException.idl>
+
+module com { module sun { module star { module java {
+
+
+/** indicates that there is no Java available <p>
+ It is presumed that Java is a vital part of an office installation.
+ That is, if Java does work for some reason, it is not guaranteed that
+ the office is functional. A JavaInitializationException is therefore
+ caused by some misconfiguration of Java which is closer described by
+ other exceptions in this namespace which inherit JavaInitializationException.
+ These are:
+ <p>
+ com::sun::star::java::JavaDisabledException <br>
+ com::sun::star::java::JavaNotConfiguredException <br>
+ com::sun::star::java::MissingJavaRuntimeException <br>
+ com::sun::star::java::JavaVMCreationFailureException <br>
+
+ @since OOo 1.1.2
+ */
+published exception JavaInitializationException: com::sun::star::uno::DeploymentException
+{
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/udkapi/com/sun/star/java/JavaNotConfiguredException.idl b/udkapi/com/sun/star/java/JavaNotConfiguredException.idl
new file mode 100644
index 000000000..001715aac
--- /dev/null
+++ b/udkapi/com/sun/star/java/JavaNotConfiguredException.idl
@@ -0,0 +1,42 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef __com_sun_star_java_JavaNotConfiguredException_idl__
+#define __com_sun_star_java_JavaNotConfiguredException_idl__
+
+#include <com/sun/star/java/JavaInitializationException.idl>
+
+module com { module sun { module star { module java {
+
+
+/** indicates that the user did not configure Java for an Office installation. <p>
+ This exception occurs if there is no java.ini or javarc available. This usually
+ happens if a user cancels the Java configuration which of the office.
+
+ @since OOo 1.1.2
+ */
+published exception JavaNotConfiguredException: JavaInitializationException
+{
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/udkapi/com/sun/star/java/JavaNotFoundException.idl b/udkapi/com/sun/star/java/JavaNotFoundException.idl
new file mode 100644
index 000000000..76566cd28
--- /dev/null
+++ b/udkapi/com/sun/star/java/JavaNotFoundException.idl
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef __com_sun_star_java_JavaNotFoundException_idl__
+#define __com_sun_star_java_JavaNotFoundException_idl__
+
+#include <com/sun/star/java/JavaInitializationException.idl>
+
+module com { module sun { module star { module java {
+
+
+/** indicates that no suitable JRE was found.
+
+ @since OOo 2.0
+ */
+exception JavaNotFoundException: JavaInitializationException
+{
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/udkapi/com/sun/star/java/JavaVMCreationFailureException.idl b/udkapi/com/sun/star/java/JavaVMCreationFailureException.idl
new file mode 100644
index 000000000..2c2bab903
--- /dev/null
+++ b/udkapi/com/sun/star/java/JavaVMCreationFailureException.idl
@@ -0,0 +1,53 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef __com_sun_star_java_JavaVMCreationFailureException_idl__
+#define __com_sun_star_java_JavaVMCreationFailureException_idl__
+
+#include <com/sun/star/java/JavaInitializationException.idl>
+
+module com { module sun { module star { module java {
+
+
+/** indicates that the Java Virtual Machine could not be created <p>
+ This exception can be thrown when the creation of the Java Virtual
+ Machine failed, even if the runtime library could be loaded.
+ Possible reasons for a failure are that JNI_CreateJavaVM returns
+ an error code that reflects a failure, JNI_CreateJavaVM does not
+ return because it tries to quit the process ( _exit), the shared
+ library is corrupted, so that the symbols for JNI_GetDefaultVMInitArgs
+ or JNI_CreateJavaVM cannot be found, etc.
+
+ @since OOo 1.1.2
+ */
+published exception JavaVMCreationFailureException: JavaInitializationException
+{
+ /** contains an error code that reflects the returned error code of
+ JNI_CreateJavaVM or other errors. A negative value represents
+ the returned error code of JNI_CreateJavaVM. All other values
+ indicate a different cause.
+ */
+ long ErrorCode;
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/udkapi/com/sun/star/java/JavaVirtualMachine.idl b/udkapi/com/sun/star/java/JavaVirtualMachine.idl
new file mode 100644
index 000000000..e5d049d21
--- /dev/null
+++ b/udkapi/com/sun/star/java/JavaVirtualMachine.idl
@@ -0,0 +1,41 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef __com_sun_star_java_JavaVirtualMachine_idl__
+#define __com_sun_star_java_JavaVirtualMachine_idl__
+
+#include <com/sun/star/java/XJavaVM.idl>
+
+module com { module sun { module star { module java {
+
+
+/** Exports interfaces to handle a Java VM.
+
+ @deprecated
+ A UNO service seems to be at the wrong abstraction level for this
+ functionality. This should probably be replaced by an appropriate C/C++
+ API.
+ */
+published service JavaVirtualMachine : XJavaVM;
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/udkapi/com/sun/star/java/MissingJavaRuntimeException.idl b/udkapi/com/sun/star/java/MissingJavaRuntimeException.idl
new file mode 100644
index 000000000..563b0b270
--- /dev/null
+++ b/udkapi/com/sun/star/java/MissingJavaRuntimeException.idl
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef __com_sun_star_java_MissingJavaRuntimeException_idl__
+#define __com_sun_star_java_MissingJavaRuntimeException_idl__
+
+#include <com/sun/star/java/JavaInitializationException.idl>
+
+module com { module sun { module star { module java {
+
+
+/** indicates that the Java runtime library could not be found. <p>
+ This happens when a user moves or deletes a Java installation after
+ the office has been configured to use that Java installation.
+
+ @since OOo 1.1.2
+ */
+published exception MissingJavaRuntimeException: JavaInitializationException
+{
+ /** contains the path to the runtime lib as file URL.
+ */
+ string URLRuntimeLib;
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/udkapi/com/sun/star/java/RestartRequiredException.idl b/udkapi/com/sun/star/java/RestartRequiredException.idl
new file mode 100644
index 000000000..437f43925
--- /dev/null
+++ b/udkapi/com/sun/star/java/RestartRequiredException.idl
@@ -0,0 +1,40 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef __com_sun_star_java_RestartRequiredException_idl__
+#define __com_sun_star_java_RestartRequiredException_idl__
+
+#include <com/sun/star/java/JavaInitializationException.idl>
+
+module com { module sun { module star { module java {
+
+
+/** indicates that the office must be restarted before a JRE can be used.
+
+ @since OOo 2.0
+ */
+exception RestartRequiredException: JavaInitializationException
+{
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/udkapi/com/sun/star/java/WrongJavaVersionException.idl b/udkapi/com/sun/star/java/WrongJavaVersionException.idl
new file mode 100644
index 000000000..2e5d0e312
--- /dev/null
+++ b/udkapi/com/sun/star/java/WrongJavaVersionException.idl
@@ -0,0 +1,52 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef __com_sun_star_java_WrongJavaVersionException_idl__
+#define __com_sun_star_java_WrongJavaVersionException_idl__
+
+#include <com/sun/star/uno/Exception.idl>
+
+module com { module sun { module star { module java {
+
+/** indicates that an operation involving Java (probably executing Java code)
+ failed due to a wrong Java version.
+ */
+published exception WrongJavaVersionException: com::sun::star::uno::Exception
+{
+ /** contains the lowest Java version for which the operation would
+ succeed, or is left empty if this is unknown.
+ */
+ string LowestSupportedVersion;
+
+ /** contains the highest Java version for which the operation would
+ succeed, or is left empty if this is unknown.
+ */
+ string HighestSupportedVersion;
+
+ /** contains the Java version that has been detected, or is left empty if
+ this is unknown.
+ */
+ string DetectedVersion;
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/udkapi/com/sun/star/java/XJavaThreadRegister_11.idl b/udkapi/com/sun/star/java/XJavaThreadRegister_11.idl
new file mode 100644
index 000000000..a8ce9fa11
--- /dev/null
+++ b/udkapi/com/sun/star/java/XJavaThreadRegister_11.idl
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef __com_sun_star_java_XJavaThreadRegister_11_idl__
+#define __com_sun_star_java_XJavaThreadRegister_11_idl__
+
+#include <com/sun/star/uno/XInterface.idl>
+
+
+
+module com { module sun { module star { module java {
+
+/** must be implemented by the user of the XJavaThreadRegister_11.
+
+ @note incomplete
+ @deprecated
+ */
+published interface XJavaThreadRegister_11: com::sun::star::uno::XInterface
+{
+ /** returns `TRUE` if the current thread is already attached to the VM otherwise `FALSE`.
+ */
+ boolean isThreadAttached();
+
+ /** registers the current thread.
+
+ <p>This method should be called every time a JNI function is called from Java. </p>
+ */
+ void registerThread();
+
+
+ /** revokes the current thread from the list of registered threads.
+
+ <p>This method should be called at the end of every JNI call from Java. </p>
+ */
+ void revokeThread();
+};
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/udkapi/com/sun/star/java/XJavaVM.idl b/udkapi/com/sun/star/java/XJavaVM.idl
new file mode 100644
index 000000000..30f7e5c7d
--- /dev/null
+++ b/udkapi/com/sun/star/java/XJavaVM.idl
@@ -0,0 +1,116 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef __com_sun_star_java_XJavaVM_idl__
+#define __com_sun_star_java_XJavaVM_idl__
+
+#include <com/sun/star/uno/XInterface.idl>
+
+
+module com { module sun { module star { module java {
+
+/** must be implemented by the user of the XJavaVM.
+
+ @deprecated
+ A UNO interface seems to be at the wrong abstraction level for this
+ functionality (also, the C++ classes <code>jvmaccess::VirtualMachine</code>
+ and <code>jvmaccess::UnoVirtualMachine</code> used by
+ com::sun::star::java::XJavaVM::getJavaVM() are not
+ part of the public C++ UNO runtime API). This should probably be replaced
+ by an appropriate C/C++ API.
+ */
+published interface XJavaVM: com::sun::star::uno::XInterface
+{
+ /** returns the address of the Java Virtual Machine.
+
+ <p>If the VM is not already instantiated, it will be now.</p>
+
+ <p>If the <code>processID</code> is a normal 16-byte ID, the returned
+ `any` contains a JNI <code>JavaVM</code> pointer as a
+ `long` or `hyper` integer (depending on the
+ platform). If the <code>processID</code> does not match the current
+ process, or if the VM cannot be instantiated for whatever reason, a
+ `VOID` `any` is returned.</p>
+
+ <p>If the <code>processID</code> has an additional 17th byte of
+ value&nbsp;<code>0</code>, the returned `any` contains a
+ non&ndash;reference-counted pointer to a (reference-counted) instance of
+ the C++ <code>jvmaccess::VirtualMachine</code> class, always represented
+ as a `hyper` integer. The pointer is guaranteed to be valid
+ as long as the reference to this
+ com::sun::star::java::XJavaVM is valid (but the
+ pointer should be converted into a reference-counted reference as soon
+ as possible). Again, if the first 16 bytes of the
+ <code>processID</code> do not match the current process, or if the VM
+ cannot be instantiated for whatever reason, a `VOID` `any`
+ is returned.</p>
+
+ <p>If the <code>processID</code> has an additional 17th byte of
+ value&nbsp;<code>1</code>, the returned `any` contains a
+ non&ndash;reference-counted pointer to a (reference-counted) instance of
+ the C++ <code>jvmaccess::UnoVirtualMachine</code> class, always
+ represented as a `hyper` integer. The pointer is guaranteed
+ to be valid as long as the reference to this
+ com::sun::star::java::XJavaVM is valid. Again, if
+ the first 16 bytes of the <code>processID</code> do not match the
+ current process, or if the VM cannot be instantiated for whatever
+ reason, a `VOID` `any` is returned.</p>
+
+ <p>The first form (returning a JNI <code>JavaVM</code> pointer) is
+ mainly for backwards compatibility, new code should use the second form
+ (returning a pointer to a <code>jvmaccess::VirtualMachine</code>) if it
+ does not want to use the Java UNO environment, and it should use the
+ third form (returning a pointer to a
+ <code>jvmaccess::UnoVirtualMachine</code>) if it wants to use the Java
+ UNO environment. For example, one advantage of using
+ <code>jvmaccess::VirtualMachine</code> instead of the raw
+ <code>JavaVM</code> pointer is that whenever you attach a native thread
+ to the Java virtual machine, that thread's context
+ <code>ClassLoader</code> (see
+ <code>java.lang.Thread.getContextClassLoader</code>) will automatically
+ be set to a meaningful value.</p>
+
+ @param processID
+ The process ID of the caller's process, possibly extended by a 17th byte
+ of value <code>0</code> or&nbsp;<code>1</code>.
+
+ @return
+ On success, the `any` contains a pointer represented as
+ `long` or `hyper`, otherwise the `any`
+ is `VOID`.
+ */
+ any getJavaVM( [in] sequence<byte> processID );
+
+ /** returns `TRUE` if the VM is started successfully, otherwise `FALSE`.
+ */
+ boolean isVMStarted();
+
+ /** Returns `TRUE` if the VM is enabled.
+
+ <p>It is only possible to get the VM, if this method return 0. </p>
+ */
+ boolean isVMEnabled();
+
+};
+
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */