diff options
Diffstat (limited to 'src/Http.h')
-rw-r--r-- | src/Http.h | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/src/Http.h b/src/Http.h new file mode 100644 index 0000000..31246bc --- /dev/null +++ b/src/Http.h @@ -0,0 +1,49 @@ +/* + * Http.h + * + * Created on: 2014. 6. 18. + * Author: oskwon + */ + +#ifndef HTTP_H_ +#define HTTP_H_ + +#include <map> +#include <string> + +#include "Mpeg.h" +//---------------------------------------------------------------------- + +class HttpHeader +{ +public: + enum { + UNKNOWN = 0, + TRANSCODING_LIVE, + TRANSCODING_FILE, + M3U + }; + + int type; + std::string method; + std::string path; + std::string version; + std::map<std::string, std::string> params; + + std::string page; + std::map<std::string, std::string> page_params; + +private: + +public: + HttpHeader() : type(UNKNOWN) {} + virtual ~HttpHeader() {} + + bool parse_request(std::string header); + std::string build_response(Mpeg *source); + + static std::string read_request(); +}; +//---------------------------------------------------------------------- + +#endif /* HTTP_H_ */ |