File indexing completed on 2024-04-21 04:04:43

0001  /*
0002   * jabberresource.h
0003   *
0004   * Copyright (c) 2005-2006 by Michaƫl Larouche <larouche@kde.org>
0005   * Copyright (c) 2004 by Till Gerken <till@tantalo.net>
0006   *
0007   * Kopete    (c) 2001-2006 by the Kopete developers  <kopete-devel@kde.org>
0008   *
0009   * *************************************************************************
0010   * *                                                                       *
0011   * * This program is free software; you can redistribute it and/or modify  *
0012   * * it under the terms of the GNU General Public License as published by  *
0013   * * the Free Software Foundation; either either version 2
0014    of the License, or (at your option) any later version.of the License, or     *
0015   * * (at your option) any later version.                                   *
0016   * *                                                                       *
0017   * *************************************************************************
0018   */
0019 
0020 #ifndef JABBERRESOURCE_H
0021 #define JABBERRESOURCE_H
0022 
0023 /**
0024  * Container class for a contact's resource
0025  */
0026 
0027 #include <QObject>
0028 
0029 class JabberAccount;
0030 
0031 namespace XMPP
0032 {
0033 class Resource;
0034 class Jid;
0035 class Features;
0036 }
0037 
0038 class JabberResource : public QObject
0039 {
0040 Q_OBJECT
0041 
0042 public:
0043     /**
0044      * Create a new Jabber resource.
0045      */
0046     JabberResource (JabberAccount *account, const XMPP::Jid &jid, const XMPP::Resource &resource);
0047     ~JabberResource ();
0048 
0049     const XMPP::Jid &jid() const;
0050     const XMPP::Resource &resource() const;
0051 
0052     void setResource ( const XMPP::Resource &resource );
0053 
0054     /**
0055      * Return the client name for this resource.
0056      * @return the client name
0057      */
0058     const QString &clientName () const;
0059     /**
0060      * Return the client system for this resource.
0061      * @return the client system.
0062      */
0063     const QString &clientSystem () const;
0064 
0065     /**
0066      * Get the available features for this resource.
0067      */
0068     XMPP::Features features() const;
0069 
0070 signals:
0071     void updated ( JabberResource * );
0072 
0073 private slots:
0074     void slotGetTimedClientVersion ();
0075     void slotGotClientVersion ();
0076     void slotGetDiscoCapabilties ();
0077     void slotGotDiscoCapabilities ();
0078 
0079 private:
0080     class Private;
0081     Private *d;
0082 };
0083 
0084 #endif
0085 
0086 // vim: set noet ts=4 sts=4 tw=4: