From 10fd48a0d72c1e4c4a6539d9a804791d7b167d55 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 20 Nov 2020 14:38:24 +0100 Subject: [PATCH] Ajout de calculator --- .../src/main/thrift/calculator.thrift | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 not-alone-core/src/main/thrift/calculator.thrift diff --git a/not-alone-core/src/main/thrift/calculator.thrift b/not-alone-core/src/main/thrift/calculator.thrift new file mode 100644 index 0000000..b565568 --- /dev/null +++ b/not-alone-core/src/main/thrift/calculator.thrift @@ -0,0 +1,20 @@ +namespace cpp com.example.calculator +namespace d com.example.calculator +namespace java com.example.calculator +namespace php com.example.calculator +namespace perl com.example.calculator +namespace as3 com.example.calculator + +enum TOperation { + ADD = 1, + SUBSTRACT = 2, + MULTIPLY = 3, + DIVIDE = 4 +} + +exception TDivisionByZeroException { +} + +service TCalculatorService { + i32 calculate(1:i32 num1, 2:i32 num2, 3:TOperation op) throws (1:TDivisionByZeroException divisionByZero); +} \ No newline at end of file -- GitLab