新增 Chrome 下载接管扩展与 C++ 本地通信组件
实现链接右键发送、手动地址输入和默认关闭的可选 GET 自动接管,支持站点与文件类型过滤。通过 Native Messaging 和当前用户命名管道在任务入库后确认接管,失败恢复浏览器下载并持久化交接状态。保存请求编号、Referer 与 User-Agent,补充本地注册入口、集成包说明及扩展/stdio/IPC/HTTP 回归测试。
This commit is contained in:
1 parent
6c810c3b4f
commit
028fec64be
41 files changed
+1081
-18
No files matched your search
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
#include <cstdint>
|
||||
#include <istream>
|
||||
#include <ostream>
|
||||
#include <map>
|
||||
#include <string>
|
||||
namespace browser_bridge {
|
||||
inline constexpr std::uint32_t kMaxMessage=64*1024;
|
||||
using Message=std::map<std::string,std::string>;
|
||||
bool Parse(const std::string&,Message&,std::string& error);
|
||||
std::string Serialize(const Message&);
|
||||
bool Validate(const Message&,std::string& error);
|
||||
std::string Get(const Message&,const std::string& key);
|
||||
bool ReadFrame(std::istream&,std::string&);
|
||||
bool WriteFrame(std::ostream&,const std::string&);
|
||||
Message Reply(const std::string& status,const std::string& message,const std::string& request_id="",const std::string& task_id="");
|
||||
}
|
||||
Reference in new issue
Block a user