37 JID() : m_valid( false ) {}
43 JID(
const std::string& jid ) : m_valid( true ) { setJID( jid ); }
55 bool setJID(
const std::string& jid );
61 const std::string&
full()
const {
return m_full; }
67 const std::string&
bare()
const {
return m_bare; }
80 bool setUsername(
const std::string& username );
86 bool setServer(
const std::string& server );
92 bool setResource(
const std::string& resource );
98 const std::string&
username()
const {
return m_username; }
104 const std::string&
server()
const {
return m_server; }
110 const std::string&
serverRaw()
const {
return m_serverRaw; }
116 const std::string&
resource()
const {
return m_resource; }
122 bool operator==(
const std::string& right )
const {
return full() == right; }
128 bool operator!=(
const std::string& right )
const {
return full() != right; }
174 operator bool()
const {
return m_valid; }
181 static std::string escapeNode(
const std::string& node );
188 static std::string unescapeNode(
const std::string& node );
194 void setStrings() { setBare(); setFull(); }
207 std::string m_resource;
208 std::string m_username;
209 std::string m_server;
210 std::string m_serverRaw;