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

kopete/libkopete

  • sources
  • kde-4.14
  • kdenetwork
  • kopete
  • libkopete
kopetechatsessionmanager.h
Go to the documentation of this file.
1 /*
2  kopetechatsessionmanager.h - Creates chat sessions
3 
4  Copyright (c) 2002-2003 by Duncan Mac-Vicar Prett <duncan@kde.org>
5 
6  Kopete (c) 2002-2003 by the Kopete developers <kopete-devel@kde.org>
7 
8  *************************************************************************
9  * *
10  * This library is free software; you can redistribute it and/or *
11  * modify it under the terms of the GNU Lesser General Public *
12  * License as published by the Free Software Foundation; either *
13  * version 2 of the License, or (at your option) any later version. *
14  * *
15  *************************************************************************
16 */
17 
18 #ifndef KOPETECHATSESSIONMANAGER_H
19 #define KOPETECHATSESSIONMANAGER_H
20 
21 #include <QtCore/QObject>
22 #include <QtCore/QList>
23 
24 #include "kopetechatsession.h"
25 #include "kopetemessage.h"
26 
27 #include "kopete_export.h"
28 
29 class KopeteView;
30 
31 namespace Kopete
32 {
33 
34 class Contact;
35 class Protocol;
36 class MessageEvent;
37 
38 typedef QList<Contact*> ContactPtrList;
39 typedef QList<Message> MessageList;
40 
47 class KOPETE_EXPORT ChatSessionManager : public QObject
48 {
49  Q_OBJECT
50 
51 public:
52  static ChatSessionManager* self();
53 
54  ~ChatSessionManager();
55 
65  Kopete::ChatSession* create( const Kopete::Contact *user,
66  Kopete::ContactPtrList chatContacts, Kopete::Protocol *protocol, Kopete::ChatSession::Form form = Kopete::ChatSession::Small );
67 
75  Kopete::ChatSession* findChatSession( const Kopete::Contact *user,
76  Kopete::ContactPtrList chatContacts, Kopete::Protocol *protocol);
77 
81  void registerChatSession(Kopete::ChatSession *);
82 
86  QList<ChatSession*> sessions();
87 
92  void removeSession( Kopete::ChatSession *session );
93 
98  KopeteView *createView( Kopete::ChatSession * , const QString &requestedPlugin = QString() );
99 
103  void postNewEvent(Kopete::MessageEvent*);
104 
108  KopeteView *activeView();
109 
110 signals:
119  void aboutToDisplay( Kopete::Message& message );
120 
126  void aboutToSend( Kopete::Message& message );
127 
135  void aboutToReceive( Kopete::Message& message );
136 
140  void viewCreated( KopeteView * );
141 
145  void viewActivated( KopeteView *view );
146 
147  /*
148  * A view is about to close.
149  */
150  void viewClosing( KopeteView *view );
151 
155  void chatSessionCreated( Kopete::ChatSession *);
156 
160  void display( Kopete::Message& message, Kopete::ChatSession * );
161 
165  void newEvent(Kopete::MessageEvent *);
166 
170  void readMessage();
171 
172 public slots:
173  void slotReadMessage();
174 
175 private:
176  ChatSessionManager( QObject* parent = 0 );
177 
178  class Private;
179  Private * const d;
180 
181  static ChatSessionManager *s_self;
182 
183 };
184 
185 }
186 
187 #endif // KOPETECHATSESSIONMANAGER_H
188 
189 // vim: set noet ts=4 sts=4 sw=4:
KOPETE_EXPORT
#define KOPETE_EXPORT
Definition: kopete_export.h:27
Kopete::MessageEvent
Definition: kopetemessageevent.h:41
Kopete::ContactPtrList
QList< Contact * > ContactPtrList
Definition: kopetechatsession.h:52
Kopete::Protocol
base class of every protocol.
Definition: kopeteprotocol.h:62
Kopete::ChatSessionManager
Definition: kopetechatsessionmanager.h:47
Kopete::ChatSession
Definition: kopetechatsession.h:74
QObject
kopetechatsession.h
kopete_export.h
QString
QList< Contact * >
Kopete::Contact
Definition: kopetecontact.h:58
Kopete::MessageList
QList< Message > MessageList
Definition: kopetechatsession.h:55
Kopete::ChatSession::Small
The chat is a small group or 1:1 chat.
Definition: kopetechatsession.h:85
Kopete::ChatSession::Form
Form
Describes the form of this chat session.
Definition: kopetechatsession.h:85
kopetemessage.h
KopeteView
Definition: kopeteview.h:40
Kopete::Message
Representation of a message in Kopete.
Definition: kopetemessage.h:82
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:29:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kopete/libkopete

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

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal