File: sessionmanager.h

package info (click to toggle)
dc-qt 0.2.0.alpha-4
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 1,948 kB
  • ctags: 5,361
  • sloc: cpp: 28,936; makefile: 19
file content (66 lines) | stat: -rw-r--r-- 1,519 bytes parent folder | download | duplicates (4)
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
//
// C++ Interface: sessionmanager
//
// Description:
//
//
// Author: Rikard Bjorklind <olof@users.sourceforge.net>, (C) 2006
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef SESSIONMANAGER_H
#define SESSIONMANAGER_H

#include <QObject>
#include <QMap>
#include "backendconnection.h"

class QTabWidget;
class Session;
class User;

/**
	Manages the mapping between integers and sessions, creates session widgets.
	@author Rikard Bjorklind <olof@users.sourceforge.net>
*/
class SessionManager : public QObject
{
    Q_OBJECT
public:
    SessionManager(QTabWidget *aSessionTabs,
                   boost::shared_ptr< BackendConnection > aConnection,
                   QObject *parent = 0);

    ~SessionManager();

public slots:
    void createSession(int id);
	void closeCurrentSession();
	void hubUpdated(int id,const QString& hubName);
    void connectionFailed(int id, const QString& reason);
    void privateChat(int,const QString&,const QString&);
    void usersUpdated(int, QList<User*>);
	void userRemoved(int,int);
    void chatMessage(int,const QString&);
	void sessionInfo(int,const QString&,const QString&,const QList<User*>);
	
signals:
	void currentHubTotalShare(qint64);
	
private slots:
	void sendChat(int,const QString&);
    void getUserFileList(int);
	void onHubStats(int,qint64);
	void onActiveSessionChanged(int);
	
private:
    boost::shared_ptr< BackendConnection > backendConnection;
    QTabWidget* sessionTabs;
    QMap<int,Session*> sessionMap;



};

#endif