r1321@opsdev009 (orig r70583): hzhao | 2007-11-18 12:48:56 -0800
[amiethrift.git] / if / reflection_limited.thrift
blobe96416fea9bb00e0790ae608bb51baa5347b5d83
1 #!/usr/local/bin/thrift -php -java -cpp -py
3 // NOTICE!!!
4 // DO NOT FORGET to run regen.sh if you change this file
5 // (or if you change the compiler).
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.
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.
16 cpp_namespace facebook.thrift.reflection.limited
17 java_package com.facebook.thrift.reflection.limited
18 py_module thrift.reflection.limited
20 enum 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,
38 struct SimpleType {
39   1: TTypeTag ttype,
40   2: string name,  // For structs and emums.
43 struct ContainerType {
44   1: TTypeTag ttype,
45   2:          SimpleType subtype1,
46   3: optional SimpleType subtype2,
49 struct ThriftType {
50   1: bool is_container,
51   2: optional SimpleType simple_type,
52   3: optional ContainerType container_type,
55 struct Argument {
56   1: i16 key,
57   2: string name,
58   3: ThriftType type,
61 struct Method {
62   1: string name,
63   2: ThriftType return_type,
64   3: list<Argument> arguments,
67 struct Service {
68   1: string name,
69   2: list<Method> methods,
70   3: bool fully_reflected,