mirror of
https://github.com/sweidac/kidsbox.git
synced 2026-10-28 06:52:57 +01:00
Implement full NFC-URL streaming architecture
- rc522: add NDEF URL reading via WUPA+cascade anticoll+SELECT+TLV parse
- AudioPlayer: route http:// URIs to esp_player_http_music_play()
- CacheManager: download URLs async to /sdcard/cache/{hash}.{ext}
- TagPlayerControl: NDEF URL → cache-or-stream; fallback to UID local mapping
- RFIDInterface: wire ndef_callback, expose combined uid+url callback
- WebInterface: add /api/info, /api/storage, /api/playback, /api/bluetooth
- BluetoothInterface: stub for A2DP speaker mode
- Networking: WiFi connect with 30s timeout instead of blocking forever
- main.cpp: re-enable WiFi + web server, fix init order, add CacheManager
- www/: full SPA — playback controls, device info, storage, BT pairing
- .gitmodules: switch rc522 submodule URL to HTTPS
https://claude.ai/code/session_01MhAnh68DPNnTjcKqjNYDmk
This commit is contained in:
19 files changed
+1172
-318
No files matched your search
@@ -2,21 +2,32 @@
|
||||
#define _WEB_INTERFACE_HPP
|
||||
|
||||
#include <esp_http_server.h>
|
||||
#include <memory>
|
||||
#include <functional>
|
||||
|
||||
class AudioPlayer;
|
||||
class CacheManager;
|
||||
|
||||
class WebInterface {
|
||||
httpd_handle_t server = NULL;
|
||||
httpd_handle_t server = NULL;
|
||||
std::shared_ptr<AudioPlayer> audioPlayer;
|
||||
std::shared_ptr<CacheManager> cacheManager;
|
||||
|
||||
public:
|
||||
WebInterface();
|
||||
void start();
|
||||
void finishResourceRegistrations();
|
||||
void registerResource(httpd_uri_t* config);
|
||||
void initSD();
|
||||
public:
|
||||
WebInterface();
|
||||
|
||||
private:
|
||||
httpd_handle_t start_webserver();
|
||||
void registerFileServer();
|
||||
//esp_err_t hello_get_handler(httpd_req_t *req);
|
||||
void setAudioPlayer(std::shared_ptr<AudioPlayer> p) { audioPlayer = p; }
|
||||
void setCacheManager(std::shared_ptr<CacheManager> c) { cacheManager = c; }
|
||||
|
||||
void start();
|
||||
void finishResourceRegistrations();
|
||||
void registerResource(httpd_uri_t* config);
|
||||
void initSD();
|
||||
|
||||
private:
|
||||
httpd_handle_t start_webserver();
|
||||
void registerFileServer();
|
||||
void registerApiHandlers();
|
||||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
Reference in new issue
Block a user