mirror of http://192.168.1.51:8099/lmh188/twain3.0
parent
9d4a3a6e8f
commit
cad96b6e21
|
@ -3,6 +3,7 @@
|
|||
################################################################################
|
||||
|
||||
/huagao/.vs/huagaotwds/v15
|
||||
/3rdparty/nick
|
||||
/huagao/debug/qmake
|
||||
/huagao/debug
|
||||
/huagao/Win32/Debug
|
||||
|
|
|
@ -79,7 +79,7 @@ SOURCES += huagaods.cpp \
|
|||
ImageProcess/ImageApplySharpen.cpp \
|
||||
ImageProcess/ImageProcess_Public.cpp \
|
||||
ImageProcess/ImageApplyConcatenation.cpp \
|
||||
G400ScanConfig.cpp \
|
||||
GscanJsonConfig.cpp \
|
||||
Sliders.cpp \
|
||||
SmartEdit.cpp \
|
||||
TabCtrlSSL.cpp \
|
||||
|
@ -134,6 +134,8 @@ HEADERS += huagaods.hpp \
|
|||
ImageProcess/ImageApplySharpen.h \
|
||||
ImageProcess/ImageProcess_Public.h \
|
||||
ImageProcess/ImageApplyConcatenation.h \
|
||||
GscanJsonConfig.h \
|
||||
MapFinder.h \
|
||||
Sliders.h \
|
||||
SmartEdit.h \
|
||||
TabCtrlSSL.h \
|
||||
|
|
|
@ -947,7 +947,8 @@ protected:
|
|||
|
||||
if (xferGroup == DataGroup::Audio) {
|
||||
setState(DsState::XferReady);
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
setState(data.count() ? DsState::XferReady : DsState::Enabled);
|
||||
}
|
||||
}
|
||||
|
@ -1018,10 +1019,7 @@ protected:
|
|||
/// Default implementation does nothing.
|
||||
/// \param origin Identity of the caller.
|
||||
/// \param data Pending xfers data.
|
||||
virtual Result pendingXfersStopFeeder(const Identity& origin, PendingXfers& data){
|
||||
Detail::unused(origin, data);
|
||||
return badProtocol();
|
||||
}
|
||||
virtual Result pendingXfersStopFeeder(const Identity& origin, PendingXfers& data) = 0;
|
||||
|
||||
/// Setup file xfer TWAIN call.
|
||||
/// \param origin Identity of the caller.
|
||||
|
@ -1067,40 +1065,28 @@ protected:
|
|||
/// Default implementation does nothing.
|
||||
/// \param origin Identity of the caller.
|
||||
/// \param data Setup file xfer data.
|
||||
virtual Result setupFileXferGet(const Identity& origin, SetupFileXfer& data){
|
||||
Detail::unused(origin, data);
|
||||
return badProtocol();
|
||||
}
|
||||
virtual Result setupFileXferGet(const Identity& origin, SetupFileXfer& data) = 0;
|
||||
|
||||
/// Get default setup file xfer TWAIN call.
|
||||
/// Always called in correct state.
|
||||
/// Default implementation does nothing.
|
||||
/// \param origin Identity of the caller.
|
||||
/// \param data Setup file xfer data.
|
||||
virtual Result setupFileXferGetDefault(const Identity& origin, SetupFileXfer& data){
|
||||
Detail::unused(origin, data);
|
||||
return badProtocol();
|
||||
}
|
||||
virtual Result setupFileXferGetDefault(const Identity& origin, SetupFileXfer& data) = 0;
|
||||
|
||||
/// Set setup file xfer TWAIN call.
|
||||
/// Always called in correct state.
|
||||
/// Default implementation does nothing.
|
||||
/// \param origin Identity of the caller.
|
||||
/// \param data Setup file xfer data.
|
||||
virtual Result setupFileXferSet(const Identity& origin, SetupFileXfer& data){
|
||||
Detail::unused(origin, data);
|
||||
return badProtocol();
|
||||
}
|
||||
virtual Result setupFileXferSet(const Identity& origin, SetupFileXfer& data) = 0;
|
||||
|
||||
/// Reset setup file xfer TWAIN call.
|
||||
/// Always called in correct state.
|
||||
/// Default implementation does nothing.
|
||||
/// \param origin Identity of the caller.
|
||||
/// \param data Setup file xfer data.
|
||||
virtual Result setupFileXferReset(const Identity& origin, SetupFileXfer& data){
|
||||
Detail::unused(origin, data);
|
||||
return badProtocol();
|
||||
}
|
||||
virtual Result setupFileXferReset(const Identity& origin, SetupFileXfer& data) = 0;
|
||||
|
||||
/// Setup memory xfer TWAIN call.
|
||||
/// \param origin Identity of the caller.
|
||||
|
@ -1464,10 +1450,7 @@ protected:
|
|||
/// Default implementation does nothing.
|
||||
/// Always called in correct state.
|
||||
/// \param origin Identity of the caller.
|
||||
virtual Result imageFileXferGet(const Identity& origin){
|
||||
Detail::unused(origin);
|
||||
return badProtocol();
|
||||
}
|
||||
virtual Result imageFileXferGet(const Identity& origin) = 0;
|
||||
|
||||
/// Image info TWAIN call.
|
||||
/// \param origin Identity of the caller.
|
||||
|
@ -1997,9 +1980,11 @@ private:
|
|||
return isCapability
|
||||
? callCapability(*origin, dg, dat, msg, data)
|
||||
: call(*origin, dg, dat, msg, data);
|
||||
} catch (const std::bad_alloc&){
|
||||
}
|
||||
catch (const std::bad_alloc&) {
|
||||
return { ReturnCode::Failure, ConditionCode::LowMemory };
|
||||
} catch (...){
|
||||
}
|
||||
catch (...) {
|
||||
// the exception would be caught in the static handler below
|
||||
// that would set static status, we want to set local one
|
||||
return bummer();
|
||||
|
@ -2173,10 +2158,12 @@ public:
|
|||
|
||||
g_lastStatus = rc.status();
|
||||
return rc.returnCode();
|
||||
} catch (const std::bad_alloc&) {
|
||||
}
|
||||
catch (const std::bad_alloc&) {
|
||||
g_lastStatus = ConditionCode::LowMemory;
|
||||
return ReturnCode::Failure;
|
||||
} catch (...){
|
||||
}
|
||||
catch (...) {
|
||||
// we can't throw exceptions out of data sources
|
||||
// the C interface can't really handle them
|
||||
// especially when there are different implementations
|
||||
|
|
Loading…
Reference in New Issue