conference.h 1.76 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
23
/*
 *  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>

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

// class ManagerImpl;
// class Call;

30
typedef std::string ConfID;
31
32
33

typedef std::set<CallID> ParticipantSet;

34
class Conference: public Recordable{
35
36
37

    public:

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

40
41
42
	static int count;

        Conference();
43
44
45

        ~Conference();

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

48
49
50
51
52
53
	int getState();

	void setState(ConferenceState state);

	std::string getStateStr();

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

	void add(CallID participant_id);

	void remove(CallID participant_id);

60
61
	void bindParticipant(CallID participant_id);

62
63
	ParticipantSet getParticipantList();

64
65
    private:  

66
        /** Unique ID of the conference */
67
68
        CallID _id;

69
70
	ConferenceState _confState;

71
72
73
        ParticipantSet _participants;

        int _nbParticipant;
74

75
76
};

77
78
// Conference::count = 0;

79
#endif