conference.h 1.83 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*
 *  Copyright (C) 2009 Savoir-Faire Linux inc.
 *  Author: Alexandre Savard  <alexandre.savard@savoirfairelinux.com>
 *
 *  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 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
#ifndef CONFERENCE_H
#define CONFERENCE_H

#include <set>
23
#include <string>
24

25
#include "audio/recordable.h"
26
#include "call.h"
27
28
29
30

// class ManagerImpl;
// class Call;

31
typedef std::string ConfID;
32
33
34

typedef std::set<CallID> ParticipantSet;

35
class Conference: public Recordable{
36
37
38

    public:

39
        enum ConferenceState {Active_Atached, Active_Detached, Hold};
40

41
42
43
	static int count;

        Conference();
44
45
46

        ~Conference();

47
48
	std::string getConfID() { return _id; }

49
50
51
52
53
54
	int getState();

	void setState(ConferenceState state);

	std::string getStateStr();

55
56
57
58
59
60
	int getNbParticipants() { return _nbParticipant; }

	void add(CallID participant_id);

	void remove(CallID participant_id);

61
62
	void bindParticipant(CallID participant_id);

63
64
	ParticipantSet getParticipantList();

65
66
	std::string getRecFileId(){ return getConfID(); }

67
68
    private:  

69
        /** Unique ID of the conference */
70
71
        CallID _id;

72
73
	ConferenceState _confState;

74
75
76
        ParticipantSet _participants;

        int _nbParticipant;
77

78
79
};

80
81
// Conference::count = 0;

82
#endif