docs: move protocol-ns to protocol.md (#23883)
* docs: move protocol-ns to protocol.md * chore: fix up tests and implement missing pieces required for tests
This commit is contained in:
parent
edc5050a2e
commit
d3fa5ed1e8
13 changed files with 285 additions and 733 deletions
|
@ -176,11 +176,12 @@ ProtocolError Protocol::RegisterProtocol(ProtocolType type,
|
|||
return added ? ProtocolError::OK : ProtocolError::REGISTERED;
|
||||
}
|
||||
|
||||
void Protocol::UnregisterProtocol(const std::string& scheme,
|
||||
bool Protocol::UnregisterProtocol(const std::string& scheme,
|
||||
gin::Arguments* args) {
|
||||
bool removed = protocol_registry_->UnregisterProtocol(scheme);
|
||||
HandleOptionalCallback(
|
||||
args, removed ? ProtocolError::OK : ProtocolError::NOT_REGISTERED);
|
||||
return removed;
|
||||
}
|
||||
|
||||
bool Protocol::IsProtocolRegistered(const std::string& scheme) {
|
||||
|
@ -194,11 +195,12 @@ ProtocolError Protocol::InterceptProtocol(ProtocolType type,
|
|||
return added ? ProtocolError::OK : ProtocolError::INTERCEPTED;
|
||||
}
|
||||
|
||||
void Protocol::UninterceptProtocol(const std::string& scheme,
|
||||
bool Protocol::UninterceptProtocol(const std::string& scheme,
|
||||
gin::Arguments* args) {
|
||||
bool removed = protocol_registry_->UninterceptProtocol(scheme);
|
||||
HandleOptionalCallback(
|
||||
args, removed ? ProtocolError::OK : ProtocolError::NOT_INTERCEPTED);
|
||||
return removed;
|
||||
}
|
||||
|
||||
bool Protocol::IsProtocolIntercepted(const std::string& scheme) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue