WebpagePrinterTool 2.0
Print a web page skip the browser's print preview
载入中...
搜索中...
未找到
MsgStation.h
浏览该文件的文档.
1#pragma once
8#include "HttpServer.h"
9#include "WebsocketClient.h"
10#include "WebsocketServer.h"
11#include <cstddef>
12#include <functional>
13#include <memory>
14#include <string_view>
15constexpr size_t hash(std::string_view input) noexcept {
16 size_t h = 0;
17 for (size_t i = 0; i < input.size(); ++i) {
18 h = 31 * h + static_cast<std::size_t>(input[i]);
19 }
20 return h;
21}
23 public:
24 explicit MsgStation();
25
26 private:
27 void initMsgHandler();
28
29 private:
30 std::unique_ptr<HttpServer> http_server{nullptr};
31 std::unique_ptr<WebsocketServer> websocket_server{nullptr};
32 std::unique_ptr<WebsocketClient> websocket_client{nullptr};
33 std::function<void(const QString& msg, const QString& ip, const QString& from,
34 std::move_only_function<void(QJsonObject)>)>
37};
constexpr size_t hash(std::string_view input) noexcept
定义 MsgStation.h:15
std::function< void(const QString &msg, const QString &ip, const QString &from, std::move_only_function< void(QJsonObject)>)> message_handler
定义 MsgStation.h:35
MsgStation()
定义 MsgStation.cpp:12
std::unique_ptr< WebsocketClient > websocket_client
定义 MsgStation.h:32
std::unique_ptr< WebsocketServer > websocket_server
定义 MsgStation.h:31
void initMsgHandler()
定义 MsgStation.cpp:23
std::unique_ptr< HttpServer > http_server
定义 MsgStation.h:30
PrinterWorkFlow< GetConfig< PageRender< RenderPng< ToPrinter< LastProcess > > > > > printer_work_flow
定义 MsgStation.h:36
定义 WorkFlow.h:10