|
| std::string | DCtypeString (DCType type) |
| |
| const char * | DCTypeToJson (DCType t) |
| |
| bool | DCTypeFromJson (std::string_view s, DCType &out) |
| |
| Json | makeChatGroupCreate (uint64_t tableId, uint64_t groupId, const std::string &name, const std::set< std::string > &participants) |
| |
| Json | makeChatGroupUpdate (uint64_t tableId, uint64_t groupId, const std::string &name, const std::set< std::string > &participants) |
| |
| Json | makeChatGroupDelete (uint64_t tableId, uint64_t groupId) |
| |
| Json | makeChatMessage (uint64_t tableId, uint64_t groupId, uint64_t ts, const std::string &username, const std::string &text) |
| |
| Json | makeOffer (const std::string &from, const std::string &to, const std::string &sdp, const std::string &username, const std::string &uniqueId, const std::string &broadcast=msg::value::False) |
| |
| Json | makeAnswer (const std::string &from, const std::string &to, const std::string &sdp, const std::string &username, const std::string &uniqueId, const std::string &broadcast=msg::value::False) |
| |
| Json | makeCandidate (const std::string &from, const std::string &to, const std::string &cand, const std::string &broadcast=msg::value::False) |
| |
| Json | makePresence (const std::string &event, const std::string &clientId) |
| |
| nlohmann::json | makePeerDisconnect (const std::string &targetPeerId, bool broadcast=true) |
| |
| Json | makeBroadcastShutdown () |
| |
| Json | makePing (const std::string &from) |
| |
| Json | makeAuth (const std::string &token, const std::string &username, const std::string &uniqueId) |
| |
| nlohmann::json | makeAuthResponse (const std::string ok, const std::string &msg, const std::string &clientId, const std::string &username, const std::vector< std::string > &clients={}, const std::string &gmPeerId="", const std::string &uniqueId="") |
| |
| Json | makeText (const std::string &from, const std::string &to, const std::string &text, bool broadcast=false) |
| |
| bool | isType (const Json &j, std::string t) |
| |
| std::string | getString (const Json &j, std::string k, std::string def={}) |
| |
| int | getInt (const Json &j, std::string k, int def=0) |
| |
| bool | getBool (const Json &j, std::string k, bool def=false) |
| |