comparison jid.h @ 4:220e5619bf87

Profiles selection now fill contact list + new Jid class
author Goffi <goffi@goffi.org>
date Thu, 11 Aug 2011 00:02:25 +0200
parents
children 48045176d1c6
comparison
equal deleted inserted replaced
3:2195295a2058 4:220e5619bf87
1
2 /*
3 Bellaciao: a Salut à Toi frontend
4 Copyright (C) 2011 Jérôme Poisson (goffi@goffi.org)
5
6 This program is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Affero General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
10
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Affero General Public License for more details.
15
16 You should have received a copy of the GNU Affero General Public License
17 along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19
20 #ifndef JID_H
21 #define JID_H
22
23 #include <QString>
24
25 class Jid {
26 public:
27 Jid();
28 ~Jid();
29 Jid(const QString& str);
30 void fromString(const QString& str);
31 QString getString() const;
32 QString getBareString() const;
33 QString getFullString() const;
34 const QString& getUser() const;
35 const QString& getDomain() const;
36 const QString& getResource() const;
37 void setUser(const QString& user);
38 void setDomain(const QString& domain);
39 void setResource(const QString& resource);
40 bool isValid();
41
42 private:
43 bool m_valid;
44 QString m_user, m_domain, m_resource;
45 };
46
47 #endif
48