60 lines
1.1 KiB
C
60 lines
1.1 KiB
C
//
|
|
// Created by Krad on 2021/10/12.
|
|
//
|
|
|
|
#ifndef GUI_SHIMLIB_H
|
|
#define GUI_SHIMLIB_H
|
|
#ifdef __cplusplus
|
|
extern "C"{
|
|
#endif
|
|
typedef enum {
|
|
BUSY,// device is preparing for scan
|
|
READY,// device is ready for scan
|
|
SCANNING,// device is doing scan
|
|
ERROR// some device inner error are occured
|
|
} DeviceStatus;
|
|
|
|
typedef struct StatusInfo {
|
|
DeviceStatus status;// a enum represent device current status
|
|
int progress;// percent value of operation
|
|
} StatusInfo;
|
|
|
|
|
|
//3 kinds of scan action
|
|
typedef enum {
|
|
SCAN,// Start scan action
|
|
PREVIEW_SCAN,// Start preview scan action
|
|
STOP,// Stop current scan
|
|
SCAN_CONTINUE,//Continue pending scan
|
|
} ScanAction;
|
|
|
|
//kinds of device information
|
|
typedef enum {
|
|
MEAN_TEMPERATURE,
|
|
VERSION,
|
|
DEV_OUTPATH
|
|
} DeviceInfo;
|
|
|
|
extern int InitLib(void(*)(const char *msg));
|
|
|
|
extern int ScanControl(ScanAction actionType);
|
|
|
|
extern StatusInfo GetStatus();
|
|
|
|
extern int SetScanInfo(const char *jsonString,int empty);
|
|
|
|
extern const char *GetPreviewData();
|
|
|
|
extern const char *GetDeviceInfo(DeviceInfo infoType);
|
|
|
|
#ifdef _WIN32
|
|
extern void StopDevice();
|
|
#endif
|
|
|
|
|
|
#ifdef __cplusplus
|
|
};
|
|
#endif
|
|
|
|
#endif //GUI_SHIMLIB_H
|