blob: f9bb82b9b1734174fddc0eaf9960f6e99347e5f8 (
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
/*
jinglesessionmanager.h - Manage Jingle sessions.
Copyright (c) 2006 by Michaël Larouche <[email protected]>
Kopete (c) 2001-2006 by the Kopete developers <[email protected]>
*************************************************************************
* *
* 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 JINGLESESSIONMANAGER_H
#define JINGLESESSIONMANAGER_H
#include <xmpp.h>
#include <im.h>
#include <tqobject.h>
#include <tqvaluelist.h>
namespace cricket
{
class SessionManager;
}
class JingleSession;
class JingleVoiceSession;
class JabberAccount;
/**
* @brief Manage Jingle sessions.
* @author Michaël Larouche <[email protected]>
*/
class JingleSessionManager : public QObject
{
Q_OBJECT
public:
typedef TQValueList<XMPP::Jid> JidList;
JingleSessionManager(JabberAccount *account);
~JingleSessionManager();
/**
* Get the (single) instance of the cricket session manager.
*/
cricket::SessionManager *cricketSessionManager();
/**
* Return the JabberAccount associated with this session manager.
*/
JabberAccount *account();
public slots:
/**
* Create a new Jingle session. Returned pointer is managed by this class.
* @param sessionType the session you want to create. You must pass its XML namespace(ex: http://jabber.org/protocol/sessions/audio)
* @param peers Lists of participants of the session.
*/
JingleSession *createSession(const TQString &sessionType, const JidList &peers);
/**
* Override method that create a session for a one-to-one session.
* It behave like createSession method.
* @param sessionType the sesion you want to create. You must pass its XML namespace(ex: http://jabber.org/protocol/sessions/audio)
* @param user The JID of the user you want to begin a session with.
*/
JingleSession *createSession(const TQString &sessionType, const XMPP::Jid &user);
void removeSession(JingleSession *session);
signals:
void incomingSession(const TQString &sessionType, JingleSession *session);
private slots:
void slotIncomingSession(const TQString &sessionType, const TQString &initiator);
private:
class Private;
Private *d;
class SlotsProxy;
SlotsProxy *slotsProxy;
};
#endif
|