rsPeers add few JSON API calls

This commit is contained in:
Gioacchino Mazzurco 2018-10-20 21:13:10 +02:00
parent cfe95a57a0
commit 7a1375ff6f
No known key found for this signature in database
GPG key ID: A1FBCA3872E87051
3 changed files with 65 additions and 6 deletions

View file

@ -18,6 +18,7 @@
#include "rsurl.h"
#include "serialiser/rstypeserializer.h"
#include <cstdio>
#include <algorithm>
@ -254,6 +255,14 @@ RsUrl& RsUrl::setFragment(const std::string& fragment)
return decoded.str();
}
void RsUrl::serial_process( RsGenericSerializer::SerializeJob j,
RsGenericSerializer::SerializeContext& ctx )
{
std::string urlString = toString();
RS_SERIAL_PROCESS(urlString);
fromString(urlString);
}
/*static*/ const std::string RsUrl::schemeSeparator("://");
/*static*/ const std::string RsUrl::ipv6WrapOpen("[");
/*static*/ const std::string RsUrl::ipv6Separator(":");