~ubuntu-branches/ubuntu/saucy/kopete/saucy-proposed

« back to all changes in this revision

Viewing changes to protocols/testbed/testbedincomingmessage.h

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2013-06-21 02:22:39 UTC
  • Revision ID: package-import@ubuntu.com-20130621022239-63l3zc8p0nf26pt6
Tags: upstream-4.10.80
ImportĀ upstreamĀ versionĀ 4.10.80

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
    testbedincomingmessage.h - Kopete Testbed Protocol
 
3
 
 
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>
 
6
 
 
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
    *************************************************************************
 
15
*/
 
16
 
 
17
#ifndef TESTBEDINCOMINGMESSAGE_H
 
18
#define TESTBEDINCOMINGMESSAGE_H
 
19
 
 
20
#include <qobject.h>
 
21
#include "testbedfakeserver.h"
 
22
 
 
23
/**
 
24
 * A simulated incoming message, that hasn't yet arrived at the
 
25
 * Kopete side 'client' of the simulated IM system.
 
26
 * @author Will Stephenson
 
27
 */
 
28
class TestbedIncomingMessage : public QObject
 
29
{
 
30
Q_OBJECT
 
31
public:
 
32
        /**
 
33
         * Create a new incoming message
 
34
         * @param server The simulated Kopete side 'client' of the IM system where the message will arrive when 'delivered'
 
35
         * @param message The simulated message
 
36
         */
 
37
        TestbedIncomingMessage( TestbedFakeServer* const server , QString message );
 
38
        virtual ~TestbedIncomingMessage();
 
39
        /**
 
40
         * Has this message already been delivered?
 
41
         */
 
42
        bool delivered() { return m_delivered; }
 
43
public slots:
 
44
        /**
 
45
         * 'Deliver' the message to Kopete by calling TestbedFakeServer::incomingMessage().
 
46
         * This marks the message as delivered so it can be purged from the incoming list.
 
47
         */
 
48
        void deliver();
 
49
protected:
 
50
        QString m_message;
 
51
        TestbedFakeServer* m_server;
 
52
        bool m_delivered;
 
53
};
 
54
 
 
55
#endif