123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
-
- #ifndef __IOT_CLOUD_H__
- #define __IOT_CLOUD_H__
- #include <stdbool.h>
- #include <iot_demo_def.h>
- int CLOUD_Init(void);
- int CLOUD_Deinit(void);
- int CLOUD_ReportMsg(const char *jsonString);
- int CLOUD_Connect(const char *deviceID, const char *devicePwd, \
- const char *serverIP, const char *serverPort);
- int CLOUD_Disconnect(void);
- int CLOUD_CommandCallBack(const char *jsonString);
- typedef enum {
- IOT_PROFILE_KEY_DATATYPE_INT = 0,
- IOT_PROFILE_KEY_DATATYPE_LONG,
- IOT_PROFILE_KEY_DATATYPE_FLOAT,
- IOT_PROFILE_KEY_DATATYPE_DOUBLE,
- IOT_PROFILE_KEY_DATATYPE_STRING,
- IOT_PROFILE_KEY_DATATYPE_LAST,
- }IotProfileDataType;
- typedef struct {
- void *nxt;
- char *key;
- IotProfileDataType type;
- void *value;
- }IotProfileKV;
- typedef struct {
- void *nxt;
- char *serviceID;
- char *eventTime;
- IotProfileKV *propertyLst;
- } IotProfileService;
- char *IoTProfilePackage(IotProfileService *serviceLst);
- char *IotNotificationPackage(int type, const char *enString, const char *chString);
- typedef enum {
- NOTIFY_TYPE_NORMAL = 0,
- NOTIFY_TYPE_SECONDARY,
- NOTIFY_TYPE_URGENT,
- NOTIFY_TYPE_LAST
- } NOTIFY_TYPE;
- int CLOUD_ReportNotification(int type, const char *enString, const char *chString);
- int CLOUD_GetCloudConnectedStatus(void);
- #endif
|