21 lines
447 B
C++
21 lines
447 B
C++
#pragma once
|
|
#include <Arduino.h>
|
|
#include "boomcast_queue.h"
|
|
|
|
class BoomUploader {
|
|
public:
|
|
void begin(BoomQueue* queue) { queue_ = queue; }
|
|
bool submitOne(const String& filename);
|
|
int submitAll();
|
|
void tick();
|
|
|
|
private:
|
|
BoomQueue* queue_ = nullptr;
|
|
bool doPost(const String& filename, const String& path);
|
|
uint32_t nextAttemptMs_ = 0;
|
|
uint8_t failures_ = 0;
|
|
bool permanentFailure_ = false;
|
|
};
|
|
|
|
extern BoomUploader boomUploader;
|