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