25 m_bare = m_full = m_server = m_username = m_serverRaw = m_resource =
EmptyString;
30 const std::string::size_type at = jid.find(
'@' );
31 const std::string::size_type slash = jid.find(
'/', at == std::string::npos ? 0 : at );
33 if( at != std::string::npos && !( m_valid =
prep::nodeprep( jid.substr( 0, at ), m_username ) ) )
36 m_serverRaw = jid.substr( at == std::string::npos ? 0 : at + 1, slash - at - 1 );
40 if( slash != std::string::npos
74 if( !m_resource.empty() )
75 m_full +=
'/' + m_resource;
80 if( !m_username.empty() )
81 m_bare = m_username +
'@';
89 std::string escaped = node;
107 std::string unescaped = node;
static std::string escapeNode(const std::string &node)
bool setJID(const std::string &jid)
bool setServer(const std::string &server)
static std::string unescapeNode(const std::string &node)
const std::string & bare() const
bool setResource(const std::string &resource)
bool setUsername(const std::string &username)
bool resourceprep(const std::string &resource, std::string &out)
bool nodeprep(const std::string &node, std::string &out)
bool nameprep(const std::string &domain, std::string &out)
void replaceAll(std::string &target, const std::string &find, const std::string &replace)
The namespace for the gloox library.
const std::string EmptyString