2019-11-11 04:32:41 +00:00
|
|
|
/*
|
2019-08-12 18:15:00 +00:00
|
|
|
#pragma once
|
|
|
|
#include <ESP8266WebServer.h>
|
|
|
|
#include "player.h"
|
|
|
|
#include "controller.h"
|
|
|
|
#include <SD.h>
|
|
|
|
#include <WiFiClient.h>
|
|
|
|
#include <ESP8266WiFi.h>
|
|
|
|
#include <ESP8266mDNS.h>
|
|
|
|
|
|
|
|
class HTTPServer {
|
|
|
|
private:
|
|
|
|
ESP8266WebServer* _http_server;
|
|
|
|
void _handle_upload();
|
|
|
|
uint16_t _chunk_length;
|
|
|
|
uint8_t* _chunk;
|
|
|
|
uint32_t _file_size;
|
|
|
|
uint32_t _file_size_done;
|
|
|
|
bool _need_header;
|
|
|
|
uint32_t _upload_position;
|
|
|
|
void _handle_index();
|
|
|
|
void _handle_status();
|
|
|
|
Player* _player;
|
|
|
|
Controller* _controller;
|
|
|
|
public:
|
|
|
|
HTTPServer(Player* p, Controller* c);
|
|
|
|
void loop();
|
|
|
|
};
|
2019-11-11 04:32:41 +00:00
|
|
|
*/
|