Binary representation of an ActionScript object. More...
#include <amf.h>
Public Types | |
enum | shared_obj_types_e { CONNECT = 0x01, DISCONNECT = 0x02, SET_ATTRIBUTE = 0x03, UPDATE_DATA = 0x04, UPDATE_ATTRIBUTE = 0x05, SEND_MESSAGE = 0x06, STATUS = 0x07, CLEAR_DATA = 0x08, DELETE_DATA = 0x09, DELETE_ATTRIBYTE = 0x0a, INITIAL_DATA = 0x0b, CONNECT = 0x01, DISCONNECT = 0x02, SET_ATTRIBUTE = 0x03, UPDATE_DATA = 0x04, UPDATE_ATTRIBUTE = 0x05, SEND_MESSAGE = 0x06, STATUS = 0x07, CLEAR_DATA = 0x08, DELETE_DATA = 0x09, DELETE_ATTRIBYTE = 0x0a, INITIAL_DATA = 0x0b } |
Types of SharedObjects that can be serialized or deserialized. More... | |
enum | filetype_e { FILETYPE_ERROR = -1, FILETYPE_NONE = 0, FILETYPE_HTML, FILETYPE_SWF, FILETYPE_VIDEO, FILETYPE_AUDIO, FILETYPE_MP3, FILETYPE_FCS, FILETYPE_OSCP, FILETYPE_ERROR = -1, FILETYPE_NONE = 0, FILETYPE_HTML, FILETYPE_SWF, FILETYPE_VIDEO, FILETYPE_AUDIO, FILETYPE_MP3, FILETYPE_FCS, FILETYPE_OSCP } |
Type of file being streamed. More... | |
enum | shared_obj_types_e { CONNECT = 0x01, DISCONNECT = 0x02, SET_ATTRIBUTE = 0x03, UPDATE_DATA = 0x04, UPDATE_ATTRIBUTE = 0x05, SEND_MESSAGE = 0x06, STATUS = 0x07, CLEAR_DATA = 0x08, DELETE_DATA = 0x09, DELETE_ATTRIBYTE = 0x0a, INITIAL_DATA = 0x0b, CONNECT = 0x01, DISCONNECT = 0x02, SET_ATTRIBUTE = 0x03, UPDATE_DATA = 0x04, UPDATE_ATTRIBUTE = 0x05, SEND_MESSAGE = 0x06, STATUS = 0x07, CLEAR_DATA = 0x08, DELETE_DATA = 0x09, DELETE_ATTRIBYTE = 0x0a, INITIAL_DATA = 0x0b } |
Types of SharedObjects that can be serialized or deserialized. More... | |
enum | filetype_e { FILETYPE_ERROR = -1, FILETYPE_NONE = 0, FILETYPE_HTML, FILETYPE_SWF, FILETYPE_VIDEO, FILETYPE_AUDIO, FILETYPE_MP3, FILETYPE_FCS, FILETYPE_OSCP, FILETYPE_ERROR = -1, FILETYPE_NONE = 0, FILETYPE_HTML, FILETYPE_SWF, FILETYPE_VIDEO, FILETYPE_AUDIO, FILETYPE_MP3, FILETYPE_FCS, FILETYPE_OSCP } |
Type of file being streamed. More... | |
Public Member Functions | |
AMF () | |
Create a new AMF object. | |
~AMF () | |
Delete the allocated AMF object. | |
size_t | totalsize () |
Get the total number of allocated bytes used when serializing. | |
AMF () | |
Create a new AMF object. | |
~AMF () | |
Delete the allocated AMF object. | |
size_t | totalsize () |
Get the total number of allocated bytes used when serializing. | |
Encoding methods | |
Methods for encoding data into big endian formatted raw AMF data. Note that while we could have had a single overloaded encode method, this is more explicit, which when it comes to manipulating binary protocols make the code much more readable. | |
boost::shared_ptr< Buffer > | encodeProperty (boost::shared_ptr< cygnal::Element > el) |
Encode a variable to its serialized representation. | |
boost::shared_ptr< Buffer > | encodeProperty (boost::shared_ptr< cygnal::Element > el) |
Encode a variable to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeString (const std::string &str) |
Encode a string object to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeString (boost::uint8_t *data, size_t size) |
Encode an array of ASCII bytes to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeNullString () |
Encode a String object to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeBoolean (bool flag) |
Encode a Boolean object to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeUndefined () |
Encode an "Undefined" object to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeNull () |
Encode a NULL object to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeUnsupported () |
Encode a "Unsupported" object to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeXMLObject (const boost::uint8_t *data, size_t nbytes) |
Encode an XML object to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeTypedObject (const cygnal::Element &data) |
Encode a Typed Object to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeReference (boost::uint16_t index) |
Encode a Reference to an object to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeMovieClip (const boost::uint8_t *data, size_t size) |
Encode a Movie Clip (swf data) to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeECMAArray (const cygnal::Element &data) |
Encode an ECMA Array to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeLongString (const boost::uint8_t *data, size_t size) |
Encode a Long String to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeRecordSet (const boost::uint8_t *data, size_t size) |
Encode a Record Set to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeDate (const boost::uint8_t *data) |
Encode a Date to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeStrictArray (const cygnal::Element &data) |
Encode a Strict Array to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeObject (const cygnal::Element &data) |
Encode an object to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeObjectEnd () |
Encode the end of an object to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeNumber (double num) |
Encode a 64 bit number to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeElement (boost::shared_ptr< cygnal::Element > el) |
Encode an Element to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeElement (const cygnal::Element &el) |
Encode an Element to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeString (const std::string &str) |
Encode a string object to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeString (boost::uint8_t *data, size_t size) |
Encode an array of ASCII bytes to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeNullString () |
Encode a String object to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeBoolean (bool flag) |
Encode a Boolean object to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeUndefined () |
Encode an "Undefined" object to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeNull () |
Encode a NULL object to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeUnsupported () |
Encode a "Unsupported" object to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeXMLObject (const boost::uint8_t *data, size_t nbytes) |
Encode an XML object to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeTypedObject (const cygnal::Element &data) |
Encode a Typed Object to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeReference (boost::uint16_t index) |
Encode a Reference to an object to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeMovieClip (const boost::uint8_t *data, size_t size) |
Encode a Movie Clip (swf data) to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeECMAArray (const cygnal::Element &data) |
Encode an ECMA Array to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeLongString (const boost::uint8_t *data, size_t size) |
Encode a Long String to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeRecordSet (const boost::uint8_t *data, size_t size) |
Encode a Record Set to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeDate (const boost::uint8_t *data) |
Encode a Date to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeStrictArray (const cygnal::Element &data) |
Encode a Strict Array to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeObject (const cygnal::Element &data) |
Encode an object to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeObjectEnd () |
Encode the end of an object to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeNumber (double num) |
Encode a 64 bit number to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeElement (boost::shared_ptr< cygnal::Element > el) |
Encode an Element to its serialized representation. | |
static boost::shared_ptr< Buffer > | encodeElement (const cygnal::Element &el) |
Encode an Element to its serialized representation. | |
Decoding methods | |
Methods for extracting data from big endian formatted raw AMF data. | |
boost::shared_ptr < cygnal::Element > | extractAMF (boost::uint8_t *in, boost::uint8_t *tooFar) |
Extract an AMF object from an array of raw bytes. | |
boost::shared_ptr < cygnal::Element > | extractAMF (boost::shared_ptr< Buffer > buf) |
Extract an AMF object from an array of raw bytes. | |
boost::shared_ptr < cygnal::Element > | extractProperty (boost::uint8_t *in, boost::uint8_t *tooFar) |
Extract a Property. | |
boost::shared_ptr < cygnal::Element > | extractProperty (boost::shared_ptr< Buffer > buf) |
Extract a Property. | |
boost::shared_ptr < cygnal::Element > | extractAMF (boost::uint8_t *in, boost::uint8_t *tooFar) |
Extract an AMF object from an array of raw bytes. | |
boost::shared_ptr < cygnal::Element > | extractAMF (boost::shared_ptr< Buffer > buf) |
Extract an AMF object from an array of raw bytes. | |
boost::shared_ptr < cygnal::Element > | extractProperty (boost::uint8_t *in, boost::uint8_t *tooFar) |
Extract a Property. | |
boost::shared_ptr < cygnal::Element > | extractProperty (boost::shared_ptr< Buffer > buf) |
Extract a Property. | |
static Element::amf0_type_e | extractElementHeader (boost::uint8_t *in) |
Extract the AMF0 object type from the header. | |
static Element::amf0_type_e | extractElementHeader (boost::uint8_t *in) |
Extract the AMF0 object type from the header. |
Binary representation of an ActionScript object.
AMF is used to send objects, whether to a SharedObject .sol file, a memory based LocalConnection segment, or over an RTMP connection for streaming.
Types of SharedObjects that can be serialized or deserialized.
Types of SharedObjects that can be serialized or deserialized.
cygnal::AMF::AMF | ( | ) |
Create a new AMF object.
Create a new AMF class. As most of the methods in the AMF class a static, this is primarily only used when encoding complex objects where the byte count is accumulated.
As most of the methods in the AMF class a static, this is primarily only used when encoding complex objects where the byte count is accumulated.
cygnal::AMF::AMF | ( | ) |
cygnal::AMF::~AMF | ( | ) |
Delete the allocated AMF object.
boost::shared_ptr< Buffer > cygnal::AMF::encodeBoolean | ( | bool | flag | ) | [static] |
Encode a Boolean object to its serialized representation.
Encode a Boolean object to it's serialized representation.
flag | The boolean value to serialize. |
static boost::shared_ptr<Buffer> cygnal::AMF::encodeBoolean | ( | bool | flag | ) | [static] |
Encode a Boolean object to its serialized representation.
flag | The boolean value to serialize. |
static boost::shared_ptr<Buffer> cygnal::AMF::encodeDate | ( | const boost::uint8_t * | data | ) | [static] |
Encode a Date to its serialized representation.
data | A pointer to the raw bytes that becomes the data. |
boost::shared_ptr< Buffer > cygnal::AMF::encodeDate | ( | const boost::uint8_t * | date | ) | [static] |
Encode a Date to its serialized representation.
Encode a Date to it's serialized representation.
data | A pointer to the raw bytes that becomes the data. |
static boost::shared_ptr<Buffer> cygnal::AMF::encodeECMAArray | ( | const cygnal::Element & | data | ) | [static] |
Encode an ECMA Array to its serialized representation.
An ECMA Array, also called a Mixed Array, contains any AMF data type as an item in the array.
data | A pointer to the raw bytes that becomes the data. | |
size | The number of bytes to serialize. |
boost::shared_ptr< Buffer > cygnal::AMF::encodeECMAArray | ( | const cygnal::Element & | data | ) | [static] |
Encode an ECMA Array to its serialized representation.
Encode an ECMA Array to it's serialized representation. An ECMA Array, also called a Mixed Array, contains any AMF data type as an item in the array.
An ECMA Array, also called a Mixed Array, contains any AMF data type as an item in the array.
data | A pointer to the raw bytes that becomes the data. | |
size | The number of bytes to serialize. |
data | A pointer to the raw bytes that becomes the data. | |
size | The number of bytes to serialize. |
boost::shared_ptr< Buffer > cygnal::AMF::encodeElement | ( | boost::shared_ptr< cygnal::Element > | el | ) | [static] |
Encode an Element to its serialized representation.
Write an AMF element.
el | A smart pointer to the Element to encode. |
This encodes the data supplied to an AMF formatted one. As the memory is allocatd within this function, you *must* free the memory used for each element or you'll leak memory.
A "packet" (or element) in AMF is a byte code, followed by the data. Sometimes the data is prefixed by a count, and sometimes it's terminated with a 0x09. Ya gotta love these flaky ad-hoc formats.
All Numbers are 64 bit, big-endian (network byte order) entities.
All strings are in multibyte format, which is to say, probably normal ASCII. It may be that these need to be converted to wide characters, but for now we just leave them as standard multibyte characters. Encode an Element to it's serialized representation.
el | A smart pointer to the Element to encode. |
Referenced by cygnal::Element::encode(), cygnal::EchoTest::formatEchoResponse(), and cygnal::OflaDemoTest::formatOflaDemoResponse().
boost::shared_ptr< Buffer > cygnal::AMF::encodeElement | ( | const cygnal::Element & | el | ) | [static] |
static boost::shared_ptr<Buffer> cygnal::AMF::encodeElement | ( | boost::shared_ptr< cygnal::Element > | el | ) | [static] |
static boost::shared_ptr<Buffer> cygnal::AMF::encodeElement | ( | const cygnal::Element & | el | ) | [static] |
static boost::shared_ptr<Buffer> cygnal::AMF::encodeLongString | ( | const boost::uint8_t * | data, | |
size_t | size | |||
) | [static] |
Encode a Long String to its serialized representation.
data | A pointer to the raw bytes that becomes the data. | |
size | The number of bytes to serialize. |
boost::shared_ptr< Buffer > cygnal::AMF::encodeLongString | ( | const boost::uint8_t * | data, | |
size_t | size | |||
) | [static] |
Encode a Long String to its serialized representation.
Encode a Long String to it's serialized representation.
data | A pointer to the raw bytes that becomes the data. | |
size | The number of bytes to serialize. |
static boost::shared_ptr<Buffer> cygnal::AMF::encodeMovieClip | ( | const boost::uint8_t * | data, | |
size_t | size | |||
) | [static] |
Encode a Movie Clip (swf data) to its serialized representation.
data | A pointer to the raw bytes that becomes the data. | |
size | The number of bytes to serialize. |
boost::shared_ptr< Buffer > cygnal::AMF::encodeMovieClip | ( | const boost::uint8_t * | data, | |
size_t | size | |||
) | [static] |
Encode a Movie Clip (swf data) to its serialized representation.
Encode a Movie Clip (swf data) to it's serialized representation.
data | A pointer to the raw bytes that becomes the data. | |
size | The number of bytes to serialize. |
static boost::shared_ptr<Buffer> cygnal::AMF::encodeNull | ( | ) | [static] |
Encode a NULL object to its serialized representation.
A NULL object is often used as a placeholder in RTMP.
boost::shared_ptr< Buffer > cygnal::AMF::encodeNull | ( | ) | [static] |
Encode a NULL object to its serialized representation.
Encode a NULL object to it's serialized representation. A NULL object is often used as a placeholder in RTMP.
A NULL object is often used as a placeholder in RTMP.
boost::shared_ptr< Buffer > cygnal::AMF::encodeNullString | ( | ) | [static] |
Encode a String object to its serialized representation.
Encode a String object to it's serialized representation. A NULL String is a string with no associated data.
A NULL String is a string with no associated data.
static boost::shared_ptr<Buffer> cygnal::AMF::encodeNullString | ( | ) | [static] |
Encode a String object to its serialized representation.
A NULL String is a string with no associated data.
boost::shared_ptr< Buffer > cygnal::AMF::encodeNumber | ( | double | indata | ) | [static] |
Encode a 64 bit number to its serialized representation.
Encode a 64 bit number to it's serialized representation.
num | A double value to serialize. |
References cygnal::AMF0_NUMBER_SIZE, and cygnal::swapBytes().
static boost::shared_ptr<Buffer> cygnal::AMF::encodeNumber | ( | double | num | ) | [static] |
Encode a 64 bit number to its serialized representation.
num | A double value to serialize. |
boost::shared_ptr< Buffer > cygnal::AMF::encodeObject | ( | const cygnal::Element & | data | ) | [static] |
static boost::shared_ptr<Buffer> cygnal::AMF::encodeObject | ( | const cygnal::Element & | data | ) | [static] |
static boost::shared_ptr<Buffer> cygnal::AMF::encodeObjectEnd | ( | ) | [static] |
Encode the end of an object to its serialized representation.
boost::shared_ptr< Buffer > cygnal::AMF::encodeObjectEnd | ( | ) | [static] |
Encode the end of an object to its serialized representation.
Encode the end of an object to it's serialized representation.
boost::shared_ptr< Buffer > cygnal::AMF::encodeProperty | ( | boost::shared_ptr< cygnal::Element > | el | ) |
Encode a variable to its serialized representation.
el | A smart pointer to the Element to encode. |
Encode a variable to it's serialized representation.
el | A smart pointer to the Element to encode. |
Referenced by cygnal::SOL::writeFile().
boost::shared_ptr<Buffer> cygnal::AMF::encodeProperty | ( | boost::shared_ptr< cygnal::Element > | el | ) |
static boost::shared_ptr<Buffer> cygnal::AMF::encodeRecordSet | ( | const boost::uint8_t * | data, | |
size_t | size | |||
) | [static] |
Encode a Record Set to its serialized representation.
data | A pointer to the raw bytes that becomes the data. | |
size | The number of bytes to serialize. |
boost::shared_ptr< Buffer > cygnal::AMF::encodeRecordSet | ( | const boost::uint8_t * | data, | |
size_t | size | |||
) | [static] |
Encode a Record Set to its serialized representation.
Encode a Record Set to it's serialized representation.
data | A pointer to the raw bytes that becomes the data. | |
size | The number of bytes to serialize. |
static boost::shared_ptr<Buffer> cygnal::AMF::encodeReference | ( | boost::uint16_t | index | ) | [static] |
Encode a Reference to an object to its serialized representation.
data | A pointer to the raw bytes that becomes the data. | |
size | The number of bytes to serialize. |
boost::shared_ptr< Buffer > cygnal::AMF::encodeReference | ( | boost::uint16_t | index | ) | [static] |
Encode a Reference to an object to its serialized representation.
Encode a Reference to an object to it's serialized representation.
data | A pointer to the raw bytes that becomes the data. | |
size | The number of bytes to serialize. |
boost::shared_ptr< Buffer > cygnal::AMF::encodeStrictArray | ( | const cygnal::Element & | data | ) | [static] |
Encode a Strict Array to its serialized representation.
Encode a Strict Array to it's serialized represenicttation. A Strict Array is one where all the items are the same data type, commonly either a number or a string.
A Strict Array is one where all the items are the same data type, commonly either a number or a string.
data | A pointer to the raw bytes that becomes the data. | |
size | The number of bytes to serialize. |
data | A pointer to the raw bytes that becomes the data. | |
size | The number of bytes to serialize. |
static boost::shared_ptr<Buffer> cygnal::AMF::encodeStrictArray | ( | const cygnal::Element & | data | ) | [static] |
Encode a Strict Array to its serialized representation.
A Strict Array is one where all the items are the same data type, commonly either a number or a string.
data | A pointer to the raw bytes that becomes the data. | |
size | The number of bytes to serialize. |
boost::shared_ptr< Buffer > cygnal::AMF::encodeString | ( | boost::uint8_t * | data, | |
size_t | size | |||
) | [static] |
Encode an array of ASCII bytes to its serialized representation.
Encode a string to it's serialized representation.
data | The data to serialize into big endian format | |
size | The size of the data in bytes |
boost::shared_ptr< Buffer > cygnal::AMF::encodeString | ( | const std::string & | str | ) | [static] |
Encode a string object to its serialized representation.
Encode a string to it's serialized representation.
str | a string value |
Referenced by gnash::HTTP::formatEchoResponse(), and cygnal::LcShm::formatHeader().
static boost::shared_ptr<Buffer> cygnal::AMF::encodeString | ( | const std::string & | str | ) | [static] |
Encode a string object to its serialized representation.
str | a string value |
static boost::shared_ptr<Buffer> cygnal::AMF::encodeString | ( | boost::uint8_t * | data, | |
size_t | size | |||
) | [static] |
Encode an array of ASCII bytes to its serialized representation.
data | The data to serialize into big endian format | |
size | The size of the data in bytes |
boost::shared_ptr< Buffer > cygnal::AMF::encodeTypedObject | ( | const cygnal::Element & | data | ) | [static] |
Encode a Typed Object to its serialized representation.
Encode a Typed Object to it's serialized representation.
data | A pointer to the raw bytes that becomes the data. | |
size | The number of bytes to serialize. |
static boost::shared_ptr<Buffer> cygnal::AMF::encodeTypedObject | ( | const cygnal::Element & | data | ) | [static] |
Encode a Typed Object to its serialized representation.
data | A pointer to the raw bytes that becomes the data. | |
size | The number of bytes to serialize. |
static boost::shared_ptr<Buffer> cygnal::AMF::encodeUndefined | ( | ) | [static] |
Encode an "Undefined" object to its serialized representation.
boost::shared_ptr< Buffer > cygnal::AMF::encodeUndefined | ( | ) | [static] |
Encode an "Undefined" object to its serialized representation.
Encode an "Undefined" object to it's serialized representation.
static boost::shared_ptr<Buffer> cygnal::AMF::encodeUnsupported | ( | ) | [static] |
Encode a "Unsupported" object to its serialized representation.
boost::shared_ptr< Buffer > cygnal::AMF::encodeUnsupported | ( | ) | [static] |
Encode a "Unsupported" object to its serialized representation.
Encode a "Unsupported" object to it's serialized representation.
static boost::shared_ptr<Buffer> cygnal::AMF::encodeXMLObject | ( | const boost::uint8_t * | data, | |
size_t | nbytes | |||
) | [static] |
Encode an XML object to its serialized representation.
data | A pointer to the raw bytes that becomes the XML data. | |
nbytes | The number of bytes to serialize. |
boost::shared_ptr< Buffer > cygnal::AMF::encodeXMLObject | ( | const boost::uint8_t * | data, | |
size_t | nbytes | |||
) | [static] |
Encode an XML object to its serialized representation.
Encode an XML object to it's serialized representation.
data | A pointer to the raw bytes that becomes the XML data. | |
nbytes | The number of bytes to serialize. |
boost::shared_ptr<cygnal::Element> cygnal::AMF::extractAMF | ( | boost::uint8_t * | in, | |
boost::uint8_t * | tooFar | |||
) |
Extract an AMF object from an array of raw bytes.
An AMF object is one of the support data types.
in | A real pointer to the raw data to start parsing from. | |
tooFar | A pointer to one-byte-past the last valid memory address within the buffer. |
boost::shared_ptr< cygnal::Element > cygnal::AMF::extractAMF | ( | boost::shared_ptr< Buffer > | buf | ) |
boost::shared_ptr< cygnal::Element > cygnal::AMF::extractAMF | ( | boost::uint8_t * | in, | |
boost::uint8_t * | tooFar | |||
) |
Extract an AMF object from an array of raw bytes.
Extract an AMF object from an array of raw bytes. An AMF object is one of the support data types.
An AMF object is one of the support data types.
in | A real pointer to the raw data to start parsing from. | |
tooFar | A pointer to one-byte-past the last valid memory address within the buffer. |
in | A real pointer to the raw data to start parsing from. | |
tooFar | A pointer to one-byte-past the last valid memory address within the buffer. |
Referenced by cygnal::Flv::decodeMetaData(), gnash::RTMP::decodeMsgBody(), cygnal::AMF_msg::parseAMFPacket(), cygnal::EchoTest::parseEchoRequest(), cygnal::FitcDemoTest::parseFitcDemoRequest(), cygnal::LcShm::parseHeader(), and cygnal::OflaDemoTest::parseOflaDemoRequest().
boost::shared_ptr<cygnal::Element> cygnal::AMF::extractAMF | ( | boost::shared_ptr< Buffer > | buf | ) |
static Element::amf0_type_e cygnal::AMF::extractElementHeader | ( | boost::uint8_t * | in | ) | [inline, static] |
Extract the AMF0 object type from the header.
in | The raw data to extract values from. |
static Element::amf0_type_e cygnal::AMF::extractElementHeader | ( | boost::uint8_t * | in | ) | [inline, static] |
Extract the AMF0 object type from the header.
in | The raw data to extract values from. |
boost::shared_ptr< cygnal::Element > cygnal::AMF::extractProperty | ( | boost::shared_ptr< Buffer > | buf | ) |
Extract a Property.
Extract a Property. A Property is a standard AMF object preceeded by a length and an ASCII name field. These are only used with higher level ActionScript objects.
A Property is a standard AMF object preceeded by a length and an ASCII name field. These are only used with higher level ActionScript objects.
buf | A smart pointer to an Buffer to parse the data from. |
buf | A smart pointer to an Buffer to parse the data from. |
boost::shared_ptr<cygnal::Element> cygnal::AMF::extractProperty | ( | boost::uint8_t * | in, | |
boost::uint8_t * | tooFar | |||
) |
Extract a Property.
A Property is a standard AMF object preceeded by a length and an ASCII name field. These are only used with higher level ActionScript objects.
in | A real pointer to the raw data to start parsing from. | |
tooFar | A pointer to one-byte-past the last valid memory address within the buffer. |
boost::shared_ptr<cygnal::Element> cygnal::AMF::extractProperty | ( | boost::shared_ptr< Buffer > | buf | ) |
Extract a Property.
A Property is a standard AMF object preceeded by a length and an ASCII name field. These are only used with higher level ActionScript objects.
buf | A smart pointer to an Buffer to parse the data from. |
boost::shared_ptr< cygnal::Element > cygnal::AMF::extractProperty | ( | boost::uint8_t * | in, | |
boost::uint8_t * | tooFar | |||
) |
Extract a Property.
Extract a Property. A Property is a standard AMF object preceeded by a length and an ASCII name field. These are onicly used with higher level ActionScript objects.
A Property is a standard AMF object preceeded by a length and an ASCII name field. These are only used with higher level ActionScript objects.
in | A real pointer to the raw data to start parsing from. | |
tooFar | A pointer to one-byte-past the last valid memory address within the buffer. |
in | A real pointer to the raw data to start parsing from. | |
tooFar | A pointer to one-byte-past the last valid memory address within the buffer. |
Referenced by cygnal::RTMPServer::packetRead(), and cygnal::SOL::readFile().
size_t cygnal::AMF::totalsize | ( | ) | [inline] |
Get the total number of allocated bytes used when serializing.
size_t cygnal::AMF::totalsize | ( | ) | [inline] |
Get the total number of allocated bytes used when serializing.
Referenced by cygnal::Flv::decodeMetaData(), gnash::RTMP::decodeMsgBody(), cygnal::AMF_msg::parseAMFPacket(), cygnal::EchoTest::parseEchoRequest(), cygnal::FitcDemoTest::parseFitcDemoRequest(), cygnal::OflaDemoTest::parseOflaDemoRequest(), and cygnal::SOL::readFile().