File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1
1
name =FastBot2
2
- version =1.0.3
2
+ version =1.0.4
3
3
author =AlexGyver <
[email protected] >
4
4
maintainer =AlexGyver <
[email protected] >
5
5
sentence =Fast and universal Arduino/ESP8266/ESP32 library for Telegram bot
Original file line number Diff line number Diff line change 3
3
#include < GSON.h>
4
4
#include < StringUtils.h>
5
5
6
+ #ifndef __AVR__
7
+ #include < functional>
8
+ #endif
9
+
6
10
#include " Fetcher.h"
7
11
#include " api.h"
8
12
#include " bot_config.h"
@@ -22,9 +26,15 @@ enum class Poll : uint8_t {
22
26
};
23
27
24
28
class Core : public Http {
29
+ #ifdef __AVR__
25
30
typedef void (*CallbackRaw)(Text response);
26
31
typedef void (*CallbackResult)(gson::Entry& entry);
27
32
typedef void (*CallbackUpdate)(Update& upd);
33
+ #else
34
+ typedef std::function<void (Text response)> CallbackRaw;
35
+ typedef std::function<void (gson::Entry& entry)> CallbackResult;
36
+ typedef std::function<void (Update& upd)> CallbackUpdate;
37
+ #endif
28
38
29
39
public:
30
40
// разрешение и запрет типов обновлений
You can’t perform that action at this time.
0 commit comments