From bcb704366cb5e333a626c18c308c7e0448a8e69f Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kopete/protocols/jabber/jabbergroupcontact.h | 107 +++++++++++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 kopete/protocols/jabber/jabbergroupcontact.h (limited to 'kopete/protocols/jabber/jabbergroupcontact.h') diff --git a/kopete/protocols/jabber/jabbergroupcontact.h b/kopete/protocols/jabber/jabbergroupcontact.h new file mode 100644 index 00000000..c157b823 --- /dev/null +++ b/kopete/protocols/jabber/jabbergroupcontact.h @@ -0,0 +1,107 @@ + /* + * jabbercontact.cpp - Kopete Jabber protocol groupchat contact + * + * Copyright (c) 2002-2004 by Till Gerken + * + * Kopete (c) by the Kopete developers + * + * ************************************************************************* + * * * + * * This program is free software; you can redistribute it and/or modify * + * * it under the terms of the GNU General Public License as published by * + * * the Free Software Foundation; either version 2 of the License, or * + * * (at your option) any later version. * + * * * + * ************************************************************************* + */ + +#ifndef JABBERGROUPCONTACT_H +#define JABBERGROUPCONTACT_H + +#include "jabberbasecontact.h" + +namespace Kopete { class MetaContact; } +class JabberGroupChatManager; + +class JabberGroupContact : public JabberBaseContact +{ + +Q_OBJECT + +public: + + JabberGroupContact (const XMPP::RosterItem &rosterItem, + JabberAccount *account, Kopete::MetaContact * mc); + + ~JabberGroupContact (); + + /** + * Create custom context menu items for the contact + * FIXME: implement manager version here? + */ + QPtrList *customContextMenuActions (); + + /** + * Deal with an incoming message for this contact. + */ + void handleIncomingMessage ( const XMPP::Message &message ); + + /** + * Add a contact to this room. + */ + JabberBaseContact *addSubContact ( const XMPP::RosterItem &rosterItem, bool addToManager = true ); + + /** + * Remove a contact from this room. + */ + void removeSubContact ( const XMPP::RosterItem &rosterItem ); + + Kopete::ChatSession *manager ( Kopete::Contact::CanCreateFlags canCreate = Kopete::Contact::CannotCreate ); + +public slots: + + /** + * This is the JabberContact level slot for sending files. + * + * @param sourceURL The actual KURL of the file you are sending + * @param fileName (Optional) An alternate name for the file - what the + * receiver will see + * @param fileSize (Optional) Size of the file being sent. Used when sending + * a nondeterminate file size (such as over a socket) + */ + virtual void sendFile( const KURL &sourceURL = KURL(), + const QString &fileName = QString::null, uint fileSize = 0L ); + +private slots: + + /** + * Catch a dying message manager and leave the room. + */ + void slotChatSessionDeleted (); + + /** + * When our own status change, we need to manually send the presence. + */ + void slotStatusChanged(); + + /** + * ask the user to change the nick, and change it + */ + void slotChangeNick(); + + /** + * a subcontact has been destroyed (may happen when closing kopete) + */ + void slotSubContactDestroyed(Kopete::Contact*); + +private: + + QPtrList mContactList; + QPtrList mMetaContactList; + + JabberGroupChatManager *mManager; + JabberBaseContact *mSelfContact; + QString mNick; +}; + +#endif -- cgit v1.2.1