conference.h 1.71 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
24
/*
 *  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>

#include "call.h"
25
26
27
28

// class ManagerImpl;
// class Call;

29
typedef std::string ConfID;
30
31
32
33
34
35
36

typedef std::set<CallID> ParticipantSet;

class Conference{

    public:

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

39
40
41
	static int count;

        Conference();
42
43
44

        ~Conference();

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

47
48
49
50
51
52
	int getState();

	void setState(ConferenceState state);

	std::string getStateStr();

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

	void add(CallID participant_id);

	void remove(CallID participant_id);

59
60
	void bindParticipant(CallID participant_id);

61
62
	ParticipantSet getParticipantList();

63
64
    private:  

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

68
69
	ConferenceState _confState;

70
71
72
73
74
        ParticipantSet _participants;

        int _nbParticipant;
};

75
76
// Conference::count = 0;

77
#endif