blob: e7340d1188337e804f16ceb987263237d0986044 [file] [log] [blame]
David Reiss23753122007-08-27 19:57:34 +00001// 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
14cpp_namespace facebook.thrift.reflection.limited
15java_package com.facebook.thrift.reflection.limited
David Reiss792df0b2007-08-30 03:30:22 +000016py_module thrift.reflection.limited
David Reiss23753122007-08-27 19:57:34 +000017
18enum 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
36struct SimpleType {
37 1: TTypeTag ttype,
38 2: string name, // For structs and emums.
39}
40
41struct ContainerType {
42 1: TTypeTag ttype,
43 2: SimpleType subtype1,
44 3: optional SimpleType subtype2,
45}
46
47struct ThriftType {
48 1: bool is_container,
49 2: optional SimpleType simple_type,
50 3: optional ContainerType container_type,
51}
52
53struct Argument {
54 1: i16 key,
55 2: string name,
56 3: ThriftType type,
57}
58
59struct Method {
60 1: string name,
61 2: ThriftType return_type,
62 3: list<Argument> arguments,
63}
64
65struct Service {
66 1: string name,
67 2: list<Method> methods,
68 3: bool fully_reflected,
69}