00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef JID_H__
00016 #define JID_H__
00017
00018 #include "macros.h"
00019
00020 #include <string>
00021
00022 namespace gloox
00023 {
00030 class GLOOX_EXPORT JID
00031 {
00032 public:
00033
00037 JID();
00038
00043 JID( const std::string& jid );
00044
00048 virtual ~JID();
00049
00054 void setJID( const std::string& jid );
00055
00060 std::string full() const;
00061
00066 std::string bare() const;
00067
00072 void setUsername( const std::string& username );
00073
00078 void setServer( const std::string& server );
00079
00084 void setResource( const std::string& resource );
00085
00090 std::string username() const { return m_username; };
00091
00096 std::string server() const { return m_server; };
00097
00102 std::string serverRaw() const { return m_serverRaw; };
00103
00108 std::string resource() const { return m_resource; };
00109
00114 bool empty() const { return m_server.empty(); };
00115
00120 int operator==( const JID& right );
00121
00122 private:
00123 std::string m_resource;
00124 std::string m_username;
00125 std::string m_server;
00126 std::string m_serverRaw;
00127 };
00128
00129 }
00130
00131 #endif // JID_H__