From 08a94689cb143eff1b224d1514f9f6c4f4c82b67 Mon Sep 17 00:00:00 2001 From: Mark Lee Date: Sat, 3 Feb 2024 17:22:54 +0000 Subject: [PATCH] Add HTML help for module descriptions --- .../caprica/vlcj/factory/ApplicationApi.java | 2 +- .../vlcj/factory/ModuleDescription.java | 21 +++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/src/main/java/uk/co/caprica/vlcj/factory/ApplicationApi.java b/src/main/java/uk/co/caprica/vlcj/factory/ApplicationApi.java index 8a960d0eb..d0da9cd8b 100644 --- a/src/main/java/uk/co/caprica/vlcj/factory/ApplicationApi.java +++ b/src/main/java/uk/co/caprica/vlcj/factory/ApplicationApi.java @@ -182,7 +182,7 @@ private List getModuleDescriptions(libvlc_module_description_ List result = new ArrayList(); libvlc_module_description_t moduleDescription = moduleDescriptions; while(moduleDescription != null) { - result.add(new ModuleDescription(moduleDescription.psz_name, moduleDescription.psz_shortname, moduleDescription.psz_longname, moduleDescription.psz_help)); + result.add(new ModuleDescription(moduleDescription.psz_name, moduleDescription.psz_shortname, moduleDescription.psz_longname, moduleDescription.psz_help, moduleDescription.psz_help_html)); moduleDescription = moduleDescription.p_next; } return result; diff --git a/src/main/java/uk/co/caprica/vlcj/factory/ModuleDescription.java b/src/main/java/uk/co/caprica/vlcj/factory/ModuleDescription.java index 5fd7a0f4d..c7e7bc18f 100644 --- a/src/main/java/uk/co/caprica/vlcj/factory/ModuleDescription.java +++ b/src/main/java/uk/co/caprica/vlcj/factory/ModuleDescription.java @@ -44,6 +44,11 @@ public final class ModuleDescription { */ private final String help; + /** + * HTML help text. + */ + private final String helpHtml; + /** * Create a new module description * @@ -51,12 +56,14 @@ public final class ModuleDescription { * @param shortName short name * @param longName long name * @param help help text + * @param helpHtml HTML help text */ - public ModuleDescription(String name, String shortName, String longName, String help) { + public ModuleDescription(String name, String shortName, String longName, String help, String helpHtml) { this.name = name; this.shortName = shortName; this.longName = longName; this.help = help; + this.helpHtml = helpHtml; } /** @@ -95,6 +102,15 @@ public String help() { return help; } + /** + * Get the module HTML help text. + * + * @return HTML help text + */ + public String helpHtml() { + return helpHtml; + } + @Override public String toString() { StringBuilder sb = new StringBuilder(200); @@ -102,7 +118,8 @@ public String toString() { sb.append("name=").append(name).append(','); sb.append("shortName=").append(shortName).append(','); sb.append("longName=").append(longName).append(','); - sb.append("help=").append(help).append(']'); + sb.append("help=").append(help).append(','); + sb.append("helpHtml=").append(help).append(']'); return sb.toString(); } }