Skip to content

Commit acb0eb3

Browse files
committed
added events and enums in header file
1 parent c1d0380 commit acb0eb3

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/ESPAsyncHTTPUpdateServer.h

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,27 @@
33

44
#include <ESPAsyncWebServer.h>
55

6+
enum UpdateType
7+
{
8+
FIRMWARE,
9+
FILE_SYSTEM
10+
};
11+
12+
enum UpdateCode
13+
{
14+
UPDATE_OK,
15+
UPDATE_ABORT,
16+
UPDATE_ERROR,
17+
};
18+
19+
typedef void (*ESPAsyncHTTPUpdateServer_event)(const UpdateType updateType, int &resultCode);
20+
621
class ESPAsyncHTTPUpdateServer
722
{
823
public:
24+
ESPAsyncHTTPUpdateServer_event onUpdateBegin;
25+
ESPAsyncHTTPUpdateServer_event onUpdateEnd;
26+
927
ESPAsyncHTTPUpdateServer();
1028

1129
void setup(AsyncWebServer *server)

0 commit comments

Comments
 (0)