File indexing completed on 2024-04-21 04:04:43
0001 /* 0002 * jabbergroupmembercontact.cpp - Kopete Jabber protocol groupchat contact (member) 0003 * 0004 * Copyright (c) 2002-2004 by Till Gerken <till@tantalo.net> 0005 * 0006 * Kopete (c) by the Kopete developers <kopete-devel@kde.org> 0007 * 0008 * ************************************************************************* 0009 * * * 0010 * * This program is free software; you can redistribute it and/or modify * 0011 * * it under the terms of the GNU General Public License as published by * 0012 * * the Free Software Foundation; either either version 2 0013 of the License, or (at your option) any later version.of the License, or * 0014 * * (at your option) any later version. * 0015 * * * 0016 * ************************************************************************* 0017 */ 0018 0019 #ifndef JABBERGROUPMEMBERCONTACT_H 0020 #define JABBERGROUPMEMBERCONTACT_H 0021 0022 #include "jabberbasecontact.h" 0023 0024 namespace Kopete { class MetaContact; } 0025 class JabberChatSession; 0026 0027 class JabberGroupMemberContact : public JabberBaseContact 0028 { 0029 0030 Q_OBJECT 0031 0032 public: 0033 0034 JabberGroupMemberContact (const XMPP::RosterItem &rosterItem, 0035 JabberAccount *account, Kopete::MetaContact * mc); 0036 0037 ~JabberGroupMemberContact (); 0038 0039 /** 0040 * Create custom context menu items for the contact 0041 * FIXME: implement manager version here? 0042 */ 0043 QList<QAction *> *customContextMenuActions (); 0044 0045 /** 0046 * Return message manager for this instance. 0047 */ 0048 Kopete::ChatSession *manager ( Kopete::Contact::CanCreateFlags canCreate = Kopete::Contact::CannotCreate ); 0049 0050 /** 0051 * Deal with incoming messages. 0052 */ 0053 void handleIncomingMessage ( const XMPP::Message &message ); 0054 0055 public slots: 0056 0057 /** 0058 * This is the JabberContact level slot for sending files. 0059 * 0060 * @param sourceURL The actual KUrl of the file you are sending 0061 * @param fileName (Optional) An alternate name for the file - what the 0062 * receiver will see 0063 * @param fileSize (Optional) Size of the file being sent. Used when sending 0064 * a nondeterminate file size (such as over a socket) 0065 */ 0066 virtual void sendFile( const KUrl &sourceURL = KUrl(), 0067 const QString &fileName = QString(), uint fileSize = 0L ); 0068 0069 private slots: 0070 /** 0071 * Catch a dying message manager 0072 */ 0073 void slotChatSessionDeleted (); 0074 0075 private: 0076 JabberChatSession *mManager; 0077 0078 }; 0079 0080 #endif