Show invite menu in wlm chat window immediately
[kdenetwork.git] / kopete / protocols / skype / skypecalldialog.h
blob6079aa13a512b47a2969cc23cdae01322f08e060
1 /* This file is part of the KDE project
2 Copyright (C) 2005 Michal Vaner <michal.vaner@kdemail.net>
3 Copyright (C) 2008-2009 Pali Rohár <pali.rohar@gmail.com>
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License version 2 as published by the Free Software Foundation.
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 Boston, MA 02111-1307, USA.
21 #ifndef SKYPECALLDIALOG_H
22 #define SKYPECALLDIALOG_H
24 #include <ui_skypecalldialogbase.h>
26 class SkypeAccount;
27 class SkypeCallDialogPrivate;
28 namespace Ui { class SkypeCallDialogBase; }
30 /**
31 * @author Michal Vaner (Vorner)
32 * @author Pali Rohár
33 * This class is a window that can control a call (show information about it, hang up, hold, ...)
35 class SkypeCallDialog : public KDialog, private Ui::SkypeCallDialogBase
37 Q_OBJECT
38 private:
39 ///d pointer
40 SkypeCallDialogPrivate *d;
41 ///Start timeout to close
42 void closeLater();
43 private slots:
44 ///Close it after timeout after finishing the call
45 void deathTimeout();
46 ///Update the call info now
47 void updateCallInfo();
48 ///Call the user back
49 void callBack();
50 protected slots:
51 ///The accept button was clicked, accept the call
52 virtual void acceptCall();
53 ///Hold or release the call
54 virtual void holdCall();
55 ///Hang up the call
56 virtual void hangUp();
57 ///Start chat to the user
58 virtual void chatUser();
59 protected:
60 ///I want to know when I'm closed
61 virtual void closeEvent(QCloseEvent *e);
62 ///Main dialog widget
63 Ui::SkypeCallDialogBase *dialog;
64 public:
65 /**
66 * Constructor
68 SkypeCallDialog(const QString &callId, const QString &userId, SkypeAccount *account);
69 ///Destructor
70 ~SkypeCallDialog();
71 public slots:
72 ///Update the status of call and disable/enable the right buttons and show it in the labels
73 void updateStatus(const QString &callId, const QString &status);
74 ///Updates an error message when some error occurred
75 void updateError(const QString &callId, const QString &status);
76 /**
77 * Incoming SkypeOut balance info
78 * @param balance How much of that does user have
79 * @param currency What currency is it (actually only euro-cents are used)
81 void skypeOutInfo(int balance, const QString &currency);
82 signals:
83 /**
84 * accept an incoming call
85 * @param callId What call is it
87 void acceptTheCall(const QString &callId);
88 /**
89 * Hang up this call for me, please
90 * @param callId What call are we talking about
92 void hangTheCall(const QString &callId);
93 /**
94 * Hold or resume a call (depending on its actual status)
95 * @param callId What call are we tlking about
97 void toggleHoldCall(const QString &callId);
98 /**
99 * Tell me the skype out balance, please
101 void updateSkypeOut();
103 * This is emited when a call dialog is closed and is going to be deleted
104 * @param callId Id of it's call
106 void callFinished(const QString &callId);
109 #endif