2 wlmchatsession.h - Wlm Message Manager
4 Copyright (c) 2008 by Tiago Salem Herrmann <tiagosh@gmail.com>
5 Kopete (c) 2002-2005 by the Kopete developers <kopete-devel@kde.org>
7 *************************************************************************
9 * This program is free software; you can redistribute it and/or modify *
10 * it under the terms of the GNU General Public License as published by *
11 * the Free Software Foundation; either version 2 of the License, or *
12 * (at your option) any later version. *
14 *************************************************************************
17 #ifndef WLMCHATMANAGER_H
18 #define WLMCHATMANAGER_H
22 #include "kopetechatsession.h"
23 #include "wlmchatsession.h"
24 #include "wlmaccount.h"
29 class WlmChatManager
: public QObject
34 WlmChatManager (WlmAccount
* account
);
36 WlmAccount
*account ()
40 QMap
< MSN::SwitchboardServerConnection
*, WlmChatSession
* >chatSessions
;
42 QMap
< QString
, QString
> emoticonsList
;
44 // messages waiting for emoticons to be received
45 QMap
< MSN::SwitchboardServerConnection
*, QLinkedList
<Kopete::Message
*> > pendingMessages
;
47 void requestDisplayPicture (QString contactId
);
49 void createChat (MSN::SwitchboardServerConnection
* conn
);
53 void receivedMessage (MSN::SwitchboardServerConnection
* conn
,
55 const Kopete::Message
& message
);
57 void joinedConversation (MSN::SwitchboardServerConnection
* conn
,
58 const QString
& passport
,
59 const QString
& friendlyname
);
61 void leftConversation (MSN::SwitchboardServerConnection
* conn
,
62 const QString
& passport
);
64 void removeChatSession (QObject
* obj
);
66 void gotNewSwitchboard (MSN::SwitchboardServerConnection
* conn
,
69 void SwitchboardServerConnectionTerminated (
70 MSN::SwitchboardServerConnection
* conn
);
72 void messageSentACK (MSN::SwitchboardServerConnection
* conn
,
73 const unsigned int &trID
);
75 void receivedNudge (MSN::SwitchboardServerConnection
* conn
,
76 const QString
& passport
);
78 void receivedTypingNotification (MSN::SwitchboardServerConnection
* conn
,
79 const QString
& contactId
);
81 void slotGotVoiceClipNotification (MSN::SwitchboardServerConnection
* conn
,
82 const MSN::Passport
& from
,
83 const QString
& msnobject
);
85 void slotGotWinkNotification (MSN::SwitchboardServerConnection
* conn
,
86 const MSN::Passport
& from
,
87 const QString
& msnobject
);
89 void slotGotInk (MSN::SwitchboardServerConnection
* conn
,
90 const MSN::Passport
& from
,
91 const QString
& image
);
93 void slotGotVoiceClipFile(MSN::SwitchboardServerConnection
* conn
,
94 const unsigned int & sessionID
,
95 const QString
& file
);
97 void slotGotEmoticonFile(MSN::SwitchboardServerConnection
* conn
,
98 const unsigned int & sessionID
,
99 const QString
& alias
,
100 const QString
& file
);
102 void slotGotWinkFile(MSN::SwitchboardServerConnection
* conn
,
103 const unsigned int & sessionID
,
104 const QString
& file
);
106 void slotGotEmoticonNotification (MSN::SwitchboardServerConnection
* conn
,
107 const MSN::Passport
& buddy
,
108 const QString
& alias
,
109 const QString
& msnobject
);
112 WlmAccount
* m_account
;