From 36d3de4d796a5a932246ae944191d33421b764de Mon Sep 17 00:00:00 2001 From: RaNaN Date: Thu, 29 Sep 2011 23:07:32 +0200 Subject: fixed name clash in C# --- module/remote/thriftbackend/generateThrift.sh | 2 +- module/remote/thriftbackend/pyload.thrift | 6 +++--- module/remote/thriftbackend/thriftgen/pyload/Pyload.py | 2 +- module/remote/thriftbackend/thriftgen/pyload/ttypes.py | 12 ++++++------ 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 getEvents(1: string uuid) + list getEvents(1: string uuid) //accounts list 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 -- cgit v1.2.3