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

« back to all changes in this revision

Viewing changes to protocols/groupwise/libgroupwise/tasks/conferencetask.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
    Kopete Groupwise Protocol
 
3
    conferencetask.h - Event Handling task responsible for all conference related events
 
4
 
 
5
    Copyright (c) 2004      SUSE Linux AG                http://www.suse.com
 
6
    
 
7
    Based on Iris, Copyright (C) 2003  Justin Karneges <justin@affinix.com>
 
8
 
 
9
    Kopete (c) 2002-2004 by the Kopete developers <kopete-devel@kde.org>
 
10
 
 
11
    *************************************************************************
 
12
    *                                                                       *
 
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.      *
 
17
    *                                                                       *
 
18
    *************************************************************************
 
19
*/
 
20
 
 
21
#ifndef CONFERENCETASK_H
 
22
#define CONFERENCETASK_H
 
23
 
 
24
#include "gwerror.h"
 
25
#include "eventtask.h"
 
26
#include <QtCore/QList>
 
27
 
 
28
/**
 
29
 * This Task is responsible for handling all conference related events, and signalling them up to @ref GroupWiseAccount
 
30
 * Implementation note: It would be fit the model more cleanly to have each of these in their own Task, but the amount
 
31
 * of code they share is quite large, and the differences in the way each event uses it are small
 
32
 * @author SUSE AG
 
33
 */
 
34
 
 
35
using namespace GroupWise;
 
36
 
 
37
class ConferenceTask : public EventTask
 
38
{
 
39
Q_OBJECT
 
40
public:
 
41
        ConferenceTask( Task* parent );
 
42
        ~ConferenceTask();
 
43
        bool take( Transfer * transfer );
 
44
signals:
 
45
        void typing( const ConferenceEvent & );
 
46
        void notTyping( const ConferenceEvent & );
 
47
        void joined( const ConferenceEvent & );
 
48
        void left( const ConferenceEvent &);
 
49
        void invited( const ConferenceEvent & );
 
50
        void otherInvited( const ConferenceEvent & );
 
51
        void invitationDeclined( const ConferenceEvent & );
 
52
        void closed( const ConferenceEvent & );
 
53
        void message( const ConferenceEvent &);
 
54
        void autoReply( const ConferenceEvent & );
 
55
        // GW7
 
56
        void broadcast( const ConferenceEvent &);
 
57
        void systemBroadcast( const ConferenceEvent &);
 
58
protected slots:
 
59
        void slotReceiveUserDetails( const GroupWise::ContactDetails & );
 
60
protected:
 
61
        quint32 readFlags( QDataStream & din );
 
62
        QString readMessage( QDataStream & din );
 
63
        /**
 
64
         * Checks to see if we need more data from the client before we can propagate this event
 
65
         * and queues the event if so
 
66
         * @return whether the event was queued pending more data
 
67
         */
 
68
        bool queueWhileAwaitingData( const ConferenceEvent & event );
 
69
        void dumpConferenceEvent( ConferenceEvent & evt );
 
70
private:
 
71
        // A list of events which are waiting for more data from the server before they can be exposed to the client
 
72
        QList< ConferenceEvent > m_pendingEvents;
 
73
};
 
74
 
 
75
#endif