From 57ef4457becdb5c66a3c0db9e499e1ac491860f2 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 20 May 2016 15:45:02 +0200 Subject: Convert javaPluginError to scoped enum Change-Id: Ib3a32227d50fa9e0f9cc4106ce40a4c3e840f8c7 Reviewed-on: https://gerrit.libreoffice.org/25206 Tested-by: Jenkins Reviewed-by: Noel Grandin --- jvmfwk/inc/vendorplugin.hxx | 64 ++++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 32 deletions(-) (limited to 'jvmfwk/inc/vendorplugin.hxx') diff --git a/jvmfwk/inc/vendorplugin.hxx b/jvmfwk/inc/vendorplugin.hxx index c354087df88c..8df13b153b83 100644 --- a/jvmfwk/inc/vendorplugin.hxx +++ b/jvmfwk/inc/vendorplugin.hxx @@ -46,17 +46,17 @@ of this API may support multiple vendors.

*/ -typedef enum +enum class javaPluginError { - JFW_PLUGIN_E_NONE, - JFW_PLUGIN_E_ERROR, - JFW_PLUGIN_E_INVALID_ARG, - JFW_PLUGIN_E_WRONG_VERSION_FORMAT, - JFW_PLUGIN_E_FAILED_VERSION, - JFW_PLUGIN_E_NO_JRE, - JFW_PLUGIN_E_WRONG_VENDOR, - JFW_PLUGIN_E_VM_CREATION_FAILED -} javaPluginError; + NONE, + Error, + InvalidArg, + WrongVersionFormat, + FailedVersion, + NoJre, + WrongVendor, + VmCreationFailed +}; /** obtains information about installations of Java Runtime Environments (JREs). @@ -98,12 +98,12 @@ typedef enum parJavaInfo. @return - JFW_PLUGIN_E_NONE the function ran successfully.
- JFW_PLUGIN_E_ERROR an error occurred during execution.
- JFW_PLUGIN_E_INVALID_ARG an argument was not valid. For example + javaPluginError::NONE the function ran successfully.
+ javaPluginError::Error an error occurred during execution.
+ javaPluginError::InvalidArg an argument was not valid. For example nSizeExcludeList is greater null but arExcludeList is NULL or NULL pointer were passed for at least on of the strings.
- JFW_PLUGIN_E_WRONG_VERSION_FORMAT the version strings in + javaPluginError::WrongVersionFormat the version strings in sMinVersion,sMaxVersion,arExcludeList are not recognized as valid version strings. */ @@ -145,18 +145,18 @@ javaPluginError jfw_plugin_getAllJavaInfos( on return a pointer to a JavaInfo object. @return - JFW_PLUGIN_E_NONE the function ran successfully.
- JFW_PLUGIN_E_ERROR an error occurred during execution.
- JFW_PLUGIN_E_INVALID_ARG an argument was not valid. For example + javaPluginError::NONE the function ran successfully.
+ javaPluginError::Error an error occurred during execution.
+ javaPluginError::InvalidArg an argument was not valid. For example nSizeExcludeList is greater null but arExcludeList is NULL, NULL pointer were passed for at least on of the strings, sLocation is an empty string.
- JFW_PLUGIN_E_WRONG_VERSION_FORMAT the version strings in + javaPluginError::WrongVersionFormat the version strings in sMinVersion,sMaxVersion,arExcludeList are not recognized as valid version strings. - JFW_PLUGIN_E_FAILED_VERSION there is a JRE at the given location but it does not + javaPluginError::FailedVersion there is a JRE at the given location but it does not meet the version requirements. - JFW_PLUGIN_E_NO_JRE no JRE could be detected at the given location. However, that + javaPluginError::NoJre no JRE could be detected at the given location. However, that does not mean necessarily that there is no JRE. There could be a JRE but it has a vendor which is not supported by this API implementation. */ @@ -189,10 +189,10 @@ javaPluginError jfw_plugin_getJavaInfoByPath( on return a pointer to its JavaInfo object. @return - JFW_PLUGIN_E_NONE the function ran successfully.
- JFW_PLUGIN_E_INVALID_ARG an argument was not valid, for example + javaPluginError::NONE the function ran successfully.
+ javaPluginError::InvalidArg an argument was not valid, for example ppInfo is an invalid pointer. - JFW_PLUGIN_E_NO_JRE no suitable JRE could be detected at the given location. However, that + javaPluginError::NoJre no suitable JRE could be detected at the given location. However, that does not mean necessarily that there is no JRE. There could be a JRE but it has a vendor which is not supported by this API implementation or it does not meet the version requirements. @@ -233,9 +233,9 @@ javaPluginError jfw_plugin_getJavaInfoFromJavaHome( the JavaInfo objects inserted into the existing vector. @return - JFW_PLUGIN_E_NONE the function ran successfully and at least one JRE + javaPluginError::NONE the function ran successfully and at least one JRE that meets the requirements was found.
- JFW_PLUGIN_E_NO_JRE no JavaInfo that meets the version criteria was found + javaPluginError::NoJre no JavaInfo that meets the version criteria was found when inspecting the PATH */ @@ -278,11 +278,11 @@ javaPluginError jfw_plugin_getJavaInfosFromPath( [out] the JNIEnv pointer of the created VM. @return - JFW_PLUGIN_E_NONE the function ran successfully.
- JFW_PLUGIN_E_ERROR an error occurred during execution.
- JFW_PLUGIN_E_WRONG_VENDOR the JavaInfo object was not created + javaPluginError::NONE the function ran successfully.
+ javaPluginError::Error an error occurred during execution.
+ javaPluginError::WrongVendor the JavaInfo object was not created in by this library and the VM cannot be started.
- JFW_PLUGIN_E_INVALID_ARG an argument was not valid. For example + javaPluginError::InvalidArg an argument was not valid. For example pInfo or , ppVM or ppEnv are NULL.
JFW_PLUGIN_E_VM_CREATION_FAILED a VM could not be created. The error was caused @@ -309,9 +309,9 @@ javaPluginError jfw_plugin_startJavaVirtualMachine( only valid if the function returns JFW_E_NONE. @return - JFW_PLUGIN_E_NONE the function ran successfully.
- JFW_PLUGIN_E_ERROR an error occurred during execution.
- JFW_PLUGIN_E_INVALID_ARG pInfo contains invalid data
+ javaPluginError::NONE the function ran successfully.
+ javaPluginError::Error an error occurred during execution.
+ javaPluginError::InvalidArg pInfo contains invalid data
*/ javaPluginError jfw_plugin_existJRE(const JavaInfo *pInfo, sal_Bool *exist); -- cgit