Module amf

AMF encode/decode functions and AMF value constructors.

References

Description

AMF encode/decode functions and AMF value constructors

Data Types

amf_array()

amf_array() = #amf_array{values = [amf:amf_value()], members = [amf:amf_kv_pair()]}

amf_avmplus_object()

amf_avmplus_object() = #amf_avmplus_object{value = amf:amf_value()}

amf_boolean()

amf_boolean() = boolean()

amf_byte_array()

amf_byte_array() = #amf_byte_array{data = binary()}

amf_class_name()

amf_class_name() = undefined | amf_string()

    'undefined' indicates an anonymous class

amf_date()

amf_date() = #amf_date{timestamp = erlang:timestamp()}

amf_dictionary()

amf_dictionary() = #amf_dictionary{members = [amf:amf_dictionary_entry()], weak = amf:amf_boolean()}

amf_dictionary_entry()

amf_dictionary_entry() = {Key::amf_value(), Value::amf_value()}

amf_dictionary_option()

amf_dictionary_option() = {weak, boolean()}

amf_ecma_array()

amf_ecma_array() = #amf_array{values = [], members = [amf:amf_kv_pair()]}

amf_exception()

amf_exception() = #amf_exception{type = amf:amf_exception_type(), message = any()}

amf_exception_type()

amf_exception_type() = invalid | partial | unsupported

  invalid:     Input is something wrong.
  partial:     Input binary is too small to complete decoding.
  unsupported: Some unsupported feature is needed to proceed.

amf_kv_pair()

amf_kv_pair() = {Key::amf_string(), Value::amf_value()}

amf_null()

amf_null() = null

amf_number()

amf_number() = number()

amf_object()

amf_object() = #amf_object{class = amf:amf_class_name(), dynamic = amf:amf_boolean(), sealed_fields = [amf:amf_string()], members = [amf:amf_kv_pair()]}

amf_object_option()

amf_object_option() = {class, amf_class_name()} | {dynamic, boolean()} | {sealed_fields, [amf_string()]}

amf_strict_array()

amf_strict_array() = [amf_value()]

amf_string()

amf_string() = binary()

amf_undefined()

amf_undefined() = undefined

amf_value()

amf_value() = amf_number() | amf_boolean() | amf_string() | amf_object() | amf_null() | amf_undefined() | amf_ecma_array() | amf_strict_array() | amf_avmplus_object() | amf_array() | amf_vector() | amf_xml_document() | amf_xml() | amf_byte_array() | amf_dictionary() | amf_date()

amf_vector()

amf_vector() = #amf_vector{type = amf:amf_vector_element_type(), variable = amf:amf_boolean(), elements = [amf:amf_value()]}

amf_vector_element_type()

amf_vector_element_type() = int | uint | double | (ClassName::amf_string())

amf_vector_option()

amf_vector_option() = {variable, boolean()}

amf_version()

amf_version() = amf0 | amf3

amf_xml()

amf_xml() = #amf_xml{data = amf:amf_string()}

amf_xml_document()

amf_xml_document() = #amf_xml_document{data = amf:amf_string()}

Function Index

array/1Make associative array.
array/2Make generic array.
avmplus_object/1Make AvmPlus Object.
byte_array/1Make ByteArray.
date/1Make date.
datetime_to_date/1Make date from datetime.
decode/2Decode AMF0/AMF3 binary data.
dictionary/1Make dictionary.
dictionary/2Make dictionary.
encode/2Encode AMF0/AMF3 value.
msec_to_date/1Make date from timestamp in milliseconds.
object/1Make anonymous object.
object/2Make object.
typed_object/2Make typed-object.
vector/2Make variable vector.
vector/3Make vector.
xml/1Make XML.
xml_document/1Make XML Document.

Function Details

array/1

array(Members) -> amf_array()

Make associative array.

array/2

array(Values, Members) -> amf_array()

Make generic array.

avmplus_object/1

avmplus_object(AmfValue) -> amf_avmplus_object()

Make AvmPlus Object.

byte_array/1

byte_array(Bytes) -> amf_byte_array()

Make ByteArray.

date/1

date(Timestamp) -> amf_date()

Make date.

datetime_to_date/1

datetime_to_date(DateTime) -> amf_date()

Make date from datetime.

decode/2

decode(AmfVersion, EncodedBytes) -> {ok, DecodedValue, UnconsumedBytes} | {error, Reason}

Decode AMF0/AMF3 binary data.

dictionary/1

dictionary(Entries) -> amf_dictionary()

Make dictionary.

dictionary/2

dictionary(Entries, Options) -> amf_dictionary()

Make dictionary.

encode/2

encode(AmfVersion, AmfValue) -> {ok, EncodedData} | {error, Reason}

Encode AMF0/AMF3 value.

msec_to_date/1

msec_to_date(MilliSeconds) -> amf_date()

Make date from timestamp in milliseconds

object/1

object(Members) -> amf_object()

Make anonymous object.

object/2

object(Members, Options) -> amf_object()

Make object.

typed_object/2

typed_object(TypeName, Members) -> amf_object()

Make typed-object.

vector/2

vector(ElementType, Elements) -> amf_vector()

Make variable vector.

vector/3

vector(ElementType, Elements, Options) -> amf_vector()

Make vector.

xml/1

xml(Xml) -> amf_xml()

Make XML.

xml_document/1

xml_document(Xml) -> amf_xml_document()

Make XML Document.


Generated by EDoc, Mar 11 2018, 19:31:43.