summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-09-29 23:07:32 +0200
committerGravatar RaNaN <Mast3rRaNaN@hotmail.de> 2011-09-29 23:07:32 +0200
commit36d3de4d796a5a932246ae944191d33421b764de (patch)
tree0e209cd5b68829852d063e3addea9faafa0f332c
parentbetter json encoding (diff)
downloadpyload-36d3de4d796a5a932246ae944191d33421b764de.tar.xz
fixed name clash in C#
-rwxr-xr-xmodule/remote/thriftbackend/generateThrift.sh2
-rw-r--r--module/remote/thriftbackend/pyload.thrift6
-rw-r--r--module/remote/thriftbackend/thriftgen/pyload/Pyload.py2
-rw-r--r--module/remote/thriftbackend/thriftgen/pyload/ttypes.py12
4 files changed, 11 insertions, 11 deletions
diff --git a/module/remote/thriftbackend/generateThrift.sh b/module/remote/thriftbackend/generateThrift.sh
index c5ca72736..d7e0cb68a 100755
--- a/module/remote/thriftbackend/generateThrift.sh
+++ b/module/remote/thriftbackend/generateThrift.sh
@@ -3,5 +3,5 @@ rm -rf thriftgen
# use thrift from trunk or a release with dynamic/slots python code generation
-thrift -strict -v --gen py --gen java pyload.thrift
+thrift -v --strict --gen py:slots,dynamic --gen java pyload.thrift
mv gen-py thriftgen
diff --git a/module/remote/thriftbackend/pyload.thrift b/module/remote/thriftbackend/pyload.thrift
index dc085e180..128ba6240 100644
--- a/module/remote/thriftbackend/pyload.thrift
+++ b/module/remote/thriftbackend/pyload.thrift
@@ -118,8 +118,8 @@ struct CaptchaTask {
4: string resultType
}
-struct Event {
- 1: string event,
+struct EventInfo {
+ 1: string eventname,
2: optional i32 id,
3: optional ElementType type,
4: optional Destination destination
@@ -265,7 +265,7 @@ service Pyload {
void setCaptchaResult(1: TaskID tid, 2: string result),
//events
- list<Event> getEvents(1: string uuid)
+ list<EventInfo> getEvents(1: string uuid)
//accounts
list<AccountInfo> getAccounts(1: bool refresh),
diff --git a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py
index 828ff520d..eef9e38e5 100644
--- a/module/remote/thriftbackend/thriftgen/pyload/Pyload.py
+++ b/module/remote/thriftbackend/thriftgen/pyload/Pyload.py
@@ -5053,7 +5053,7 @@ class getEvents_result(TBase):
]
thrift_spec = (
- (0, TType.LIST, 'success', (TType.STRUCT,(Event, Event.thrift_spec)), None, ), # 0
+ (0, TType.LIST, 'success', (TType.STRUCT,(EventInfo, EventInfo.thrift_spec)), None, ), # 0
)
def __init__(self, success=None,):
diff --git a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py
index 8b0428abd..78b2acc09 100644
--- a/module/remote/thriftbackend/thriftgen/pyload/ttypes.py
+++ b/module/remote/thriftbackend/thriftgen/pyload/ttypes.py
@@ -434,17 +434,17 @@ class CaptchaTask(TBase):
self.resultType = resultType
-class Event(TBase):
+class EventInfo(TBase):
"""
Attributes:
- - event
+ - eventname
- id
- type
- destination
"""
__slots__ = [
- 'event',
+ 'eventname',
'id',
'type',
'destination',
@@ -452,14 +452,14 @@ class Event(TBase):
thrift_spec = (
None, # 0
- (1, TType.STRING, 'event', None, None, ), # 1
+ (1, TType.STRING, 'eventname', None, None, ), # 1
(2, TType.I32, 'id', None, None, ), # 2
(3, TType.I32, 'type', None, None, ), # 3
(4, TType.I32, 'destination', None, None, ), # 4
)
- def __init__(self, event=None, id=None, type=None, destination=None,):
- self.event = event
+ def __init__(self, eventname=None, id=None, type=None, destination=None,):
+ self.eventname = eventname
self.id = id
self.type = type
self.destination = destination