summaryrefslogtreecommitdiffstats
path: root/kopete/protocols/jabber/jingle/jinglevoicesessiondialog.h
blob: 29d0c09137be52cd0c553a9a2174e27ca521b131 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*
    jinglevoicesessiondialog.h - GUI for a voice session.

    Copyright (c) 2006      by Michaƫl Larouche     <michael.larouche@kdemail.net>

    Kopete    (c) 2001-2006 by the Kopete developers <kopete-devel@kde.org>

    *************************************************************************
    *                                                                       *
    * This program is free software; you can redistribute it and/or modify  *
    * it under the terms of the GNU General Public License as published by  *
    * the Free Software Foundation; either version 2 of the License, or     *
    * (at your option) any later version.                                   *
    *                                                                       *
    *************************************************************************
*/
#ifndef JINGLEVOICESESSIONDIALOG_H
#define JINGLEVOICESESSIONDIALOG_H

#include "jinglevoicesessiondialogbase.h"

#include <im.h>
#include <xmpp.h>

using namespace XMPP;

class JabberContact;
class VoiceCaller;

class JingleVoiceSessionDialog : public JingleVoiceSessionDialogBase
{
	Q_OBJECT
public:
	enum SessionState { Incoming, Waiting, Accepted, Declined, Started, Terminated };

	JingleVoiceSessionDialog(const Jid &peerJid, VoiceCaller *caller, QWidget *parent = 0, const char *name = 0);
	~JingleVoiceSessionDialog();

public slots:
	void start();

protected slots:
	void reject();

protected:
	void finalize();

private slots:
	void slotAcceptClicked();
	void slotDeclineClicked();
	void slotTerminateClicked();

	void sessionStarted(const Jid &jid);
	void sessionAccepted(const Jid &jid);
	void sessionDeclined(const Jid &jid);
	void sessionTerminated(const Jid &jid);

private:
	void setContactInformation(JabberContact *contact);

	VoiceCaller *m_session;
	Jid m_peerJid;
	SessionState m_sessionState;
};

#endif