#include </home/runner/work/OrcaSlicer/OrcaSlicer/src/slic3r/Utils/FileTransferUtils.hpp>
Public Types | |
| using | ResultCb = std::function<void(int res, int resp_ec, std::string json_res, std::vector<std::byte> bin_res)> |
| using | MsgCb = std::function<void(int kind, std::string json)> |
Public Member Functions | |
| FileTransferJob (FileTransferModule &m, const std::string ¶ms_json) | |
| ~FileTransferJob () | |
| FileTransferJob (const FileTransferJob &)=delete | |
| FileTransferJob & | operator= (const FileTransferJob &)=delete |
| FileTransferJob (FileTransferJob &&)=delete | |
| FileTransferJob & | operator= (FileTransferJob &&)=delete |
| void | on_result (ResultCb cb) |
| bool | get_result (int &ec, int &resp_ec, std::string &json, std::vector< std::byte > &bin, uint32_t timeout_ms) |
| void | start_on (FileTransferTunnel &t) |
| void | on_msg (MsgCb cb) |
| bool | try_get_msg (int &kind, std::string &json) |
| bool | get_msg (uint32_t timeout_ms, int &kind, std::string &json) |
| FT_JobHandle * | native () const noexcept |
| bool | check_valid () const |
| bool | finished () const |
| void | cancel () |
Private Member Functions | |
| void | reset () noexcept |
| void | solve_result (ft_job_result result) |
Private Attributes | |
| FileTransferModule * | m_ {} |
| FT_JobHandle * | h_ {} |
| ResultCb | result_cb_ {} |
| MsgCb | msg_cb_ {} |
| bool | finished_ = false |
| int | res_ = 0 |
| int | resp_ec_ = 0 |
| std::string | res_json_ |
| std::vector< std::byte > | res_bin_ |
| using Slic3r::FileTransferJob::MsgCb = std::function<void(int kind, std::string json)> |
| using Slic3r::FileTransferJob::ResultCb = std::function<void(int res, int resp_ec, std::string json_res, std::vector<std::byte> bin_res)> |
|
explicit |
References FileTransferJob(), Slic3r::ft_job_result::bin, h_, Slic3r::ft_job_result::json, and m_.
Referenced by FileTransferJob(), FileTransferJob(), FileTransferJob(), on_msg(), operator=(), and operator=().
|
inline |
|
delete |
|
delete |
|
inline |
|
inline |
|
inline |
References finished_.
| bool Slic3r::FileTransferJob::get_msg | ( | uint32_t | timeout_ms, |
| int & | kind, | ||
| std::string & | json ) |
References h_, Slic3r::ft_job_msg::json, Slic3r::ft_job_msg::kind, and m_.
| bool Slic3r::FileTransferJob::get_result | ( | int & | ec, |
| int & | resp_ec, | ||
| std::string & | json, | ||
| std::vector< std::byte > & | bin, | ||
| uint32_t | timeout_ms ) |
References Slic3r::FT_EXCEPTION, h_, m_, res_, res_bin_, res_json_, and solve_result().
|
inlinenoexcept |
| void Slic3r::FileTransferJob::on_msg | ( | MsgCb | cb | ) |
References FileTransferJob(), Slic3r::FT_EXCEPTION, h_, m_, and msg_cb_.
| void Slic3r::FileTransferJob::on_result | ( | ResultCb | cb | ) |
References result_cb_.
|
delete |
|
delete |
|
inlineprivatenoexcept |
|
private |
References Slic3r::ft_job_result::bin, Slic3r::ft_job_result::bin_size, Slic3r::ft_job_result::ec, Slic3r::ft_job_result::json, res_, res_bin_, res_json_, Slic3r::ft_job_result::resp_ec, and resp_ec_.
Referenced by get_result().
| void Slic3r::FileTransferJob::start_on | ( | FileTransferTunnel & | t | ) |
References Slic3r::FT_EXCEPTION, h_, m_, and Slic3r::FileTransferTunnel::native().
| bool Slic3r::FileTransferJob::try_get_msg | ( | int & | kind, |
| std::string & | json ) |
References h_, Slic3r::ft_job_msg::json, Slic3r::ft_job_msg::kind, and m_.
|
private |
Referenced by finished().
|
private |
Referenced by FileTransferJob(), cancel(), check_valid(), get_msg(), get_result(), native(), on_msg(), reset(), start_on(), and try_get_msg().
|
private |
Referenced by FileTransferJob(), cancel(), get_msg(), get_result(), on_msg(), reset(), start_on(), and try_get_msg().
|
private |
Referenced by get_result(), and solve_result().
|
private |
Referenced by get_result(), and solve_result().
|
private |
Referenced by get_result(), and solve_result().
|
private |
Referenced by solve_result().
|
private |
Referenced by on_result().