mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 10:48:51 +00:00
792df0bf78
Summary: - Give reflection_limited a nice clean Python module. - if/regen.sh now generates reflection_limited for Python and copies it to src. - Added the generated Python for reflection_limited to version control. - lib/py/setup.py installs reflection_limited. - lib/py/cleanup.sh now removes build (make sure to run as root). - The C++ version of reflection_limited was also updated by regen.sh. Reviewed By: mcslee Test Plan: - Clean build and install. - Look at the installed Python files. - python -c 'from thrift.reflection.limited.ttypes import *' Revert Plan: ok git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665235 13f79535-47bb-0310-9956-ffa450edef68
72 lines
1.5 KiB
Thrift
72 lines
1.5 KiB
Thrift
#!/usr/local/bin/thrift -php -java -cpp -py
|
|
|
|
// NOTICE!!!
|
|
// DO NOT FORGET to run regen.sh if you change this file
|
|
// (or if you change the compiler).
|
|
|
|
// This interface is deprecated.
|
|
// There is no replacement yet, but I hate it so much that
|
|
// I'm deprecating it before it's done.
|
|
// @author I'm too ashamed to say.
|
|
|
|
// dreiss naively thinks he knows how to do this better,
|
|
// so talk to him if you are interested in taking it on,
|
|
// or if you just want someone to make it better for you.
|
|
|
|
cpp_namespace facebook.thrift.reflection.limited
|
|
java_package com.facebook.thrift.reflection.limited
|
|
py_module thrift.reflection.limited
|
|
|
|
enum TTypeTag {
|
|
T_VOID = 1,
|
|
T_BOOL = 2,
|
|
T_BYTE = 3,
|
|
T_I16 = 6,
|
|
T_I32 = 8,
|
|
T_I64 = 10,
|
|
T_DOUBLE = 4,
|
|
T_STRING = 11,
|
|
T_STRUCT = 12,
|
|
T_MAP = 13,
|
|
T_SET = 14,
|
|
T_LIST = 15,
|
|
// This doesn't exist in TBinaryProtocol, but it could be useful for reflection.
|
|
T_ENUM = 101,
|
|
T_NOT_REFLECTED = 102,
|
|
}
|
|
|
|
struct SimpleType {
|
|
1: TTypeTag ttype,
|
|
2: string name, // For structs and emums.
|
|
}
|
|
|
|
struct ContainerType {
|
|
1: TTypeTag ttype,
|
|
2: SimpleType subtype1,
|
|
3: optional SimpleType subtype2,
|
|
}
|
|
|
|
struct ThriftType {
|
|
1: bool is_container,
|
|
2: optional SimpleType simple_type,
|
|
3: optional ContainerType container_type,
|
|
}
|
|
|
|
struct Argument {
|
|
1: i16 key,
|
|
2: string name,
|
|
3: ThriftType type,
|
|
}
|
|
|
|
struct Method {
|
|
1: string name,
|
|
2: ThriftType return_type,
|
|
3: list<Argument> arguments,
|
|
}
|
|
|
|
struct Service {
|
|
1: string name,
|
|
2: list<Method> methods,
|
|
3: bool fully_reflected,
|
|
}
|