summaryrefslogtreecommitdiffstats
path: root/module/remote/thriftbackend/pyload.thrift
diff options
context:
space:
mode:
Diffstat (limited to 'module/remote/thriftbackend/pyload.thrift')
-rw-r--r--module/remote/thriftbackend/pyload.thrift77
1 files changed, 39 insertions, 38 deletions
diff --git a/module/remote/thriftbackend/pyload.thrift b/module/remote/thriftbackend/pyload.thrift
index 1542e651a..a1b328958 100644
--- a/module/remote/thriftbackend/pyload.thrift
+++ b/module/remote/thriftbackend/pyload.thrift
@@ -2,7 +2,6 @@ namespace java org.pyload.thrift
typedef i32 FileID
typedef i32 PackageID
-typedef i32 TaskID
typedef i32 ResultID
typedef i32 InteractionID
typedef list<string> LinkList
@@ -34,11 +33,6 @@ enum Destination {
Queue
}
-enum ElementType {
- Package,
- File
-}
-
// types for user interaction
// some may only be place holder currently not supported
// also all input - output combination are not reasonable, see InteractionManager for further info
@@ -93,20 +87,6 @@ struct ServerStatus {
7: bool reconnect
}
-struct ConfigItem {
- 1: string name,
- 2: string description,
- 3: string value,
- 4: string type,
-}
-
-struct ConfigSection {
- 1: string name,
- 2: string description,
- 3: list<ConfigItem> items,
- 4: optional string outline
-}
-
struct FileData {
1: FileID fid,
2: string url,
@@ -149,6 +129,24 @@ struct InteractionTask {
9: string plugin,
}
+struct ConfigItem {
+ 1: string name,
+ 2: string long_name,
+ 3: string description,
+ 4: string type,
+ 5: string default_value,
+ 6: string value,
+}
+
+struct ConfigSection {
+ 1: string name,
+ 2: string long_name,
+ 3: string description,
+ 4: string long_description,
+ 5: optional list<ConfigItem> items,
+ 6: optional map<string, InteractionTask> handler,
+}
+
struct CaptchaTask {
1: i16 tid,
2: binary data,
@@ -158,9 +156,7 @@ struct CaptchaTask {
struct EventInfo {
1: string eventname,
- 2: optional i32 id,
- 3: optional ElementType type,
- 4: optional Destination destination
+ 2: list<string> event_args,
}
struct UserData {
@@ -172,21 +168,21 @@ struct UserData {
}
struct AccountInfo {
- 1: i64 validuntil,
- 2: string login,
- 3: map<string, list<string>> options,
- 4: bool valid,
+ 1: PluginName plugin,
+ 2: string loginname,
+ 3: bool valid,
+ 4: i64 validuntil,
5: i64 trafficleft,
6: i64 maxtraffic,
7: bool premium,
- 8: string type,
+ 8: bool activated,
+ 9: map<string, string> options,
}
struct ServiceCall {
1: PluginName plugin,
2: string func,
- 3: optional list<string> arguments,
- 4: optional bool parseArguments, //default False
+ 3: string arguments, // empty string or json encoded list
}
struct OnlineStatus {
@@ -213,6 +209,10 @@ exception FileDoesNotExists{
1: FileID fid
}
+exception UserDoesNotExists{
+ 1: string user
+}
+
exception ServiceDoesNotExists{
1: string plugin
2: string func
@@ -225,10 +225,11 @@ exception ServiceException{
service Pyload {
//config
- string getConfigValue(1: string category, 2: string option, 3: string section),
- void setConfigValue(1: string category, 2: string option, 3: string value, 4: string section),
+ string getConfigValue(1: string section, 2: string option),
+ void setConfigValue(1: string section, 2: string option, 3: string value),
map<string, ConfigSection> getConfig(),
- map<string, ConfigSection> getPluginConfig(),
+ map<PluginName, ConfigSection> getPluginConfig(),
+ ConfigSection configureSection(1: string section),
// server status
void pauseServer(),
@@ -272,9 +273,9 @@ service Pyload {
// downloads - adding/deleting
list<PackageID> generateAndAddPackages(1: LinkList links, 2: Destination dest),
- PackageID addPackage(1: string name, 2: LinkList links, 3: Destination dest),
+ PackageID addPackage(1: string name, 2: LinkList links, 3: Destination dest, 4: string password),
+ PackageID uploadContainer(1: string filename, 2: binary data),
void addFiles(1: PackageID pid, 2: LinkList links),
- void uploadContainer(1: string filename, 2: binary data),
void deleteFiles(1: list<FileID> fids),
void deletePackages(1: list<PackageID> pids),
@@ -306,7 +307,7 @@ service Pyload {
//auth
bool login(1: string username, 2: string password),
- UserData getUserData(1: string username, 2:string password),
+ UserData getUserData(1: string username, 2:string password) throws (1: UserDoesNotExists ex),
map<string, UserData> getAllUserData(),
//services
@@ -332,6 +333,6 @@ service Pyload {
//captcha
bool isCaptchaWaiting(),
CaptchaTask getCaptchaTask(1: bool exclusive),
- string getCaptchaTaskStatus(1: TaskID tid),
- void setCaptchaResult(1: TaskID tid, 2: string result),
+ string getCaptchaTaskStatus(1: InteractionID tid),
+ void setCaptchaResult(1: InteractionID tid, 2: string result),
}