3 * Copyright (C) 2003 Justin Karneges
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26 #ifdef IRIS_XMPP_JID_DEPRECATED
27 #define IRIS_XMPP_JID_DECL_DEPRECATED Q_DECL_DEPRECATED
29 #define IRIS_XMPP_JID_DECL_DEPRECATED
40 Jid(const QString
&s
);
41 Jid(const QString
&node
, const QString
& domain
, const QString
& resource
= "");
43 Jid
& operator=(const QString
&s
);
44 Jid
& operator=(const char *s
);
46 bool isNull() const { return null
; }
47 const QString
& domain() const { return d
; }
48 const QString
& node() const { return n
; }
49 const QString
& resource() const { return r
; }
50 const QString
& bare() const { return b
; }
51 const QString
& full() const { return f
; }
53 Jid
withNode(const QString
&s
) const;
54 Jid
withDomain(const QString
&s
) const;
55 Jid
withResource(const QString
&s
) const;
59 bool compare(const Jid
&a
, bool compareRes
=true) const;
60 inline bool operator==(const Jid
&other
) const { return compare(other
, true); }
61 inline bool operator!=(const Jid
&other
) const { return !(*this == other
); }
64 void set(const QString
&s
);
65 void set(const QString
&domain
, const QString
&node
, const QString
&resource
="");
67 void setDomain(const QString
&s
);
68 void setNode(const QString
&s
);
69 void setResource(const QString
&s
);
75 QString f
, b
, d
, n
, r
;