• Skip to content
  • Skip to link menu
KDE 4.2 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kopete/libkopete

kopetechatsessionmanager.h

Go to the documentation of this file.
00001 /*
00002     kopetechatsessionmanager.h - Creates chat sessions
00003 
00004     Copyright (c) 2002-2003 by Duncan Mac-Vicar Prett <duncan@kde.org>
00005 
00006     Kopete    (c) 2002-2003 by the Kopete developers  <kopete-devel@kde.org>
00007 
00008     *************************************************************************
00009     *                                                                       *
00010     * This library is free software; you can redistribute it and/or         *
00011     * modify it under the terms of the GNU Lesser General Public            *
00012     * License as published by the Free Software Foundation; either          *
00013     * version 2 of the License, or (at your option) any later version.      *
00014     *                                                                       *
00015     *************************************************************************
00016 */
00017 
00018 #ifndef KOPETECHATSESSIONMANAGER_H
00019 #define KOPETECHATSESSIONMANAGER_H
00020 
00021 #include <QtCore/QObject>
00022 #include <QtCore/QList>
00023 
00024 #include "kopetechatsession.h"
00025 #include "kopetemessage.h"
00026 
00027 #include "kopete_export.h"
00028 
00029 class KopeteView;
00030 
00031 namespace Kopete
00032 {
00033 
00034 class Contact;
00035 class Protocol;
00036 class MessageEvent;
00037 
00038 typedef QList<Contact*>     ContactPtrList;
00039 typedef QList<Message>      MessageList;
00040 
00047 class KOPETE_EXPORT ChatSessionManager : public QObject
00048 {
00049     Q_OBJECT
00050 
00051 public:
00052     static ChatSessionManager* self();
00053 
00054     ~ChatSessionManager();
00055 
00065     Kopete::ChatSession* create( const Kopete::Contact *user,
00066         Kopete::ContactPtrList chatContacts, Kopete::Protocol *protocol, Kopete::ChatSession::Form form = Kopete::ChatSession::Small );
00067 
00075     Kopete::ChatSession* findChatSession( const Kopete::Contact *user,
00076         Kopete::ContactPtrList chatContacts, Kopete::Protocol *protocol);
00077 
00081     void registerChatSession(Kopete::ChatSession *);
00082 
00086     QList<ChatSession*> sessions();
00087 
00092     void removeSession( Kopete::ChatSession *session );
00093 
00098     KopeteView *createView( Kopete::ChatSession * , const QString &requestedPlugin = QString() );
00099 
00103     void postNewEvent(Kopete::MessageEvent*);
00104 
00108     KopeteView *activeView();
00109 
00110 signals:
00119     void aboutToDisplay( Kopete::Message& message );
00120 
00126     void aboutToSend( Kopete::Message& message );
00127 
00135     void aboutToReceive( Kopete::Message& message );
00136 
00140     void viewCreated( KopeteView * );
00141 
00145     void viewActivated( KopeteView *view );
00146 
00147     /*
00148      * A view is about to close.
00149      */
00150     void viewClosing( KopeteView *view );
00151 
00155     void chatSessionCreated( Kopete::ChatSession *);
00156 
00160     void display( Kopete::Message& message, Kopete::ChatSession * );
00161 
00165     void newEvent(Kopete::MessageEvent *);
00166 
00170     void readMessage();
00171 
00172 public slots:
00173     void slotReadMessage();
00174 
00175 private:
00176     ChatSessionManager( QObject* parent = 0 );
00177 
00178     class Private;
00179     Private *d;
00180 
00181     static ChatSessionManager *s_self;
00182 
00183 };
00184 
00185 }
00186 
00187 #endif // KOPETECHATSESSIONMANAGER_H
00188 
00189 // vim: set noet ts=4 sts=4 sw=4:

kopete/libkopete

Skip menu "kopete/libkopete"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal