29 lines
563 B
C++
29 lines
563 B
C++
/*
|
|
#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();
|
|
};
|
|
*/ |