erlang: Add some more detailed specs for protocol implementations
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@990974 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/erl/include/thrift_protocol_impl.hrl b/lib/erl/include/thrift_protocol_impl.hrl
index 7d8abae..e816d79 100644
--- a/lib/erl/include/thrift_protocol_impl.hrl
+++ b/lib/erl/include/thrift_protocol_impl.hrl
@@ -24,8 +24,14 @@
-spec flush_transport(state()) -> ok.
-spec close_transport(state()) -> ok.
+
-spec write(state(), term()) -> ok | {error, _Reason}.
--spec read(state(), term()) -> term().
+
+-spec read
+ (state(), non_neg_integer()) -> {ok, binary()} | {error, _Reason};
+ (state(), tprot_empty_tag()) -> ok | {error, _Reason};
+ (state(), tprot_header_tag()) -> tprot_header_val() | {error, _Reason};
+ (state(), tprot_data_tag()) -> {ok, term()} | {error, _Reason}.
-endif.