blob: 77698174d8016e2911a3e0e988b0287acfefe105 [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
18
19enum TTypeTag {
20 T_VOID = 1,
21 T_BOOL = 2,
22 T_BYTE = 3,
23 T_I16 = 6,
24 T_I32 = 8,
25 T_I64 = 10,
26 T_DOUBLE = 4,
27 T_STRING = 11,
28 T_STRUCT = 12,
29 T_MAP = 13,
30 T_SET = 14,
31 T_LIST = 15,
32 // This doesn't exist in TBinaryProtocol, but it could be useful for reflection.
33 T_ENUM = 101,
34 T_NOT_REFLECTED = 102,
35}
36
37struct SimpleType {
38 1: TTypeTag ttype,
39 2: string name, // For structs and emums.
40}
41
42struct ContainerType {
43 1: TTypeTag ttype,
44 2: SimpleType subtype1,
45 3: optional SimpleType subtype2,
46}
47
48struct ThriftType {
49 1: bool is_container,
50 2: optional SimpleType simple_type,
51 3: optional ContainerType container_type,
52}
53
54struct Argument {
55 1: i16 key,
56 2: string name,
57 3: ThriftType type,
58}
59
60struct Method {
61 1: string name,
62 2: ThriftType return_type,
63 3: list<Argument> arguments,
64}
65
66struct Service {
67 1: string name,
68 2: list<Method> methods,
69 3: bool fully_reflected,
70}