summaryrefslogtreecommitdiffstats
path: root/module/remote/thriftbackend/pyload.thrift
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-09-09 15:39:50 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2012-09-09 15:39:50 +0200
commit560958b70043ea5b7e0e32d41cb51bd44696d775 (patch)
tree948384effdf884301f7b4cf07ab8de95a147b600 /module/remote/thriftbackend/pyload.thrift
parentlittle logo update (diff)
downloadpyload-560958b70043ea5b7e0e32d41cb51bd44696d775.tar.xz
new config api
Diffstat (limited to 'module/remote/thriftbackend/pyload.thrift')
-rw-r--r--module/remote/thriftbackend/pyload.thrift45
1 files changed, 31 insertions, 14 deletions
diff --git a/module/remote/thriftbackend/pyload.thrift b/module/remote/thriftbackend/pyload.thrift
index 23b39fada..fb906e23a 100644
--- a/module/remote/thriftbackend/pyload.thrift
+++ b/module/remote/thriftbackend/pyload.thrift
@@ -90,7 +90,7 @@ enum Permission {
Download = 8, // can download from webinterface
Accounts = 16, // can access accounts
Interaction = 32, // can interact with plugins
- Addons = 64 // user can activate addons
+ Plugins = 64 // user can configure plugins and activate addons
}
enum Role {
@@ -98,6 +98,8 @@ enum Role {
User = 1
}
+// TODO: progress vs Download progress ?!
+
struct ProgressInfo {
1: FileID fid,
2: string name,
@@ -217,23 +219,31 @@ struct AddonInfo {
struct ConfigItem {
1: string name,
- 2: string display_name,
+ 2: string label,
3: string description,
4: string type,
5: JSONString default_value,
6: JSONString value,
}
-struct ConfigSection {
+struct ConfigHolder {
1: string name,
- 2: string display_name,
+ 2: string label,
3: string description,
4: string long_description,
- 5: optional list<ConfigItem> items,
+ 5: list<ConfigItem> items,
6: optional list<AddonInfo> info,
7: optional list<InteractionTask> handler, // if null plugin is not loaded
}
+struct ConfigInfo {
+ 1: string name,
+ 2: string label,
+ 3: string description,
+ 4: bool saved,
+ 5: bool activated,
+}
+
struct EventInfo {
1: string eventname,
2: list<JSONString> event_args,
@@ -250,7 +260,7 @@ struct UserData {
8: i16 dllimit
9: string dlquota,
10: ByteCount hddquota,
- 11: UserID user
+ 11: UserID user,
12: string templateName
}
@@ -314,17 +324,21 @@ service Pyload {
bool isTimeDownload(),
bool isTimeReconnect(),
bool toggleReconnect(),
- void scanDownloadFolder(),
+
+ // TODO
+ //void scanDownloadFolder(),
///////////////////////
// Configuration
///////////////////////
- string getConfigValue(1: string section, 2: string option),
- void setConfigValue(1: string section, 2: string option, 3: string value),
- map<string, ConfigSection> getConfig(),
- map<PluginName, ConfigSection> getPluginConfig(),
- ConfigSection configureSection(1: string section),
+ map<string, ConfigHolder> getConfig(),
+ list<ConfigInfo> getGlobalPlugins(),
+ list<ConfigInfo> getUserPlugins(),
+
+ ConfigHolder configurePlugin(1: PluginName plugin),
+ void saveConfig(1: ConfigHolder config),
+ void deleteConfig(1: ConfigHolder config),
void setConfigHandler(1: PluginName plugin, 2: InteractionID iid, 3: JSONString value),
///////////////////////
@@ -373,6 +387,8 @@ service Pyload {
// Collector
///////////////////////
+ // TODO: reasonable link collector concept
+
list<LinkStatus> getCollector(),
void addToCollector(1: LinkList links),
@@ -462,8 +478,9 @@ service Pyload {
///////////////////////
list<AccountInfo> getAccounts(1: bool refresh),
- list<string> getAccountTypes()
- void updateAccount(1: PluginName plugin, 2: string account, 3: string password, 4: map<string, string> options),
+ list<string> getAccountTypes(),
+ void updateAccount(1: PluginName plugin, 2: string account, 3: string password),
+ void updateAccountInfo(1: AccountInfo account),
void removeAccount(1: PluginName plugin, 2: string account),
/////////////////////////