MistServer  2.5.3-Pro-19-gf5e75b1 ( Generic_64)
Data Structures | Enumerations | Functions
AMF Namespace Reference

Holds all AMF parsing and creation related functions and classes. More...

Data Structures

class  Object
 Recursive class that holds AMF0 objects. More...
 
class  Object3
 Recursive class that holds AMF3 objects. More...
 

Enumerations

enum  obj0type {
  AMF0_NUMBER = 0x00, AMF0_BOOL = 0x01, AMF0_STRING = 0x02, AMF0_OBJECT = 0x03,
  AMF0_MOVIECLIP = 0x04, AMF0_NULL = 0x05, AMF0_UNDEFINED = 0x06, AMF0_REFERENCE = 0x07,
  AMF0_ECMA_ARRAY = 0x08, AMF0_OBJ_END = 0x09, AMF0_STRICT_ARRAY = 0x0A, AMF0_DATE = 0x0B,
  AMF0_LONGSTRING = 0x0C, AMF0_UNSUPPORTED = 0x0D, AMF0_RECORDSET = 0x0E, AMF0_XMLDOC = 0x0F,
  AMF0_TYPED_OBJ = 0x10, AMF0_UPGRADE = 0x11, AMF0_DDV_CONTAINER = 0xFF, AMF0_NUMBER = 0x00,
  AMF0_BOOL = 0x01, AMF0_STRING = 0x02, AMF0_OBJECT = 0x03, AMF0_MOVIECLIP = 0x04,
  AMF0_NULL = 0x05, AMF0_UNDEFINED = 0x06, AMF0_REFERENCE = 0x07, AMF0_ECMA_ARRAY = 0x08,
  AMF0_OBJ_END = 0x09, AMF0_STRICT_ARRAY = 0x0A, AMF0_DATE = 0x0B, AMF0_LONGSTRING = 0x0C,
  AMF0_UNSUPPORTED = 0x0D, AMF0_RECORDSET = 0x0E, AMF0_XMLDOC = 0x0F, AMF0_TYPED_OBJ = 0x10,
  AMF0_UPGRADE = 0x11, AMF0_DDV_CONTAINER = 0xFF
}
 Enumerates all possible AMF0 types, adding a special DDVTECH container type for ease of use. More...
 
enum  obj0type {
  AMF0_NUMBER = 0x00, AMF0_BOOL = 0x01, AMF0_STRING = 0x02, AMF0_OBJECT = 0x03,
  AMF0_MOVIECLIP = 0x04, AMF0_NULL = 0x05, AMF0_UNDEFINED = 0x06, AMF0_REFERENCE = 0x07,
  AMF0_ECMA_ARRAY = 0x08, AMF0_OBJ_END = 0x09, AMF0_STRICT_ARRAY = 0x0A, AMF0_DATE = 0x0B,
  AMF0_LONGSTRING = 0x0C, AMF0_UNSUPPORTED = 0x0D, AMF0_RECORDSET = 0x0E, AMF0_XMLDOC = 0x0F,
  AMF0_TYPED_OBJ = 0x10, AMF0_UPGRADE = 0x11, AMF0_DDV_CONTAINER = 0xFF, AMF0_NUMBER = 0x00,
  AMF0_BOOL = 0x01, AMF0_STRING = 0x02, AMF0_OBJECT = 0x03, AMF0_MOVIECLIP = 0x04,
  AMF0_NULL = 0x05, AMF0_UNDEFINED = 0x06, AMF0_REFERENCE = 0x07, AMF0_ECMA_ARRAY = 0x08,
  AMF0_OBJ_END = 0x09, AMF0_STRICT_ARRAY = 0x0A, AMF0_DATE = 0x0B, AMF0_LONGSTRING = 0x0C,
  AMF0_UNSUPPORTED = 0x0D, AMF0_RECORDSET = 0x0E, AMF0_XMLDOC = 0x0F, AMF0_TYPED_OBJ = 0x10,
  AMF0_UPGRADE = 0x11, AMF0_DDV_CONTAINER = 0xFF
}
 Enumerates all possible AMF0 types, adding a special DDVTECH container type for ease of use. More...
 
enum  obj3type {
  AMF3_UNDEFINED = 0x00, AMF3_NULL = 0x01, AMF3_FALSE = 0x02, AMF3_TRUE = 0x03,
  AMF3_INTEGER = 0x04, AMF3_DOUBLE = 0x05, AMF3_STRING = 0x06, AMF3_XMLDOC = 0x07,
  AMF3_DATE = 0x08, AMF3_ARRAY = 0x09, AMF3_OBJECT = 0x0A, AMF3_XML = 0x0B,
  AMF3_BYTES = 0x0C, AMF3_DDV_CONTAINER = 0xFF, AMF3_UNDEFINED = 0x00, AMF3_NULL = 0x01,
  AMF3_FALSE = 0x02, AMF3_TRUE = 0x03, AMF3_INTEGER = 0x04, AMF3_DOUBLE = 0x05,
  AMF3_STRING = 0x06, AMF3_XMLDOC = 0x07, AMF3_DATE = 0x08, AMF3_ARRAY = 0x09,
  AMF3_OBJECT = 0x0A, AMF3_XML = 0x0B, AMF3_BYTES = 0x0C, AMF3_DDV_CONTAINER = 0xFF
}
 Enumerates all possible AMF3 types, adding a special DDVTECH container type for ease of use. More...
 
