aboutsummaryrefslogtreecommitdiffstats
path: root/lib/megaco
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2019-06-12 17:45:11 +0200
committerMicael Karlberg <[email protected]>2019-06-27 17:34:46 +0200
commit360d9255043202e4295abb445f608aa6f8885f43 (patch)
tree7c940ab4a7fa09f8bac2c86f6d3ce7f85ed70b47 /lib/megaco
parente5fa19b1355ea98dc634650086d2990b4240240e (diff)
downloadotp-360d9255043202e4295abb445f608aa6f8885f43.tar.gz
otp-360d9255043202e4295abb445f608aa6f8885f43.tar.bz2
otp-360d9255043202e4295abb445f608aa6f8885f43.zip
[megaco] Update the app file and some docs
OTP-15882
Diffstat (limited to 'lib/megaco')
-rw-r--r--lib/megaco/doc/src/megaco_edist_compress.xml8
-rw-r--r--lib/megaco/doc/src/megaco_encoder.xml11
-rw-r--r--lib/megaco/src/app/megaco.app.src1
-rw-r--r--lib/megaco/src/engine/megaco_edist_compress.erl4
4 files changed, 18 insertions, 6 deletions
diff --git a/lib/megaco/doc/src/megaco_edist_compress.xml b/lib/megaco/doc/src/megaco_edist_compress.xml
index 16443e469c..8461c59a00 100644
--- a/lib/megaco/doc/src/megaco_edist_compress.xml
+++ b/lib/megaco/doc/src/megaco_edist_compress.xml
@@ -43,8 +43,8 @@
<name since="">Module:encode(R, Version) -> T</name>
<fsummary>Encode (compress) a megaco component.</fsummary>
<type>
- <v>R = megaco_message() | transaction() | action_reply() | action_request() | command_request()</v>
- <v>Version = integer()</v>
+ <v>R = megaco_encoder:megaco_message() | megaco_encoder:transaction() | megaco_encoder:action_reply() | megaco_encoder:action_request() | megaco_encoder:command_request()</v>
+ <v>Version = megaco_encoder:protocol_version()</v>
<v>T = term()</v>
</type>
<desc>
@@ -57,8 +57,8 @@
<fsummary>Decode (decompress) a megaco component.</fsummary>
<type>
<v>T = term()</v>
- <v>Version = integer()</v>
- <v>R = megaco_message() | transaction() | action_reply() | action_request() | command_request()</v>
+ <v>Version = megaco_encoder:protocol_version()</v>
+ <v>R = megaco_encoder:megaco_message() | megaco_encoder:transaction() | megaco_encoder:action_reply() | megaco_encoder:action_request() | megaco_encoder:command_request()</v>
</type>
<desc>
<p>Decompress a megaco component. </p>
diff --git a/lib/megaco/doc/src/megaco_encoder.xml b/lib/megaco/doc/src/megaco_encoder.xml
index cc8270440b..af1baa6661 100644
--- a/lib/megaco/doc/src/megaco_encoder.xml
+++ b/lib/megaco/doc/src/megaco_encoder.xml
@@ -42,7 +42,16 @@
<section>
<title>DATA TYPES</title>
+ <description>
+ <p>Note that the actual definition of (some of) these records depend on
+ the megaco protocol version used. For instance, the
+ <c>'TransactionReply'</c> record
+ has two more fields in version 3, so a simple erlang type definition
+ cannot be made here. </p>
+ </description>
<code type="none"><![CDATA[
+protocol_version() = integer()
+segment_no() = integer()
megaco_message() = #'MegacoMessage{}'
transaction() = {transactionRequest, transaction_request()} |
{transactionPending, transaction_reply()} |
@@ -57,6 +66,8 @@ transaction_ack() = #'TransactionAck'{}
segment_reply() = #'SegmentReply'{}
action_request() = #'ActionRequest'{}
action_reply() = #'ActionReply'{}
+command_request() = #'CommandRequest'{}
+error_desc() = #'ErrorDescriptor'{}
]]></code>
<marker id="encode_message"></marker>
diff --git a/lib/megaco/src/app/megaco.app.src b/lib/megaco/src/app/megaco.app.src
index c54c80351c..5fb7273b4a 100644
--- a/lib/megaco/src/app/megaco.app.src
+++ b/lib/megaco/src/app/megaco.app.src
@@ -107,6 +107,7 @@
megaco_udp,
megaco_udp_server,
megaco_udp_sup,
+ megaco_user,
megaco_user_default
]},
{registered, [megaco_config, megaco_monitor,
diff --git a/lib/megaco/src/engine/megaco_edist_compress.erl b/lib/megaco/src/engine/megaco_edist_compress.erl
index 0451a48358..968ab6f16e 100644
--- a/lib/megaco/src/engine/megaco_edist_compress.erl
+++ b/lib/megaco/src/engine/megaco_edist_compress.erl
@@ -31,12 +31,12 @@
megaco_encoder:action_reply() |
megaco_encoder:action_request() |
megaco_encoder:command_request(),
- Version :: integer(),
+ Version :: megaco_encoder:protocol_version(),
T :: term().
-callback decode(T, Version) -> R when
T :: term(),
- Version :: integer() | dynamic,
+ Version :: megaco_encoder:protocol_version() | dynamic,
R :: megaco_encoder:megaco_message() |
megaco_encoder:transaction() |
megaco_encoder:action_reply() |