2
Kopete Yahoo Protocol Tests
4
Copyright (c) 2004 Duncan Mac-Vicar P. <duncan@kde.org>
7
Copyright (c) 2004 Matt Rogers <matt.rogers@kdemail.net>
9
Kopete (c) 2002-2004 by the Kopete developers <kopete-devel@kde.org>
11
*************************************************************************
13
* This library is free software; you can redistribute it and/or *
14
* modify it under the terms of the GNU Lesser General Public *
15
* License as published by the Free Software Foundation; either *
16
* version 2 of the License, or (at your option) any later version. *
18
*************************************************************************
21
#include "logintest.h"
23
#include "../ymsgtransfer.h"
24
#include "../yahootypes.h"
26
LoginTest::LoginTest(int argc, char ** argv) : QApplication( argc, argv )
28
// set up client stream
29
myConnector = new KNetworkConnector( 0 );
30
//myConnector->setOptHostPort( "localhost", 8300 );
31
myConnector->setOptHostPort( "scs.msg.yahoo.com", 5050 );
32
myClientStream = new ClientStream( myConnector, myConnector);
33
// notify when the transport layer is connected
34
myClient = new Client();
35
// do test once the event loop is running
36
QTimer::singleShot( 0, this, SLOT(slotDoTest()) );
40
LoginTest::~LoginTest()
42
delete myClientStream;
47
void LoginTest::slotDoTest()
49
QLatin1String server("scs.msg.yahoo.com");
51
kDebug(14180) << " connecting to server";
53
connect( myClient, SIGNAL(connected()), SLOT(slotConnected()) );
54
myClient->start( server, 5050, "duncanmacvicar", "**********" );
55
myClient->connectToServer( myClientStream, server, true );
58
void LoginTest::slotConnected()
60
kDebug(14180) << " connection is up";
64
int main(int argc, char ** argv)
66
LoginTest a( argc, argv );
68
if ( !a.isConnected() )
72
#include "logintest.moc"