implement update interval of list; can be disabled / changed by user
[kdenetwork.git] / kopete / protocols / testbed / testbedfakeserver.h
blobcaf4e88e0bd243230fbf43e0f2ef1062cc556f93
1 /*
2 testbedfakeserver.h - Kopete Testbed Protocol
4 Copyright (c) 2003 by Will Stephenson <will@stevello.free-online.co.uk>
5 Kopete (c) 2002-2003 by the Kopete developers <kopete-devel@kde.org>
7 *************************************************************************
8 * *
9 * This library is free software; you can redistribute it and/or *
10 * modify it under the terms of the GNU General Public *
11 * License as published by the Free Software Foundation; either *
12 * version 2 of the License, or (at your option) any later version. *
13 * *
14 *************************************************************************
17 #ifndef TESTBEDFAKESERVER_H
18 #define TESTBEDFAKESERVER_H
20 #include <QList>
21 #include <QObject>
24 class TestbedIncomingMessage;
26 /**
27 * This is a interface to a dummy IM server
28 * @author Will Stephenson
30 class TestbedFakeServer : public QObject
32 Q_OBJECT
33 public:
34 TestbedFakeServer();
35 ~TestbedFakeServer();
36 /**
37 * Called to simulate sending a message to a remote contact
39 void sendMessage( const QString &contactId, const QString &message );
41 public slots:
42 /**
43 * A message came in off the simulated wire.
44 * In reality, a message on the incoming message list
45 * connects to this slot when it's time to 'arrive'
47 void incomingMessage( QString message );
49 signals:
50 /**
51 * Tells the account that a message arrived
53 void messageReceived( const QString &message );
55 protected:
56 /**
57 * Utility method, just clears delivered messages from the
58 * incoming message list
60 void purgeMessages();
61 /**
62 * List of incoming messages
64 QList<TestbedIncomingMessage*> m_incomingMessages;
67 #endif