2022-05-24 02:01:36 +00:00
|
|
|
|
#pragma once
|
2022-05-23 10:29:23 +00:00
|
|
|
|
|
|
|
|
|
#include "base/HGDef.h"
|
|
|
|
|
#include "base/HGInc.h"
|
|
|
|
|
#include "base/HGLock.h"
|
|
|
|
|
#include "base/HGImage.h"
|
|
|
|
|
#include "base/HGMsgPump.h"
|
2022-06-01 10:36:22 +00:00
|
|
|
|
#include "base/HGEvent.h"
|
2022-05-23 10:29:23 +00:00
|
|
|
|
#include "sane/sane_ex.h"
|
|
|
|
|
#include "sane/sane_option_definitions.h"
|
|
|
|
|
#include "Manager.h"
|
|
|
|
|
#include "Msg.h"
|
2022-06-07 10:22:27 +00:00
|
|
|
|
#include "sqlite3.h"
|
2022-05-23 10:29:23 +00:00
|
|
|
|
#include <string>
|
2022-06-21 10:37:41 +00:00
|
|
|
|
#include <list>
|
2022-05-23 11:01:52 +00:00
|
|
|
|
#include <vector>
|
2022-05-23 10:29:23 +00:00
|
|
|
|
|
|
|
|
|
namespace ver_2
|
|
|
|
|
{
|
2022-05-30 11:01:23 +00:00
|
|
|
|
enum
|
|
|
|
|
{
|
|
|
|
|
SANEEVENT_ARRIVE = 1L,
|
|
|
|
|
SANEEVENT_REMOVE,
|
|
|
|
|
SANEEVENT_STATUS,
|
|
|
|
|
SANEEVENT_WORKING,
|
|
|
|
|
SANEEVENT_FINISH,
|
|
|
|
|
SANEEVENT_ERROR
|
|
|
|
|
};
|
|
|
|
|
|
2022-05-23 10:29:23 +00:00
|
|
|
|
struct GlobalConfig
|
|
|
|
|
{
|
2022-06-06 10:51:34 +00:00
|
|
|
|
enum
|
|
|
|
|
{
|
|
|
|
|
fileSavePathMask = 0x00000001,
|
|
|
|
|
fileNamePrefixMask = 0x00000002,
|
|
|
|
|
fileNameModeMask = 0x00000004,
|
|
|
|
|
imageFormatMask = 0x00000008,
|
|
|
|
|
imageJpegQualityMask = 0x00000010,
|
|
|
|
|
imageTiffCompressionMask = 0x00000020,
|
2022-06-13 11:56:43 +00:00
|
|
|
|
imageTiffJpegQualityMask = 0x00000040
|
2022-06-06 10:51:34 +00:00
|
|
|
|
};
|
|
|
|
|
|
2022-05-30 11:01:23 +00:00
|
|
|
|
GlobalConfig()
|
|
|
|
|
{
|
|
|
|
|
imageJpegQuality = 0;
|
|
|
|
|
imageTiffJpegQuality = 0;
|
|
|
|
|
}
|
|
|
|
|
|
2022-05-24 02:01:36 +00:00
|
|
|
|
// 文件保存
|
2022-05-23 10:29:23 +00:00
|
|
|
|
std::string fileSavePath;
|
|
|
|
|
std::string fileNamePrefix;
|
|
|
|
|
std::string fileNameMode;
|
2022-05-24 02:01:36 +00:00
|
|
|
|
// 图像保存
|
2022-05-23 10:29:23 +00:00
|
|
|
|
std::string imageFormat;
|
|
|
|
|
int imageJpegQuality;
|
|
|
|
|
std::string imageTiffCompression;
|
|
|
|
|
int imageTiffJpegQuality;
|
|
|
|
|
};
|
|
|
|
|
|
2022-05-30 11:01:23 +00:00
|
|
|
|
struct DeviceParam
|
|
|
|
|
{
|
|
|
|
|
DeviceParam()
|
|
|
|
|
{
|
2022-06-15 11:07:55 +00:00
|
|
|
|
valueType = 0;
|
|
|
|
|
intValue = 0;
|
|
|
|
|
doubleValue = 0;
|
|
|
|
|
boolValue = false;
|
2022-05-30 11:01:23 +00:00
|
|
|
|
|
2022-06-15 11:07:55 +00:00
|
|
|
|
rangeType = 0;
|
|
|
|
|
intValueMin = 0;
|
|
|
|
|
intValueMax = 0;
|
|
|
|
|
doubleValueMin = 0;
|
|
|
|
|
doubleValueMax = 0;
|
2022-05-30 11:01:23 +00:00
|
|
|
|
}
|
|
|
|
|
|
2022-06-15 11:07:55 +00:00
|
|
|
|
// 配置名
|
|
|
|
|
std::string title;
|
|
|
|
|
|
|
|
|
|
int valueType; // 0-无,1-字符串,2-整型,3-浮点,4-布尔
|
|
|
|
|
std::string stringValue;
|
|
|
|
|
int intValue;
|
|
|
|
|
double doubleValue;
|
|
|
|
|
bool boolValue;
|
|
|
|
|
|
|
|
|
|
int rangeType; // 0-无,1-字符串列表,2-整型列表,3-浮点数列表,4-整型范围,5-浮点数范围
|
|
|
|
|
std::vector<std::string> stringValueList;
|
|
|
|
|
std::vector<int> intValueList;
|
|
|
|
|
std::vector<double> doubleValueList;
|
|
|
|
|
int intValueMin;
|
|
|
|
|
int intValueMax;
|
|
|
|
|
double doubleValueMin;
|
|
|
|
|
double doubleValueMax;
|
2022-05-30 11:01:23 +00:00
|
|
|
|
};
|
|
|
|
|
|
2022-06-16 06:20:52 +00:00
|
|
|
|
struct DeviceParamsGroup
|
|
|
|
|
{
|
|
|
|
|
std::string groupName;
|
|
|
|
|
std::vector<DeviceParam> devParams;
|
|
|
|
|
};
|
|
|
|
|
|
2022-06-11 06:18:33 +00:00
|
|
|
|
struct BatchTableInfo
|
|
|
|
|
{
|
|
|
|
|
int id;
|
|
|
|
|
std::string format;
|
|
|
|
|
};
|
|
|
|
|
|
2022-06-09 09:30:04 +00:00
|
|
|
|
struct ImageThumbInfo
|
|
|
|
|
{
|
|
|
|
|
std::string tag;
|
|
|
|
|
std::string thumbBase64;
|
|
|
|
|
};
|
|
|
|
|
|
2022-05-30 11:01:23 +00:00
|
|
|
|
typedef void (*SaneEvent)(int code, const char *str, bool err, void* param);
|
|
|
|
|
typedef void (*SaneImageCallback)(const char* path, void* param);
|
|
|
|
|
|
2022-05-23 10:29:23 +00:00
|
|
|
|
class ManagerV2 : public Manager
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
ManagerV2(HGMsgPump msgPump);
|
|
|
|
|
virtual ~ManagerV2();
|
|
|
|
|
|
2022-06-01 10:36:22 +00:00
|
|
|
|
// 关闭设备
|
|
|
|
|
void CloseDev(const CloseDevParam* param);
|
2022-06-06 11:34:54 +00:00
|
|
|
|
// 扫描完成
|
|
|
|
|
void ScanFinish(const ScanFinishParam* param);
|
2022-06-21 10:37:41 +00:00
|
|
|
|
// 添加文件
|
|
|
|
|
void AddSavedFile(const AddSavedFileParam* param);
|
|
|
|
|
// 删除文件
|
|
|
|
|
void RemoveSavedFile(const RemoveSavedFileParam* param);
|
2022-06-01 10:36:22 +00:00
|
|
|
|
|
2022-05-30 11:01:23 +00:00
|
|
|
|
// 设置回调
|
|
|
|
|
void SetSaneEvent(SaneEvent event, void* param);
|
|
|
|
|
void SetSaneImageCallback(SaneImageCallback func, void* param);
|
|
|
|
|
// 清理回调
|
|
|
|
|
void ResetSaneEvent();
|
|
|
|
|
void ResetSaneImageCallback();
|
2022-05-23 10:29:23 +00:00
|
|
|
|
|
2022-05-24 02:01:36 +00:00
|
|
|
|
// 设置全局配置
|
2022-06-06 10:51:34 +00:00
|
|
|
|
int SetGlobalConfig(const GlobalConfig& cfg, HGUInt mask, std::string &errInfo);
|
2022-05-24 02:01:36 +00:00
|
|
|
|
// 获取全局配置
|
2022-06-06 10:51:34 +00:00
|
|
|
|
int GetGlobalConfig(GlobalConfig& cfg, std::string& errInfo);
|
2022-05-24 02:01:36 +00:00
|
|
|
|
// 加载本地图像
|
2022-06-06 10:51:34 +00:00
|
|
|
|
int LoadLocalImage(const std::string& imagePath, std::string& imgBase64, std::string& errInfo);
|
2022-05-24 02:01:36 +00:00
|
|
|
|
// 保存本地图像
|
2022-06-22 07:41:59 +00:00
|
|
|
|
int SaveLocalImage(const std::string& imgBase64, bool temp, std::string& imagePath, std::string& errInfo);
|
2022-05-24 02:01:36 +00:00
|
|
|
|
// 删除本地文件
|
2022-06-06 10:51:34 +00:00
|
|
|
|
int DeleteLocalFile(const std::string& filePath, std::string& errInfo);
|
2022-05-24 02:01:36 +00:00
|
|
|
|
// 清理全局文件保存目录
|
2022-06-06 10:51:34 +00:00
|
|
|
|
int ClearGlobalFileSavePath(std::string& errInfo);
|
2022-06-21 10:37:41 +00:00
|
|
|
|
// 上传文件
|
|
|
|
|
int UploadLocalFile(const std::string& filePath, const std::string& remoteFilePath, const std::string& uploadMode,
|
|
|
|
|
const std::string& httpHost, int httpPort, const std::string& httpPath, const std::string& ftpUser, const std::string& ftpPassword,
|
|
|
|
|
const std::string& ftpHost, int ftpPort, std::string& errInfo);
|
|
|
|
|
|
2022-05-24 02:01:36 +00:00
|
|
|
|
// 合成本地图像
|
2022-05-23 11:01:52 +00:00
|
|
|
|
int MergeLocalImage(const std::vector<std::string>& imagePathList, const std::string& mode,
|
2022-06-22 07:41:59 +00:00
|
|
|
|
const std::string& align, int interval, bool temp, std::string& outImagePath, std::string& errInfo);
|
2022-05-24 02:01:36 +00:00
|
|
|
|
// 本地合成多张图像
|
2022-05-23 11:01:52 +00:00
|
|
|
|
int LocalMakeMultiImage(const std::vector<std::string>& imagePathList, const std::string& format,
|
2022-06-22 07:41:59 +00:00
|
|
|
|
const std::string& tiffCompression, int tiffJpegQuality, bool temp, std::string& outImagePath, std::string& errInfo);
|
2022-05-24 02:01:36 +00:00
|
|
|
|
// 拆分本地图像
|
2022-06-22 07:41:59 +00:00
|
|
|
|
int SplitLocalImage(const std::string& imagePath, const std::string& mode, int location, bool temp,
|
2022-06-06 10:51:34 +00:00
|
|
|
|
std::vector<std::string>& outImagePathList, std::string& errInfo);
|
2022-05-24 02:01:36 +00:00
|
|
|
|
// 本地生成压缩文件
|
2022-06-11 09:54:04 +00:00
|
|
|
|
int LocalMakeZipFile(const std::vector<std::string>& filePathList, const std::vector<std::string>& nameList,
|
2022-06-22 07:41:59 +00:00
|
|
|
|
bool temp, std::string& outZipPath, std::string& errInfo);
|
2022-05-24 02:01:36 +00:00
|
|
|
|
// 本地图像纠偏
|
2022-06-23 03:35:17 +00:00
|
|
|
|
int LocalImageDeskew(const std::string& imagePath, bool autoCrop, bool deskew, bool fillBlank, int width, int height,
|
|
|
|
|
bool temp, std::string& outImagePath, std::string& errInfo);
|
2022-06-13 11:56:43 +00:00
|
|
|
|
// 本地图像添加水印
|
|
|
|
|
int LocalImageAddWatermark(const std::string& imagePath, const std::string& text, const std::string& textColor, int textOpacity, const std::string& textPos,
|
|
|
|
|
int marginLeft, int marginTop, int marginRight, int marginBottom, int locationX, int locationY, const std::string& fontName,
|
2022-06-22 07:41:59 +00:00
|
|
|
|
int fontSize, bool fontBold, bool fontUnderline, bool fontItalic, bool fontStrikeout, bool temp, std::string& outImagePath, std::string& errInfo);
|
2022-06-21 05:42:22 +00:00
|
|
|
|
// 去污
|
|
|
|
|
int LocalImageDecontamination(const std::string& imagePath, const std::string mode, const std::string& color,
|
2022-06-22 07:41:59 +00:00
|
|
|
|
int x, int y, int width, int height, bool temp, std::string& outImagePath, std::string& errInfo);
|
2022-06-23 03:35:17 +00:00
|
|
|
|
// 图像方向校正
|
|
|
|
|
int LocalImageDirectionCorrect(const std::string& imagePath, bool temp, std::string& outImagePath, std::string& errInfo);
|
2022-05-23 10:29:23 +00:00
|
|
|
|
|
2022-05-30 11:01:23 +00:00
|
|
|
|
// 设备初始化
|
2022-06-06 10:51:34 +00:00
|
|
|
|
int InitDevice(std::string& errInfo);
|
2022-05-30 11:01:23 +00:00
|
|
|
|
// 设备反初始化
|
2022-06-06 10:51:34 +00:00
|
|
|
|
int DeinitDevice(std::string& errInfo);
|
2022-06-07 03:18:55 +00:00
|
|
|
|
// 是否已经初始化
|
|
|
|
|
bool IsDeviceInit();
|
2022-05-30 11:01:23 +00:00
|
|
|
|
// 获取设备列表
|
2022-06-06 10:51:34 +00:00
|
|
|
|
int GetDeviceNameList(std::vector<std::string> &deviceNameList, std::string& errInfo);
|
2022-05-30 11:01:23 +00:00
|
|
|
|
// 打开设备
|
2022-06-06 10:51:34 +00:00
|
|
|
|
int OpenDevice(const std::string& deviceName, std::string& errInfo);
|
2022-05-30 11:01:23 +00:00
|
|
|
|
// 关闭设备
|
2022-06-06 10:51:34 +00:00
|
|
|
|
int CloseDevice(std::string& errInfo);
|
2022-05-30 11:01:23 +00:00
|
|
|
|
// 设置设备参数
|
2022-06-15 11:07:55 +00:00
|
|
|
|
int SetDeviceParam(const std::vector<DeviceParam>& devParams, std::string& errInfo);
|
2022-05-30 11:01:23 +00:00
|
|
|
|
// 获取设备参数
|
2022-06-16 06:20:52 +00:00
|
|
|
|
int GetDeviceParam(std::vector<DeviceParamsGroup>& devParams, std::string& errInfo);
|
|
|
|
|
// 重置设备参数
|
|
|
|
|
int ResetDeviceParam(std::string& errInfo);
|
2022-05-30 11:01:23 +00:00
|
|
|
|
// 获取当前设备名
|
2022-06-06 10:51:34 +00:00
|
|
|
|
int GetCurrDeviceName(std::string& deviceName, std::string& errInfo);
|
2022-05-30 11:01:23 +00:00
|
|
|
|
// 开始扫描
|
2022-06-22 07:41:59 +00:00
|
|
|
|
int StartScan(bool temp, std::string& errInfo);
|
2022-05-30 11:01:23 +00:00
|
|
|
|
// 停止扫描
|
2022-06-06 10:51:34 +00:00
|
|
|
|
int StopScan(std::string& errInfo);
|
2022-06-07 03:18:55 +00:00
|
|
|
|
// 是否已经启动扫描
|
|
|
|
|
bool IsScanning();
|
|
|
|
|
|
|
|
|
|
// 获取批次号列表
|
|
|
|
|
int GetBatchIdList(std::vector<std::string> &batchIdList, std::string& errInfo);
|
|
|
|
|
// 打开批次
|
|
|
|
|
int OpenBatch(const std::string &batchId, std::string& errInfo);
|
|
|
|
|
// 删除批次
|
|
|
|
|
int DeleteBatch(const std::string& batchId, std::string& errInfo);
|
|
|
|
|
// 新建批次
|
2022-06-07 10:22:27 +00:00
|
|
|
|
int NewBatch(const std::string& batchId, std::string& errInfo);
|
2022-06-07 03:18:55 +00:00
|
|
|
|
// 获取当前批次号
|
|
|
|
|
int GetCurrBatchId(std::string& batchId, std::string& errInfo);
|
|
|
|
|
// 修改批次号
|
|
|
|
|
int ModifyBatchId(const std::string& batchId, const std::string& newBatchId, std::string& errInfo);
|
2022-06-11 06:18:33 +00:00
|
|
|
|
// 绑定文件夹
|
2022-06-13 04:02:51 +00:00
|
|
|
|
int BindFolder(const std::string &folder, const std::string &nameMode, int nameWidth, int nameBase, std::string& errInfo);
|
2022-06-11 06:18:33 +00:00
|
|
|
|
// 停止绑定文件夹
|
|
|
|
|
int StopBindFolder(std::string& errInfo);
|
2022-06-09 09:30:04 +00:00
|
|
|
|
// 加载图像缩略图列表
|
|
|
|
|
int GetImageThumbnailList(std::vector<ImageThumbInfo>& imageThumbList, std::string& errInfo);
|
2022-06-07 03:18:55 +00:00
|
|
|
|
// 获取图像数量
|
|
|
|
|
int GetImageCount(int& imageCount, std::string& errInfo);
|
|
|
|
|
// 加载图像
|
|
|
|
|
int LoadImage(int imageIndex, std::string& imageTag, std::string& imageBase64, std::string& errInfo);
|
|
|
|
|
// 保存图像
|
2022-06-22 07:41:59 +00:00
|
|
|
|
int SaveImage(int imageIndex, bool temp, std::string& imagePath, std::string& errInfo);
|
2022-06-07 03:18:55 +00:00
|
|
|
|
// 插入本地图像
|
|
|
|
|
int InsertLocalImage(const std::string& imagePath, int insertPos, const std::string& imageTag, std::string& errInfo);
|
|
|
|
|
// 插入图像
|
|
|
|
|
int InsertImage(const std::string& imageBase64, int insertPos, const std::string& imageTag, std::string& errInfo);
|
|
|
|
|
// 修改图像标签
|
|
|
|
|
int ModifyImageTag(const std::vector<int>& imageIndexList, const std::vector<std::string>& imageTagList, std::string& errInfo);
|
|
|
|
|
// 删除图像
|
|
|
|
|
int DeleteImage(const std::vector<int>& imageIndexList, std::string& errInfo);
|
|
|
|
|
// 清理图像列表
|
|
|
|
|
int ClearImageList(std::string& errInfo);
|
|
|
|
|
// 修改图像
|
|
|
|
|
int ModifyImage(int imageIndex, const std::string& imageBase64, std::string& errInfo);
|
|
|
|
|
// 使用本地图像修改图像
|
|
|
|
|
int ModifyImageByLocal(int imageIndex, const std::string& imagePath, std::string& errInfo);
|
|
|
|
|
// 移动图像
|
|
|
|
|
int MoveImage(const std::vector<int>& imageIndexList, const std::string& mode, int target, std::string& errInfo);
|
2022-06-11 06:18:33 +00:00
|
|
|
|
// 图像交换位置
|
|
|
|
|
int ExchangeImage(int imageIndex1, int imageIndex2, std::string& errInfo);
|
2022-06-07 03:18:55 +00:00
|
|
|
|
// 图像书籍排序
|
|
|
|
|
int ImageBookSort(std::string& errInfo);
|
2022-05-30 11:01:23 +00:00
|
|
|
|
|
2022-06-11 09:54:04 +00:00
|
|
|
|
public:
|
|
|
|
|
static int LoadBase64(const std::string& fileName, std::string& base64);
|
|
|
|
|
static int SaveBase64(const std::string& base64, const std::string& fileName);
|
|
|
|
|
|
2022-05-23 10:29:23 +00:00
|
|
|
|
private:
|
2022-05-23 11:01:52 +00:00
|
|
|
|
static std::string GetCfgStringValue(const std::string& app, const std::string& key, const std::string& def);
|
|
|
|
|
static int GetCfgIntValue(const std::string& app, const std::string& key, int def);
|
2022-06-06 10:51:34 +00:00
|
|
|
|
static double GetCfgDoubleValue(const std::string& app, const std::string& key, double def);
|
2022-05-23 11:01:52 +00:00
|
|
|
|
static bool GetCfgBoolValue(const std::string& app, const std::string& key, bool def);
|
|
|
|
|
static bool SetCfgStringValue(const std::string& app, const std::string& key, const std::string& val);
|
|
|
|
|
static bool SetCfgIntValue(const std::string& app, const std::string& key, int val);
|
2022-06-06 10:51:34 +00:00
|
|
|
|
static bool SetCfgDoubleValue(const std::string& app, const std::string& key, double val);
|
2022-05-23 11:01:52 +00:00
|
|
|
|
static bool SetCfgBoolValue(const std::string& app, const std::string& key, bool val);
|
2022-06-06 10:51:34 +00:00
|
|
|
|
|
2022-06-01 10:36:22 +00:00
|
|
|
|
static int HttpUpload(const std::string &host, int port, const std::string &path,
|
|
|
|
|
const std::string& filePath, const std::string& remoteFilePath);
|
|
|
|
|
static int FtpUpload(const std::string& user, const std::string& password, const std::string& host, int port,
|
|
|
|
|
const std::string& filePath, const std::string& remoteFilePath);
|
2022-06-22 07:41:59 +00:00
|
|
|
|
std::string GetFilePath(bool temp, const std::string& suffix);
|
|
|
|
|
int SaveImage(HGImage image, bool temp, std::string &imagePath);
|
2022-06-21 10:37:41 +00:00
|
|
|
|
void LoadSaveFilePathList(std::list<std::string> &savePathList);
|
|
|
|
|
void RestoreSaveFilePathList(const std::list<std::string>& savePathList);
|
2022-06-16 07:56:29 +00:00
|
|
|
|
void LoadDeviceParams(const std::string &devName, std::vector<DeviceParam>& devParams);
|
|
|
|
|
void RestoreDeviceParams(const std::string& devName, const std::vector<DeviceParamsGroup>& devParams);
|
2022-06-15 11:07:55 +00:00
|
|
|
|
static int SetParamsToDevice(SANE_Handle hdev, const std::vector<DeviceParam>& devParams);
|
2022-06-16 06:20:52 +00:00
|
|
|
|
static int GetParamsFromDevice(SANE_Handle hdev, std::vector<DeviceParamsGroup>& devParams);
|
|
|
|
|
static int ResetParamsToDevice(SANE_Handle hdev);
|
2022-06-09 09:30:04 +00:00
|
|
|
|
|
|
|
|
|
static HGByte* LoadImageFromPath(const std::string& imagePath, HGUInt& size, std::string& format);
|
|
|
|
|
static HGByte* LoadImageFromBase64(const std::string& imageBase64, HGUInt& size, std::string& format);
|
|
|
|
|
static HGByte* LoadThumbFromPath(const std::string& imagePath, HGUInt& size);
|
|
|
|
|
static HGByte* LoadThumbFromBase64(const std::string& imageBase64, HGUInt& size);
|
|
|
|
|
static bool SaveToBase64(const HGByte* data, HGUInt size, std::string& base64);
|
|
|
|
|
static bool SaveToFile(const HGByte* data, HGUInt size, const std::string &filePath);
|
2022-06-22 12:38:39 +00:00
|
|
|
|
int GetId(int idx);
|
2022-06-11 06:18:33 +00:00
|
|
|
|
void GetBatchTableInfo(std::vector<BatchTableInfo>& tables);
|
2022-06-13 04:02:51 +00:00
|
|
|
|
void ClearBindFolder();
|
2022-06-11 06:18:33 +00:00
|
|
|
|
void UpdateBindFolder();
|
2022-06-11 09:54:04 +00:00
|
|
|
|
void InsertBindFolderImage(const std::vector<BatchTableInfo>& tables, int insertPos, const std::string imgFmt,
|
|
|
|
|
const HGByte *imgData, HGUInt imgSize);
|
|
|
|
|
void ModifyBindFolderImage(const std::vector<BatchTableInfo>& tables, int imageIndex, const std::string imgFmt,
|
|
|
|
|
const HGByte* imgData, HGUInt imgSize);
|
|
|
|
|
void DeleteBindFolderImage(const std::vector<BatchTableInfo>& tables, const std::vector<int>& imageIndexList);
|
|
|
|
|
void ExchangeBindFolderImage(const std::vector<BatchTableInfo>& tables, int imageIndex1, int imageIndex2);
|
2022-06-13 04:02:51 +00:00
|
|
|
|
void ClearBindFolderImageList(const std::vector<BatchTableInfo>& tables);
|
2022-06-08 10:54:34 +00:00
|
|
|
|
|
2022-05-30 11:01:23 +00:00
|
|
|
|
static int sane_ex_callback(SANE_Handle hdev, int code, void* data, unsigned int* len, void* param);
|
2022-05-23 10:29:23 +00:00
|
|
|
|
|
|
|
|
|
private:
|
2022-05-30 11:01:23 +00:00
|
|
|
|
HGLock m_lock;
|
|
|
|
|
GlobalConfig m_globalCfg;
|
|
|
|
|
SaneEvent m_saneEvent;
|
|
|
|
|
void* m_saneParam;
|
|
|
|
|
SaneImageCallback m_saneImageCallback;
|
|
|
|
|
void* m_saneImageParam;
|
|
|
|
|
|
|
|
|
|
bool m_initDevice;
|
|
|
|
|
std::vector<std::string> m_devNameList;
|
|
|
|
|
bool m_openDevice;
|
|
|
|
|
SANE_Handle m_devHandle;
|
|
|
|
|
std::string m_devName;
|
2022-06-16 06:20:52 +00:00
|
|
|
|
std::vector<DeviceParamsGroup> m_devParams;
|
2022-06-22 07:41:59 +00:00
|
|
|
|
bool m_scanTemp;
|
2022-05-30 11:01:23 +00:00
|
|
|
|
bool m_scanning;
|
2022-06-01 10:36:22 +00:00
|
|
|
|
HGEvent m_scanEvent;
|
2022-06-07 10:22:27 +00:00
|
|
|
|
|
|
|
|
|
sqlite3* m_sqlite;
|
|
|
|
|
std::string m_currBatchId;
|
2022-06-11 06:18:33 +00:00
|
|
|
|
std::string m_bindFolder;
|
|
|
|
|
std::string m_bindNameMode;
|
2022-06-13 04:02:51 +00:00
|
|
|
|
int m_bindNameWidth;
|
|
|
|
|
int m_bindNameBase;
|
2022-06-21 10:37:41 +00:00
|
|
|
|
std::list<std::string> m_saveFilePathList;
|
2022-05-23 10:29:23 +00:00
|
|
|
|
};
|
|
|
|
|
}
|