avs-device-sdk/ThirdParty/MultipartParser/MultipartParser
Nikhila Krishnan 86228c703a Version 0.4 alexa-client-sdk
Changes in this update:
- Added the SpeechSynthesizer, an implementation of the SpeechRecognizer capability agent.
- Implemented a reference MediaPlayer based on [GStreamer](https://gstreamer.freedesktop.org/) for audio playback.
- Added the MediaPlayerInterface that allows you to implement your own media player.
- Updated ACL to support asynchronous receipt of audio attachments from AVS.
Bug Fixes:
-Some intermittent unit test failures were fixed.
Known Issues:
-ACL's asynchronous receipt of audio attachments may manage resources poorly in scenarios where attachments are
received but not consumed.
- When an AttachmentReader does not deliver data for prolonged periods MediaPlayer may not resume playing the
delayed audio.
2017-05-26 16:19:00 -07:00
..
.gitignore Version 0.2 - Alexa Interaction Manager - Comprised of three components, the Alexa Communications Library (ACL), the Alexa Directive Sequencer Library (ADSL), and Activity Focus Manager Library (AFML), it handles communications with AVS and message routing to capability agents. 2017-03-09 16:01:46 -08:00
LICENSE Version 0.1 - Alexa Communications Library - This component serves as the main communications channel between the client and Alexa Voice Service, providing an interface with which to send and receive messages. 2017-02-10 15:39:10 -08:00
MultipartParser.h Version 0.4 alexa-client-sdk 2017-05-26 16:19:00 -07:00
MultipartReader.h Version 0.1 - Alexa Communications Library - This component serves as the main communications channel between the client and Alexa Voice Service, providing an interface with which to send and receive messages. 2017-02-10 15:39:10 -08:00
README.markdown Version 0.1 - Alexa Communications Library - This component serves as the main communications channel between the client and Alexa Voice Service, providing an interface with which to send and receive messages. 2017-02-10 15:39:10 -08:00
Rakefile Version 0.1 - Alexa Communications Library - This component serves as the main communications channel between the client and Alexa Voice Service, providing an interface with which to send and receive messages. 2017-02-10 15:39:10 -08:00
formidable_parser.js Version 0.1 - Alexa Communications Library - This component serves as the main communications channel between the client and Alexa Voice Service, providing an interface with which to send and receive messages. 2017-02-10 15:39:10 -08:00
input.txt Version 0.1 - Alexa Communications Library - This component serves as the main communications channel between the client and Alexa Voice Service, providing an interface with which to send and receive messages. 2017-02-10 15:39:10 -08:00
multipart.cpp Version 0.1 - Alexa Communications Library - This component serves as the main communications channel between the client and Alexa Voice Service, providing an interface with which to send and receive messages. 2017-02-10 15:39:10 -08:00
rack-parser.rb Version 0.1 - Alexa Communications Library - This component serves as the main communications channel between the client and Alexa Voice Service, providing an interface with which to send and receive messages. 2017-02-10 15:39:10 -08:00

README.markdown

What is it?

An simple, efficient parser for multipart MIME messages, based on Formidable's parser.

Why?

MIME multipart messages are a total pain to parse because the grammar is so insane. Furthermore, the MIME specification is incredibly large. This has led to an army of equally large and complex MIME libraries. If you just want to parse a MIME multipart message without hassle then using all of those libraries are less than ideal. They all tend to handle the kitchen sink (e.g. they handling email parsing and all kinds of other stuff you don't need) or they depend on other libraries that you may not want (e.g. APR, glib) or they are under-documented or under-tested or just not efficient (e.g. buffering all data in memory; good luck parsing a 2 GB file upload). You can write your own parser but because the multipart grammar is so much of a pain it's very easy to make mistakes.

Goals and highlights of this parser

  • Multipart parsing, and only multipart parsing.
  • Event-driven API.
  • No dependencies on any external libraries, just straight C++ with STL.
  • Efficient. Nothing in the input is buffered except what's absolutely necessary for parsing.
  • Only one level of multipart parsing. A multipart message part can itself be a multipart message, but this parser doesn't attempt to provide a complex API for handling nested multipart messages. Instead the developer should just use another parser instance to parse nested messages.
  • No I/O is handled for you. This parser won't depend on any particular I/O library or even any particular operating system's I/O API. It won't block on I/O by itself, giving you full control over when (not) to block. It won't save data to files by itself, giving you full control over what to do with the parsed data.
  • Not thread-safe, but reentrant. No dependencies on any threading libraries.