enum  obj3type {
  AMF3_UNDEFINED = 0x00, AMF3_NULL = 0x01, AMF3_FALSE = 0x02, AMF3_TRUE = 0x03,
  AMF3_INTEGER = 0x04, AMF3_DOUBLE = 0x05, AMF3_STRING = 0x06, AMF3_XMLDOC = 0x07,
  AMF3_DATE = 0x08, AMF3_ARRAY = 0x09, AMF3_OBJECT = 0x0A, AMF3_XML = 0x0B,
  AMF3_BYTES = 0x0C, AMF3_DDV_CONTAINER = 0xFF, AMF3_UNDEFINED = 0x00, AMF3_NULL = 0x01,
  AMF3_FALSE = 0x02, AMF3_TRUE = 0x03, AMF3_INTEGER = 0x04, AMF3_DOUBLE = 0x05,
  AMF3_STRING = 0x06, AMF3_XMLDOC = 0x07, AMF3_DATE = 0x08, AMF3_ARRAY = 0x09,
  AMF3_OBJECT = 0x0A, AMF3_XML = 0x0B, AMF3_BYTES = 0x0C, AMF3_DDV_CONTAINER = 0xFF
}
 Enumerates all possible AMF3 types, adding a special DDVTECH container type for ease of use. More...
 

Functions

Object parse (const unsigned char *data, unsigned int len)
 Parses a C-string to a valid AMF::Object. More...
 
Object parse (std::string data)
 Parses a std::string to a valid AMF::Object. More...
 
Object3 parse3 (const unsigned char *data, unsigned int len)
 Parses a C-string to a valid AMF::Object3. More...
 
Object3 parse3 (std::string data)
 Parses a std::string to a valid AMF::Object3. More...
 
Object parseOne (const unsigned char *&data, unsigned int &len, unsigned int &i, std::string name)
 Parses a single AMF0 type - used recursively by the AMF::parse() functions. More...
 
Object3 parseOne3 (const unsigned char *&data, unsigned int &len, unsigned int &i, std::string name)
 Parses a single AMF3 type - used recursively by the AMF::parse3() functions. More...
 

Detailed Description

Holds all AMF parsing and creation related functions and classes.

Enumeration Type Documentation

Enumerates all possible AMF0 types, adding a special DDVTECH container type for ease of use.

Enumerator
AMF0_NUMBER 
AMF0_BOOL 
AMF0_STRING 
AMF0_OBJECT 
AMF0_MOVIECLIP 
AMF0_NULL 
AMF0_UNDEFINED 
AMF0_REFERENCE 
AMF0_ECMA_ARRAY 
AMF0_OBJ_END 
AMF0_STRICT_ARRAY 
AMF0_DATE 
AMF0_LONGSTRING 
AMF0_UNSUPPORTED 
AMF0_RECORDSET 
AMF0_XMLDOC 
AMF0_TYPED_OBJ 
AMF0_UPGRADE 
AMF0_DDV_CONTAINER 
AMF0_NUMBER 
AMF0_BOOL 
AMF0_STRING 
AMF0_OBJECT 
AMF0_MOVIECLIP 
AMF0_NULL 
AMF0_UNDEFINED 
AMF0_REFERENCE 
AMF0_ECMA_ARRAY 
AMF0_OBJ_END 
AMF0_STRICT_ARRAY 
AMF0_DATE 
AMF0_LONGSTRING 
AMF0_UNSUPPORTED 
AMF0_RECORDSET 
AMF0_XMLDOC 
AMF0_TYPED_OBJ 
AMF0_UPGRADE 
AMF0_DDV_CONTAINER 

Enumerates all possible AMF0 types, adding a special DDVTECH container type for ease of use.

