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