Use the existing successful calibration-enter workflow to display the same SDK manufacturer's window and actual callback progress in the task UI. Bind metadata, JPEG and MJPEG to the execution, SDK session, calibration ID and trusted process/window identity; closing the monitor only stops viewing. Include source-only FreeScanCpp integration, WGC capture lifecycle fixes and immediate ENTER acknowledgement cache synchronization. Preserve original scanner project guards, regression sources and third-party licensing; exclude private runtime configuration and generated artifacts. Validated platform Java compilation/regressions, frontend type checks and standalone build, native compilation/offline and HTTP regressions, immediate calibration identity checks and ten synthetic window close/reopen cycles. Production installation/restart and real scanner calibration remain pending.
28 lines
1.0 KiB
C++
28 lines
1.0 KiB
C++
#pragma once
|
|
#include "common.hpp"
|
|
#include <optional>
|
|
|
|
namespace freescan {
|
|
// A read-only, session-bound capture of one verified manufacturer window. The
|
|
// caller supplies the identity retained after SDK initialization; HTTP clients
|
|
// must never be allowed to supply it. No SDK or input-control calls occur here.
|
|
class CalibrationWindowCapture {
|
|
public:
|
|
CalibrationWindowCapture();
|
|
~CalibrationWindowCapture();
|
|
CalibrationWindowCapture(const CalibrationWindowCapture &) = delete;
|
|
CalibrationWindowCapture &operator=(const CalibrationWindowCapture &) = delete;
|
|
bool start(const std::string &sessionId, const Json &trustedProcessIdentity, std::string *error = nullptr);
|
|
void stop();
|
|
Json metadata() const;
|
|
std::optional<FrameSnapshot> latestFrame() const;
|
|
// Metadata and frame are copied under the same lock. frame is null whenever
|
|
// the source has ended, changed, minimized, timed out, or become stale.
|
|
Json snapshot() const;
|
|
|
|
private:
|
|
struct Impl;
|
|
std::unique_ptr<Impl> impl_;
|
|
};
|
|
} // namespace freescan
|