Enumerator
AMF0_NUMBER 
AMF0_BOOL 
AMF0_STRING 
AMF0_OBJECT 
AMF0_MOVIECLIP 
AMF0_NULL 
AMF0_UNDEFINED 
AMF0_REFERENCE 
AMF0_ECMA_ARRAY 
AMF0_OBJ_END 
AMF0_STRICT_ARRAY 
AMF0_DATE 
AMF0_LONGSTRING 
AMF0_UNSUPPORTED 
AMF0_RECORDSET 
AMF0_XMLDOC 
AMF0_TYPED_OBJ 
AMF0_UPGRADE 
AMF0_DDV_CONTAINER 
AMF0_NUMBER 
AMF0_BOOL 
AMF0_STRING 
AMF0_OBJECT 
AMF0_MOVIECLIP 
AMF0_NULL 
AMF0_UNDEFINED 
AMF0_REFERENCE 
AMF0_ECMA_ARRAY 
AMF0_OBJ_END 
AMF0_STRICT_ARRAY 
AMF0_DATE 
AMF0_LONGSTRING 
AMF0_UNSUPPORTED 
AMF0_RECORDSET 
AMF0_XMLDOC 
AMF0_TYPED_OBJ 
AMF0_UPGRADE 
AMF0_DDV_CONTAINER 

Enumerates all possible AMF3 types, adding a special DDVTECH container type for ease of use.

Enumerator
AMF3_UNDEFINED 
AMF3_NULL 
AMF3_FALSE 
AMF3_TRUE 
AMF3_INTEGER 
AMF3_DOUBLE 
AMF3_STRING 
AMF3_XMLDOC 
AMF3_DATE 
AMF3_ARRAY 
AMF3_OBJECT 
AMF3_XML 
AMF3_BYTES 
AMF3_DDV_CONTAINER 
AMF3_UNDEFINED 
AMF3_NULL 
AMF3_FALSE 
AMF3_TRUE 
AMF3_INTEGER 
AMF3_DOUBLE 
AMF3_STRING 
AMF3_XMLDOC 
AMF3_DATE 
AMF3_ARRAY 
AMF3_OBJECT 
AMF3_XML 
AMF3_BYTES 
AMF3_DDV_CONTAINER 

Enumerates all possible AMF3 types, adding a special DDVTECH container type for ease of use.

Enumerator
AMF3_UNDEFINED 
AMF3_NULL 
AMF3_FALSE 
AMF3_TRUE 
AMF3_INTEGER 
AMF3_DOUBLE 
AMF3_STRING 
AMF3_XMLDOC 
AMF3_DATE 
AMF3_ARRAY 
AMF3_OBJECT 
AMF3_XML 
AMF3_BYTES 
AMF3_DDV_CONTAINER 
AMF3_UNDEFINED 
AMF3_NULL 
AMF3_FALSE 
AMF3_TRUE 
AMF3_INTEGER 
AMF3_DOUBLE 
AMF3_STRING 
AMF3_XMLDOC 
AMF3_DATE 
AMF3_ARRAY 
AMF3_OBJECT 
AMF3_XML 
AMF3_BYTES 
AMF3_DDV_CONTAINER 

Function Documentation

Object AMF::parse ( const unsigned char *  data,
unsigned int  len 
)

Parses a C-string to a valid AMF::Object.

This function will find all AMF objects in the string and return them all packed in a single AMF::AMF0_DDV_CONTAINER AMF::Object.

Object AMF::parse ( std::string  data)

Parses a std::string to a valid AMF::Object.

This function will find all AMF objects in the string and return them all packed in a single AMF::AMF0_DDV_CONTAINER AMF::Object.

Object3 AMF::parse3 ( const unsigned char *  data,
unsigned int  len 
)

Parses a C-string to a valid AMF::Object3.

This function will find all AMF3 objects in the string and return them all packed in a single AMF::AMF3_DDV_CONTAINER AMF::Object3.

Object3 AMF::parse3 ( std::string  data)

Parses a std::string to a valid AMF::Object3.

This function will find all AMF3 objects in the string and return them all packed in a single AMF::AMF3_DDV_CONTAINER AMF::Object3.

Object AMF::parseOne ( const unsigned char *&  data,
unsigned int &  len,
unsigned int &  i,
std::string  name 
)

Parses a single AMF0 type - used recursively by the AMF::parse() functions.

This function updates i every call with the new position in the data.

Parameters
dataThe raw data to parse.
lenThe size of the raw data.
iCurrent parsing position in the raw data.
nameIndice name for any new object created.
Returns
A single AMF::Object, parsed from the raw data.
Object3 AMF::parseOne3 ( const unsigned char *&  data,
unsigned int &  len,
unsigned int &  i,
std::string  name 
)

Parses a single AMF3 type - used recursively by the AMF::parse3() functions.

This function updates i every call with the new position in the data.

Parameters
dataThe raw data to parse.
lenThe size of the raw data.
iCurrent parsing position in the raw data.
nameIndice name for any new object created.
Returns
A single AMF::Object3, parsed from the raw data.
Todo:
Fix references?
Todo:
Implement traits by reference. Or references in general, of course...
Todo:
Read in arrsize sealed member names, then arrsize sealed members.
Todo:
Fix references?