diff options
| author | 0cyn <kat@vector35.com> | 2026-04-25 15:18:38 -0400 |
|---|---|---|
| committer | 0cyn <kat@vector35.com> | 2026-05-04 12:59:35 -0400 |
| commit | 73976e975ddf4dd0cbb5aa49425cf36e5655cd5c (patch) | |
| tree | 445aafdf56fc2ab3c3fdf8e08e9e84e005abb565 /rust | |
| parent | f389b25261d6f0de54627f1dbc176e852f974c74 (diff) | |
Re-add license text field to API
Diffstat (limited to 'rust')
| -rw-r--r-- | rust/src/repository/plugin.rs | 7 | ||||
| -rw-r--r-- | rust/tests/repository.rs | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/rust/src/repository/plugin.rs b/rust/src/repository/plugin.rs index ac7c9d20..1abee1e8 100644 --- a/rust/src/repository/plugin.rs +++ b/rust/src/repository/plugin.rs @@ -103,6 +103,13 @@ impl Extension { unsafe { BnString::into_string(result as *mut c_char) } } + /// String complete license text for the given plugin + pub fn license_text(&self) -> String { + let result = unsafe { BNPluginGetLicenseText(self.handle.as_ptr()) }; + assert!(!result.is_null()); + unsafe { BnString::into_string(result as *mut c_char) } + } + /// Minimum version info the plugin was tested on pub fn minimum_version_info(&self) -> VersionInfo { let result = unsafe { BNPluginGetMinimumVersionInfo(self.handle.as_ptr()) }; diff --git a/rust/tests/repository.rs b/rust/tests/repository.rs index ac861b2c..d22f900d 100644 --- a/rust/tests/repository.rs +++ b/rust/tests/repository.rs @@ -20,6 +20,7 @@ fn test_list() { for plugin in &plugins { let plugin_path = plugin.path(); let plugin_by_path = repository.plugin_by_path(&plugin_path).unwrap(); + let _license_text = plugin.license_text(); assert_eq!(plugin.package_url(), plugin_by_path.package_url()); } } |
