2
* wbmanager.h - Whiteboard manager
3
* Copyright (C) 2007 Joonas Govenius
6
* pepmanager.h - Classes for PEP
7
* Copyright (C) 2006 Remko Troncon
9
* This program is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU General Public License
11
* as published by the Free Software Foundation; either version 2
12
* of the License, or (at your option) any later version.
14
* This program is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
* GNU General Public License for more details.
19
* You should have received a copy of the GNU General Public License
20
* along with this library; if not, write to the Free Software
21
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
28
#include "../sxe/sxemanager.h"
31
#include <QInputDialog>
41
/*! \brief The manager for whiteboard dialogs.
42
* The manager listen to SxeManager to pick up any new sessions negotiated by
43
* it and creates a dialog for each session.
45
* The manager also provides a possibillity for the local client to start
46
* a new session negotiation with the desired contact.
50
class WbManager : public QObject
55
/*! \brief Constructor.
56
* Creates a new manager for the specified Client and PsiAccount
58
WbManager(PsiAccount* pa, SxeManager* sxemanager);
59
/*! \brief Returns true if features contains WBNS and the user wishes to accept the invitation. */
60
static bool checkInvitation(const Jid &peer, const QList<QString> &features);
63
/*! \brief Opens the existing dialog to the specified contact or starts a new session negotiation if necessary.*/
64
void openWhiteboard(const Jid &target, const Jid &ownJid, bool groupChat, bool promptInitialDoc = true);
67
/*! \brief Return a pointer to a dialog to the specified contact.
68
* If such dialog doesn't exits, returns 0.
70
WbDlg* findWbDlg(const Jid &target);
72
/*! \brief A pointer to the PsiAccount to pass to new dialogs.*/
74
/*! \brief A list of dialogs of established sessions.*/
75
QList<WbDlg*> dialogs_;
76
/*! \brief A pointer to the SxeManager used for negotiating sessions.*/
77
SxeManager* sxemanager_;
80
/*! \brief Removes and deletes the dialog for the given session.*/
81
void removeDialog(WbDlg* dialog);
82
/*! \brief Returns a pointer to a new dialog to with given contact and session set.*/
83
void createWbDlg(SxeSession* session);