ex
Fork of mbed-os-example-mbed5-blinky by
DuerOS-Light-SDK-v1.1.0/duer-os-light/src/iot-baidu-ota/baidu_iot_ota_http_downloader.h@47:9e361da97763, 2017-07-18 (annotated)
- Committer:
- TMBOY
- Date:
- Tue Jul 18 16:54:45 2017 +0800
- Revision:
- 47:9e361da97763
?
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| TMBOY | 47:9e361da97763 | 1 | #pragma once |
| TMBOY | 47:9e361da97763 | 2 | #include "baidu_iot_ota_downloader.h" |
| TMBOY | 47:9e361da97763 | 3 | #include "url.h" |
| TMBOY | 47:9e361da97763 | 4 | #include "baidu_http_client.h" |
| TMBOY | 47:9e361da97763 | 5 | |
| TMBOY | 47:9e361da97763 | 6 | class OTAHttpDownloader: public IOTADownloader |
| TMBOY | 47:9e361da97763 | 7 | { |
| TMBOY | 47:9e361da97763 | 8 | public: |
| TMBOY | 47:9e361da97763 | 9 | OTAHttpDownloader(URL *url); |
| TMBOY | 47:9e361da97763 | 10 | virtual ~OTAHttpDownloader(); |
| TMBOY | 47:9e361da97763 | 11 | virtual int connect(); |
| TMBOY | 47:9e361da97763 | 12 | virtual unsigned int get(data_available_cb cb, void* ctx); |
| TMBOY | 47:9e361da97763 | 13 | virtual int disconnect(); |
| TMBOY | 47:9e361da97763 | 14 | private: |
| TMBOY | 47:9e361da97763 | 15 | static int data_available(void *ctx, e_data_pos pos, const char *buf, size_t len, const char *type); |
| TMBOY | 47:9e361da97763 | 16 | duer::HttpClient *http_client; |
| TMBOY | 47:9e361da97763 | 17 | char *m_pUrl; |
| TMBOY | 47:9e361da97763 | 18 | }; |
