From b61e1467ee19ca96782248c0189424334d5980b7 Mon Sep 17 00:00:00 2001 From: RaNaN Date: Sat, 7 May 2011 10:44:36 +0200 Subject: hooks methods callable via rpc, closed #299 --- module/remote/thriftbackend/pyload.thrift | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) (limited to 'module/remote/thriftbackend/pyload.thrift') diff --git a/module/remote/thriftbackend/pyload.thrift b/module/remote/thriftbackend/pyload.thrift index 8c17c7451..8e399062d 100644 --- a/module/remote/thriftbackend/pyload.thrift +++ b/module/remote/thriftbackend/pyload.thrift @@ -154,6 +154,17 @@ struct AccountData { 4: optional map options } +struct ServiceInfo { + 1: map funcs +} + +struct ServiceCall { + 1: string plugin, + 2: string func, + 3: optional list arguments, + 4: optional bool parseArguments, //default True +} + exception PackageDoesNotExists{ 1: PackageID pid } @@ -162,6 +173,14 @@ exception FileDoesNotExists{ 1: FileID fid } +exception ServiceDoesNotExists{ + 1: string plugin + 2: string func +} + +exception ServiceException{ + 1: string msg +} service Pyload { //general @@ -227,9 +246,15 @@ service Pyload { list getAccounts(1: bool refresh), list getAccountTypes() void updateAccounts(1: AccountData data), - void removeAccount(1: string plugin, 2: string account) + void removeAccount(1: string plugin, 2: string account), //auth bool login(1: string username, 2: string password), - UserData getUserData() + UserData getUserData(), + + //services + map getServices(), + bool hasService(1: string plugin, 2: string func), + string call(1: ServiceCall info) throws (1: ServiceDoesNotExists ex, 2: ServiceException e), + } -- cgit v1.2.3