ex

Fork of mbed-os-example-mbed5-blinky by mbed-os-examples

DuerOS-Light-SDK-v1.1.0/duer-os-light/src/iot-baidu-ota/baidu_iot_ota_coap_downloader.h

Committer:
TMBOY
Date:
2017-07-18
Revision:
47:9e361da97763

File content as of revision 47:9e361da97763:

#pragma once
#include "baidu_iot_ota_downloader.h"
#include "url.h"
#include "coap_client.h"

class OTACoapDownloader: public IOTADownloader
{
public:
    OTACoapDownloader(URL *url, const char* cert=0);
    virtual ~OTACoapDownloader();
    virtual int connect();
    virtual unsigned int get(data_available_cb cb, void* ctx);
    virtual int disconnect();
private:
    URL *m_pUrl;
    CoapsClient* m_pCoapsClient;
};