5
* Created by Meredydd Luff.
6
* Refactored by Tiago Salem Herrmann
7
* Copyright (c) 2004 Meredydd Luff. All rights reserved.
8
* Copyright (c) 2007 Tiago Salem Herrmann. All rights reserved.
10
* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
* You should have received a copy of the GNU General Public License
21
* along with this program; see the file COPYING. If not, write to
22
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
23
* Boston, MA 02110-1301, USA.
26
#include "wlmlibmsn.h"
27
#include "wlmserver.h"
28
#include "wlmaccount.h"
30
#include "kopetemessage.h"
31
#include "kopetecontact.h"
32
#include "kopeteuiglobal.h"
34
// include first to not get compile errors on windows
38
#include <sys/types.h>
44
#include <sys/socket.h>
45
#include <arpa/inet.h>
46
#include <netinet/in.h>
53
#include <kmime/kmime_util.h>
56
#include <QApplication>
57
#include <QPushButton>
63
QString passport(const MSN::Passport& pass)
65
return QString::fromLatin1(pass.c_str());
68
QString latin1(const std::string& s)
70
return QString::fromLatin1(s.c_str());
73
QString utf8(const std::string& s)
75
return QString::fromUtf8(s.c_str());
80
Callbacks::registerSocket (void *s, int reading, int writing, bool isSSL)
85
WlmSocket *a = (WlmSocket*)s;
91
QObject::disconnect(a, SIGNAL (readyRead()),0,0);
92
QObject::connect (a, SIGNAL (readyRead()), a,
93
SLOT (incomingData()));
98
Callbacks::closeSocket (void *s)
100
WlmSocket *a = (WlmSocket*)s;
104
socketList.removeAll (a);
110
Callbacks::unregisterSocket (void *s)
112
WlmSocket *a = (WlmSocket*)s;
115
QObject::disconnect(a, SIGNAL (readyRead()),0,0);
120
Callbacks::gotFriendlyName (MSN::NotificationServerConnection * conn,
121
std::string friendlyname)
124
emit gotDisplayName( WlmUtils::utf8(friendlyname) );
128
Callbacks::fileTransferInviteResponse (MSN::SwitchboardServerConnection * conn,
129
unsigned int sessionID, bool response)
131
emit slotfileTransferInviteResponse (conn, sessionID, response);
135
Callbacks::gotContactDisplayPicture (MSN::SwitchboardServerConnection * conn,
136
MSN::Passport passport,
137
std::string filename)
140
emit gotDisplayPicture(WlmUtils::passport(passport), WlmUtils::utf8(filename));
144
Callbacks::gotMessageSentACK (MSN::SwitchboardServerConnection * conn,
147
emit messageSentACK (conn, trID);
151
Callbacks::gotBuddyListInfo (MSN::NotificationServerConnection * conn,
152
MSN::ListSyncInfo * info)
155
// Here you need to fill a vector with all your contacts
156
// both received by the server and previous ones.
157
// Next pass this vector to the function completeConnection()
158
// if you do not call completeConnection(), the service will
160
std::map < std::string, MSN::Buddy * >::iterator i =
161
info->contactList.begin ();
162
std::map < std::string, int >allContacts;
164
for (; i != info->contactList.end (); ++i)
166
MSN::Buddy * contact = (*i).second;
167
if (contact->lists & MSN::LST_AB // only if it is the address book
168
&& contact->properties["isMessengerUser"] == "true")
170
allContacts[contact->userName.c_str ()] = 0;
171
allContacts[contact->userName.c_str ()] |= MSN::LST_AB;
172
std::list < MSN::Buddy::PhoneNumber >::iterator pns = contact->phoneNumbers.begin ();
173
std::list < MSN::Group * >::iterator g = contact->groups.begin ();
175
if (contact->lists & MSN::LST_AL)
177
allContacts[contact->userName.c_str ()] |= MSN::LST_AL;
180
if (contact->lists & MSN::LST_BL)
182
allContacts[contact->userName.c_str ()] |= MSN::LST_BL;
185
if (contact->lists & MSN::LST_RL)
187
//printf ("-RL %s \n", contact->userName.c_str ());
189
if (contact->lists & MSN::LST_PL)
191
//printf ("-PL %s \n", contact->userName.c_str ());
194
//printf ("Available Groups:\n");
195
std::map < std::string, MSN::Group >::iterator g = info->groups.begin ();
197
for (; g != info->groups.end (); g++)
199
//printf (" %s: %s\n", (*g).second.groupID.c_str (),
200
// (*g).second.name.c_str ());
203
// this will send the ADL command to the server
204
// It is necessary. Do not forget to add *all* your contacts to allContacts,
205
// (both Forward, allow and block lists) or you probably will
207
// A contact cannot be present both on allow and block lists or the
208
// server will return an error, so you need to let your application
209
// choose the better list to put it in.
210
m_server->m_account->groupListReceivedFromServer (info->groups);
211
m_server->m_account->addressBookReceivedFromServer (info->contactList);
212
conn->completeConnection (allContacts, info);
216
Callbacks::gotLatestListSerial (MSN::NotificationServerConnection * conn,
217
std::string lastChange)
220
Q_UNUSED( lastChange );
224
Callbacks::gotGTC (MSN::NotificationServerConnection * conn, char c)
231
Callbacks::gotOIMDeleteConfirmation (MSN::NotificationServerConnection * conn,
232
bool success, std::string id)
238
emit deletedOIM (WlmUtils::latin1(id), success);
239
std::cout << "OIM " << id << " removed successfully." << std::endl;
242
std::cout << "OIM " << id << " not removed successfully." << std::endl;
247
Callbacks::gotOIMSendConfirmation (MSN::NotificationServerConnection * conn,
248
bool success, int id)
253
std::cout << "OIM " << id << " sent successfully." << std::endl;
255
std::cout << "OIM " << id << " not sent successfully." << std::endl;
259
Callbacks::gotOIM (MSN::NotificationServerConnection * conn, bool success,
260
std::string id, std::string message)
265
emit receivedOIM(WlmUtils::latin1(id), WlmUtils::utf8(message));
267
std::cout << "Error retreiving OIM " << id << std::endl;
271
Callbacks::gotOIMList (MSN::NotificationServerConnection * conn,
272
std::vector < MSN::eachOIM > OIMs)
275
emit receivedOIMList (OIMs);
279
Callbacks::connectionReady (MSN::Connection * conn)
282
emit connectionCompleted ();
286
Callbacks::gotBLP (MSN::NotificationServerConnection * conn, char c)
293
Callbacks::addedListEntry (MSN::NotificationServerConnection * conn,
294
MSN::ContactList list, MSN::Passport username,
295
std::string friendlyname)
298
emit gotNewContact (list, WlmUtils::passport(username), WlmUtils::utf8(friendlyname));
299
// after adding the user you need to delete it from the pending list.
300
// it will be added automatically by the msn service
302
// on regular lists you'll never receive the contacts displayname
303
// it is not needed anyway
307
Callbacks::removedListEntry (MSN::NotificationServerConnection * conn,
308
MSN::ContactList list, MSN::Passport username)
311
emit gotRemovedContactFromList (list, WlmUtils::passport(username));
315
Callbacks::addedGroup (MSN::NotificationServerConnection * conn, bool added,
316
std::string groupName, std::string groupID)
320
printf ("A group named %s (%s) was added\n", groupName.c_str (),
323
printf ("Group (%s) was NOT added\n", groupName.c_str ());
325
emit gotAddedGroup (added, WlmUtils::utf8(groupName), WlmUtils::latin1(groupID));
329
Callbacks::removedGroup (MSN::NotificationServerConnection * conn,
330
bool removed, std::string groupID)
335
printf ("A group with ID %s was removed\n", groupID.c_str ());
337
printf ("Group (%s) was NOT removed\n", groupID.c_str ());
339
emit gotRemovedGroup (removed, WlmUtils::latin1(groupID));
343
Callbacks::renamedGroup (MSN::NotificationServerConnection * conn,
344
bool renamed, std::string newGroupName,
349
Q_UNUSED( newGroupName );
353
printf ("A group with ID %s was renamed to %s\n", groupID.c_str (),
354
newGroupName.c_str ());
356
printf ("A group with ID %s was NOT renamed to %s\n",
357
groupID.c_str (), newGroupName.c_str ());
362
Callbacks::showError (MSN::Connection * conn, std::string msg)
364
std::cout << "MSN: Error: " << msg.c_str () << std::endl;
365
QString a = WlmUtils::latin1(msg);
366
// FIXME This is really ugly the libmsn should send some error code instead of msg
367
if (a.contains("Wrong Password"))
368
emit mainConnectionError(WrongPassword);
369
else if (a.contains("You have logged onto MSN twice at once"))
370
emit mainConnectionError(OtherClient);
371
else if (conn == mainConnection)
372
emit mainConnectionError(Unknown);
376
Callbacks::buddyChangedStatus (MSN::NotificationServerConnection * conn,
377
MSN::Passport buddy, std::string friendlyname,
378
MSN::BuddyStatus status, unsigned int clientID,
379
std::string msnobject)
382
emit contactChangedStatus (WlmUtils::passport(buddy), WlmUtils::utf8(friendlyname),
383
status, clientID, WlmUtils::utf8(msnobject));
387
Callbacks::buddyOffline (MSN::NotificationServerConnection * conn,
391
emit contactDisconnected(WlmUtils::passport(buddy));
395
Callbacks::gotSwitchboard (MSN::SwitchboardServerConnection * conn,
398
emit gotNewSwitchboard (dynamic_cast<MSN::SwitchboardServerConnection* >(conn), tag);
402
Callbacks::buddyJoinedConversation (MSN::SwitchboardServerConnection * conn,
403
MSN::Passport username,
404
std::string friendlyname, int is_initial)
406
Q_UNUSED( is_initial );
408
emit joinedConversation (conn, WlmUtils::passport(username), WlmUtils::utf8(friendlyname));
409
const std::pair<std::string, std::string> *ctx = static_cast<const std::pair<std::string, std::string> *>(conn->auth.tag);
411
conn->auth.tag = NULL;
413
/* if (conn->auth.tag)
415
const std::pair<std::string, std::string> *ctx = static_cast<const std::pair<std::string, std::string> *>(conn->auth.tag);
416
// Example of sending a custom emoticon
417
// conn->myNotificationServer()->msnobj.addMSNObject("/tmp/emoticon.gif",2);
419
// conn->myNotificationServer()->msnobj.getMSNObjectXML("/tmp/emoticon.gif", 2, obj);
420
// conn->sendEmoticon("(EMOTICON)", obj);
422
conn->sendMessage(ctx->second);
424
conn->auth.tag = NULL;
426
//Example of sending a file
427
// MSN::fileTransferInvite ft;
428
// ft.filename = "/tmp/filetosend.txt";
429
// ft.friendlyname = "filetosend2.txt";
430
// ft.sessionId = sessionID++;
431
// ft.type = MSN::FILE_TRANSFER_WITHOUT_PREVIEW;
432
// conn->sendFile(ft);
434
// conn->sendNudge();
435
// conn->sendAction("Action message here");
437
// Exemple of requesting a display picture.
438
// std::string filename2("/tmp/displayPicture.bin"+MSN::toStr(sessionID));
439
// lastObject is the msnobject received on each contact status change
440
// you should generate a random sessionID
441
// conn->requestFile(sessionID++, filename2, lastObject);
443
// Example of sending a voice clip
444
// conn->myNotificationServer()->msnobj.addMSNObject("/tmp/voiceclip.wav",11);
446
// conn->myNotificationServer()->msnobj.getMSNObjectXML("/tmp/voiceclip.wav", 11, obj);
447
// conn->sendVoiceClip(obj);
448
// exemple of sending an ink
449
// std::string ink("base64 data here...");
450
// conn->sendInk(ink);
456
Callbacks::buddyLeftConversation (MSN::SwitchboardServerConnection * conn,
457
MSN::Passport username)
459
emit leftConversation (conn, WlmUtils::passport(username));
464
Callbacks::gotInstantMessage (MSN::SwitchboardServerConnection * conn,
465
MSN::Passport username,
466
std::string friendlyname, MSN::Message * msg)
468
Q_UNUSED( friendlyname );
470
Kopete::Message kmsg;
471
kmsg.setPlainBody(WlmUtils::utf8(msg->getBody()));
472
QFont font (WlmUtils::latin1(msg->getFontName()));
473
if (msg->getFontEffects () & MSN::Message::BOLD_FONT)
475
if (msg->getFontEffects () & MSN::Message::ITALIC_FONT)
476
font.setItalic (true);
477
if (msg->getFontEffects () & MSN::Message::UNDERLINE_FONT)
478
font.setUnderline (true);
479
if (msg->getFontEffects () & MSN::Message::STRIKETHROUGH_FONT)
480
font.setStrikeOut (true);
482
QColor color (msg->getColor ()[0], msg->getColor ()[1],
483
msg->getColor ()[2]);
484
kmsg.setForegroundColor (color);
487
emit messageReceived (conn, WlmUtils::passport(username), kmsg);
491
Callbacks::gotEmoticonNotification (MSN::SwitchboardServerConnection * conn,
492
MSN::Passport username, std::string alias,
493
std::string msnobject)
495
emit slotGotEmoticonNotification(conn, WlmUtils::passport(username),
496
WlmUtils::utf8(alias), WlmUtils::utf8(msnobject));
500
Callbacks::failedSendingMessage (MSN::Connection * conn)
503
//printf ("**************************************************\n");
504
//printf ("ERROR: Your last message failed to send correctly\n");
505
//printf ("**************************************************\n");
509
Callbacks::buddyTyping (MSN::SwitchboardServerConnection * conn,
510
MSN::Passport username, std::string friendlyname)
512
Q_UNUSED( friendlyname );
513
emit receivedTypingNotification (conn, WlmUtils::passport(username));
518
Callbacks::gotNudge (MSN::SwitchboardServerConnection * conn,
519
MSN::Passport username)
521
emit receivedNudge (conn, WlmUtils::passport(username));
525
Callbacks::gotVoiceClipNotification (MSN::SwitchboardServerConnection * conn,
526
MSN::Passport username, std::string msnobject)
528
emit slotGotVoiceClipNotification(conn, WlmUtils::passport(username), WlmUtils::utf8(msnobject));
532
Callbacks::gotWinkNotification (MSN::SwitchboardServerConnection * conn,
533
MSN::Passport username, std::string msnobject)
535
emit slotGotWinkNotification(conn, WlmUtils::passport(username), WlmUtils::utf8(msnobject));
539
Callbacks::gotInk (MSN::SwitchboardServerConnection * conn,
540
MSN::Passport username, std::string image)
542
emit slotGotInk(conn, WlmUtils::passport(username), QByteArray(image.c_str()));
546
Callbacks::gotActionMessage (MSN::SwitchboardServerConnection * conn,
547
MSN::Passport username, std::string message)
550
Q_UNUSED( username );
555
Callbacks::gotInitialEmailNotification (MSN::NotificationServerConnection *
556
conn, int msgs_inbox,
557
int unread_inbox, int msgs_folders,
561
Q_UNUSED( msgs_inbox );
562
Q_UNUSED( msgs_folders );
563
Q_UNUSED( unread_folders );
565
if (unread_inbox > 0)
566
emit initialEmailNotification (unread_inbox);
570
Callbacks::gotNewEmailNotification (MSN::NotificationServerConnection * conn,
571
std::string from, std::string subject)
574
emit newEmailNotification (WlmUtils::utf8(from), KMime::decodeRFC2047String(subject.c_str()));
578
Callbacks::gotInboxUrl (MSN::NotificationServerConnection * conn,
579
MSN::hotmailInfo info)
582
emit inboxUrl (info);
586
Callbacks::fileTransferProgress (MSN::SwitchboardServerConnection * conn,
587
unsigned int sessionID,
588
unsigned long long transferred,
589
unsigned long long total)
592
emit gotFileTransferProgress (conn, sessionID, transferred);
596
Callbacks::fileTransferFailed (MSN::SwitchboardServerConnection * conn,
597
unsigned int sessionID, MSN::fileTransferError error)
599
emit gotFileTransferFailed (conn, sessionID, error);
603
Callbacks::fileTransferSucceeded (MSN::SwitchboardServerConnection * conn,
604
unsigned int sessionID)
606
//printf ("File transfer successfully completed. session: %d\n", sessionID);
607
emit gotFileTransferSucceeded (conn, sessionID);
611
Callbacks::gotNewConnection (MSN::Connection * conn)
613
if (dynamic_cast < MSN::NotificationServerConnection * >(conn))
614
dynamic_cast <MSN::NotificationServerConnection *>(conn)->synchronizeContactList ();
618
Callbacks::buddyChangedPersonalInfo (MSN::NotificationServerConnection * conn,
619
MSN::Passport fromPassport,
620
MSN::personalInfo pInfo)
623
// MSN::personalInfo shows all the data you can grab from the contact
624
//printf ("User %s Personal Message: %s\n", fromPassport.c_str (),
625
// pInfo.PSM.c_str ());
626
emit gotContactPersonalInfo (WlmUtils::passport(fromPassport), pInfo);
630
Callbacks::closingConnection (MSN::Connection * conn)
632
if (dynamic_cast < MSN::SwitchboardServerConnection * >(conn))
633
emit SwitchboardServerConnectionTerminated (
634
dynamic_cast <MSN::SwitchboardServerConnection* >(conn));
635
if (dynamic_cast < MSN::NotificationServerConnection * >(conn))
636
emit NotificationServerConnectionTerminated (
637
dynamic_cast <MSN::NotificationServerConnection* >(conn));
641
Callbacks::changedStatus (MSN::NotificationServerConnection * conn,
642
MSN::BuddyStatus state)
645
//printf ("Your state is now: %s\n",
646
// MSN::buddyStatusToString (state).c_str ());
647
emit changedStatus (state);
648
/* MSN::personalInfo pInfo;
649
pInfo.PSM="my personal message";
650
pInfo.mediaType="Music";
651
pInfo.mediaIsEnabled=1;
652
pInfo.mediaFormat="{0} - {1}";
653
pInfo.mediaLines.push_back("Artist");
654
pInfo.mediaLines.push_back("Song");
655
conn->setPersonalStatus(pInfo);
660
Callbacks::getDataFromSocket (void *sock, char *data, size_t size)
662
WlmSocket *a = (WlmSocket*)sock;
666
return a->read(data, size);
670
Callbacks::writeDataToSocket (void *sock, char *data, size_t size)
672
WlmSocket *a = (WlmSocket*)sock;
676
return a->write(data, size);
680
Callbacks::connectToServer (std::string hostname, int port, bool * connected, bool isSSL)
682
WlmSocket *a = new WlmSocket (mainConnection, isSSL, m_server);
686
connect( a, SIGNAL(sslErrors(QList<QSslError>)), a, SLOT(ignoreSslErrors()) );
687
connect( a, SIGNAL(error(QAbstractSocket::SocketError)), this, SLOT(emitSocketError(QAbstractSocket::SocketError)) );
690
a->connectToHost (WlmUtils::latin1(hostname), port);
692
a->connectToHostEncrypted (WlmUtils::latin1(hostname), port);
695
socketList.append (a);
700
Callbacks::listenOnPort (int port)
703
// this callback is not used yet,
704
// so, for now we are returning a dummy
705
// value to avoid compiling issues
709
std::string Callbacks::getOurIP (void)
711
// this callback is not used yet,
712
// so, for now we are returning a dummy
713
// value to avoid compiling issues
718
Callbacks::log (int i, const char *s)
725
Callbacks::getSocketFileDescriptor (void *sock)
727
WlmSocket *a = (WlmSocket*)sock;
730
return a->socketDescriptor();
733
std::string Callbacks::getSecureHTTPProxy ()
739
Callbacks::askFileTransfer (MSN::SwitchboardServerConnection * conn,
740
MSN::fileTransferInvite ft)
742
emit incomingFileTransfer (conn, ft);
746
case MSN::FILE_TRANSFER_BACKGROUND_SHARING:
747
printf("User %s wants to share with you a background file named %s. Size: %llu. Accepting..\n", ft.userPassport.c_str(), ft.filename.c_str(), ft.filesize);
749
case MSN::FILE_TRANSFER_BACKGROUND_SHARING_CUSTOM:
750
printf("User %s wants to share with you a *custom background file named %s. Size: %llu. Accepting..\n", ft.userPassport.c_str(), ft.filename.c_str(), ft.filesize);
752
case MSN::FILE_TRANSFER_WITH_PREVIEW:
753
printf("User %s wants to send you a file *with preview named %s. Size: %llu. Accepting..\n", ft.userPassport.c_str(), ft.filename.c_str(), ft.filesize);
754
// ft.preview has the base64 encoded png file
756
case MSN::FILE_TRANSFER_WITHOUT_PREVIEW:
757
printf("User %s wants to send you a file *without preview named %s. Size: %llu. Accepting..\n", ft.userPassport.c_str(), ft.filename.c_str(), ft.filesize);
760
printf("Unknown filetransfer type from %s..\n", ft.userPassport.c_str());
763
conn->fileTransferResponse(ft.sessionId, filename2, true);
768
Callbacks::addedContactToGroup (MSN::NotificationServerConnection * conn,
769
bool added, std::string groupId,
770
std::string contactId)
775
printf ("User Id (%s) added to group Id (%s)\n", contactId.c_str (),
778
printf ("User Id (%s) NOT added to group Id (%s)\n",
779
contactId.c_str (), groupId.c_str ());
781
emit gotAddedContactToGroup (added, WlmUtils::latin1(groupId),
782
WlmUtils::latin1(contactId));
786
Callbacks::removedContactFromGroup (MSN::NotificationServerConnection * conn,
787
bool removed, std::string groupId,
788
std::string contactId)
793
printf ("User Id (%s) removed from group Id (%s)\n",
794
contactId.c_str (), groupId.c_str ());
796
printf ("User Id (%s) NOT removed from group Id (%s)\n",
797
contactId.c_str (), groupId.c_str ());
799
emit gotRemovedContactFromGroup (removed, WlmUtils::latin1(groupId),
800
WlmUtils::latin1(contactId));
804
Callbacks::addedContactToAddressBook (MSN::NotificationServerConnection *
805
conn, bool added, std::string passport,
806
std::string displayName,
812
printf ("User (%s - %s) added to AddressBook. Guid (%s)\n",
813
passport.c_str (), displayName.c_str (), guid.c_str ());
815
printf ("User (%s - %s) NOT added to AddressBook.\n",
816
passport.c_str (), displayName.c_str ());
818
emit gotAddedContactToAddressBook (added, WlmUtils::passport(passport),
819
WlmUtils::utf8(displayName), WlmUtils::latin1(guid));
823
Callbacks::removedContactFromAddressBook (MSN::NotificationServerConnection *
825
std::string contactId,
826
std::string passport)
831
printf ("User %s removed from AddressBook. Guid (%s)\n",
832
passport.c_str (), contactId.c_str ());
834
printf ("User %s NOT removed from AddressBook. Guid (%s)\n",
835
passport.c_str (), contactId.c_str ());
837
emit gotRemovedContactFromAddressBook (removed, WlmUtils::passport(passport),
838
WlmUtils::latin1(contactId));
842
Callbacks::enabledContactOnAddressBook (MSN::NotificationServerConnection *
844
std::string contactId,
845
std::string passport)
849
Q_UNUSED( contactId );
850
Q_UNUSED( passport );
852
// this is used to enable a contact previously disabled from msn, but not fully removed
854
printf ("User (%s) enabled on AddressBook. Guid (%s)\n",
855
passport.c_str (), contactId.c_str ());
857
printf ("User (%s) NOT enabled on AddressBook. Guid (%s)\n",
858
passport.c_str (), contactId.c_str ());
863
Callbacks::disabledContactOnAddressBook (MSN::NotificationServerConnection *
865
std::string contactId)
868
Q_UNUSED( disabled );
869
Q_UNUSED( contactId );
870
// this is used when you have disabled this user from msn, but not deleted from hotmail
871
// I suggest to delete the contact instead of disable, since I haven't tested this too much yet
874
printf ("User disabled on AddressBook. Guid (%s)\n",
877
printf ("User NOT disabled on AddressBook. Guid (%s)\n",
882
void Callbacks::gotVoiceClipFile(MSN::SwitchboardServerConnection * conn, unsigned int sessionID, std::string file)
884
emit slotGotVoiceClipFile(conn, sessionID, WlmUtils::utf8(file));
887
void Callbacks::gotEmoticonFile(MSN::SwitchboardServerConnection * conn, unsigned int sessionID, std::string alias, std::string file)
889
emit slotGotEmoticonFile(conn, sessionID, WlmUtils::utf8(alias), WlmUtils::utf8(file));
892
void Callbacks::gotWinkFile(MSN::SwitchboardServerConnection * conn, unsigned int sessionID, std::string file)
894
emit slotGotWinkFile(conn, sessionID, WlmUtils::utf8(file));
897
void Callbacks::emitSocketError( QAbstractSocket::SocketError error )
899
if ( !mainConnection )
902
WlmSocket* socket = qobject_cast<WlmSocket*>(sender());
905
MSN::Connection *c = mainConnection->connectionWithSocket((void*)socket);
909
if ( c == mainConnection )
910
emit socketError( error );
915
#include "wlmlibmsn.moc"