Fix ShimLib.h error.

This commit is contained in:
Krad
2021-10-13 17:34:50 +08:00
parent 76fc231b39
commit 98dda5c728

View File

@@ -4,53 +4,48 @@
#ifndef GUI_SHIMLIB_H
#define GUI_SHIMLIB_H
#ifdef __CPLUSPLUS
#ifdef __cplusplus
extern "C"{
#endif
typedef enum
{
typedef enum {
BUSY,// device is preparing for scan
READY,// device is ready for scan
SCANING,// device is doing scan
ERROR// some device inner error are occured
}DeviceStatus;
} DeviceStatus;
typedef struct StatusInfo
{
typedef struct StatusInfo {
DeviceStatus status;// a enum represent device current status
float progress;// percent value of operation
}StatusInfo;
} StatusInfo;
//3 kinds of scan action
typedef enum
{
typedef enum {
SCAN,// Start scan action
PREVIEW_SCAN,// Start preview scan action
STOP,// Stop current scan
}ScanAction;
} ScanAction;
//kinds of device information
typedef enum
{
typedef enum {
MEAN_TEMPERATURE
}DeviceInfo;
} DeviceInfo;
int InitLib(void(*)(const char * msg));
extern int InitLib(void(*)(const char *msg));
int ScanControl(ScanAction actionType);
extern int ScanControl(ScanAction actionType);
StatusInfo GetStatus();
extern StatusInfo GetStatus();
int SetScanInf(const char * jsonString);
extern int SetScanInf(const char *jsonString);
const char * GetPreviewData();
extern const char *GetPreviewData();
const char * GetDeviceInf(DeviceInfo infoType);
extern const char *GetDeviceInf(DeviceInfo infoType);
#ifdef __CPLUSPLUS
}
#ifdef __cplusplus
};
#endif
#endif //GUI_SHIMLIB_H