mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-03-18 18:51:08 +03:00
plugin_framework, manager, install plugin
Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
@@ -46,18 +46,29 @@ pub struct Config {
|
||||
pub peer: Vec<ConfigItem>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct PublishInfo {
|
||||
pub published: String,
|
||||
pub last_released: String,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, Serialize, Deserialize)]
|
||||
pub struct Meta {
|
||||
pub id: String,
|
||||
pub name: String,
|
||||
pub version: String,
|
||||
pub description: String,
|
||||
pub author: String,
|
||||
pub home: String,
|
||||
pub license: String,
|
||||
pub source: String,
|
||||
pub publish_info: PublishInfo,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize)]
|
||||
pub struct Desc {
|
||||
id: String,
|
||||
name: String,
|
||||
version: String,
|
||||
description: String,
|
||||
author: String,
|
||||
home: String,
|
||||
license: String,
|
||||
published: String,
|
||||
released: String,
|
||||
github: String,
|
||||
meta: Meta,
|
||||
need_reboot: bool,
|
||||
location: Location,
|
||||
config: Config,
|
||||
listen_events: Vec<String>,
|
||||
@@ -69,44 +80,8 @@ impl Desc {
|
||||
Ok(serde_json::from_str(s.to_str()?)?)
|
||||
}
|
||||
|
||||
pub fn id(&self) -> &str {
|
||||
&self.id
|
||||
}
|
||||
|
||||
pub fn name(&self) -> &str {
|
||||
&self.name
|
||||
}
|
||||
|
||||
pub fn version(&self) -> &str {
|
||||
&self.version
|
||||
}
|
||||
|
||||
pub fn description(&self) -> &str {
|
||||
&self.description
|
||||
}
|
||||
|
||||
pub fn author(&self) -> &str {
|
||||
&self.author
|
||||
}
|
||||
|
||||
pub fn home(&self) -> &str {
|
||||
&self.home
|
||||
}
|
||||
|
||||
pub fn license(&self) -> &str {
|
||||
&self.license
|
||||
}
|
||||
|
||||
pub fn published(&self) -> &str {
|
||||
&self.published
|
||||
}
|
||||
|
||||
pub fn released(&self) -> &str {
|
||||
&self.released
|
||||
}
|
||||
|
||||
pub fn github(&self) -> &str {
|
||||
&self.github
|
||||
pub fn meta(&self) -> &Meta {
|
||||
&self.meta
|
||||
}
|
||||
|
||||
pub fn location(&self) -> &Location {
|
||||
|
||||
Reference in New Issue
Block a user