David Reiss | 2375312 | 2007-08-27 19:57:34 +0000 | [diff] [blame] | 1 | // NOTICE!!! |
| 2 | // DO NOT FORGET to run regen.sh if you change this file |
| 3 | // (or if you change the compiler). |
| 4 | |
| 5 | // This interface is deprecated. |
| 6 | // There is no replacement yet, but I hate it so much that |
| 7 | // I'm deprecating it before it's done. |
| 8 | // @author I'm too ashamed to say. |
| 9 | |
| 10 | // dreiss naively thinks he knows how to do this better, |
| 11 | // so talk to him if you are interested in taking it on, |
| 12 | // or if you just want someone to make it better for you. |
| 13 | |
| 14 | cpp_namespace facebook.thrift.reflection.limited |
| 15 | java_package com.facebook.thrift.reflection.limited |
David Reiss | 792df0b | 2007-08-30 03:30:22 +0000 | [diff] [blame] | 16 | py_module thrift.reflection.limited |
David Reiss | 2375312 | 2007-08-27 19:57:34 +0000 | [diff] [blame] | 17 | |
| 18 | enum TTypeTag { |
| 19 | T_VOID = 1, |
| 20 | T_BOOL = 2, |
| 21 | T_BYTE = 3, |
| 22 | T_I16 = 6, |
| 23 | T_I32 = 8, |
| 24 | T_I64 = 10, |
| 25 | T_DOUBLE = 4, |
| 26 | T_STRING = 11, |
| 27 | T_STRUCT = 12, |
| 28 | T_MAP = 13, |
| 29 | T_SET = 14, |
| 30 | T_LIST = 15, |
| 31 | // This doesn't exist in TBinaryProtocol, but it could be useful for reflection. |
| 32 | T_ENUM = 101, |
| 33 | T_NOT_REFLECTED = 102, |
| 34 | } |
| 35 | |
| 36 | struct SimpleType { |
| 37 | 1: TTypeTag ttype, |
| 38 | 2: string name, // For structs and emums. |
| 39 | } |
| 40 | |
| 41 | struct ContainerType { |
| 42 | 1: TTypeTag ttype, |
| 43 | 2: SimpleType subtype1, |
| 44 | 3: optional SimpleType subtype2, |
| 45 | } |
| 46 | |
| 47 | struct ThriftType { |
| 48 | 1: bool is_container, |
| 49 | 2: optional SimpleType simple_type, |
| 50 | 3: optional ContainerType container_type, |
| 51 | } |
| 52 | |
| 53 | struct Argument { |
| 54 | 1: i16 key, |
| 55 | 2: string name, |
| 56 | 3: ThriftType type, |
| 57 | } |
| 58 | |
| 59 | struct Method { |
| 60 | 1: string name, |
| 61 | 2: ThriftType return_type, |
| 62 | 3: list<Argument> arguments, |
| 63 | } |
| 64 | |
| 65 | struct Service { |
| 66 | 1: string name, |
| 67 | 2: list<Method> methods, |
| 68 | 3: bool fully_reflected, |
| 69 | } |