Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
savoirfairelinux
jami-daemon
Commits
d64a2ebf
Commit
d64a2ebf
authored
Aug 05, 2009
by
Alexandre Savard
Browse files
[#1883] Add a simple Conference class
parent
fcd3978f
Changes
4
Hide whitespace changes
Inline
Side-by-side
sflphone-common/src/Makefile.am
View file @
d64a2ebf
...
...
@@ -27,8 +27,9 @@ sflphoned_SOURCES = \
eventthread.cpp
\
sipaccount.cpp
\
accountcreator.cpp
\
sipvoiplink.cpp
\
sipvoiplink.cpp
\
call.cpp
\
conference.cpp
\
account.cpp
\
sipcall.cpp
\
sdp.cpp
\
...
...
@@ -59,7 +60,7 @@ sflphoned_LDFLAGS= -luuid
noinst_LTLIBRARIES
=
libsflphone.la
noinst_HEADERS
=
\
voiplink.h
\
voiplink.h
\
managerimpl.h
\
manager.h
\
global.h
\
...
...
@@ -70,8 +71,9 @@ noinst_HEADERS = \
account.h
\
sipaccount.h
\
accountcreator.h
\
sipvoiplink.h
\
sipvoiplink.h
\
call.h
\
conference.h
\
sipcall.h
\
sdp.h
\
sdpmedia.h
\
...
...
sflphone-common/src/audio/mainbuffer.cpp
View file @
d64a2ebf
/*
* Copyright (C) 200
4-2005
Savoir-Faire Linux inc.
* Copyright (C) 200
9
Savoir-Faire Linux inc.
* Author : Alexandre Savard <alexandre.savard@savoirfairelinux.com>
*
*
...
...
sflphone-common/src/conference.cpp
0 → 100644
View file @
d64a2ebf
/*
* 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.
*/
#include
"conference.h"
#include
"manager.h"
Conference
::
Conference
()
{
_nbParticipant
=
0
;
}
Conference
::~
Conference
()
{
}
void
Conference
::
add
(
CallID
participant_id
)
{
if
(
_nbParticipant
>=
1
)
{
ParticipantSet
::
iterator
iter
;
for
(
iter
=
_participants
.
begin
();
iter
!=
_participants
.
end
();
iter
++
)
Manager
::
instance
().
getAudioDriver
()
->
getMainBuffer
()
->
bindCallID
(
participant_id
,
*
iter
);
}
_participants
.
insert
(
participant_id
);
_nbParticipant
++
;
}
void
Conference
::
remove
(
CallID
participant_id
)
{
if
(
_nbParticipant
>=
1
)
{
ParticipantSet
::
iterator
iter
=
_participants
.
begin
();
for
(
iter
=
_participants
.
begin
();
iter
!=
_participants
.
end
();
iter
++
)
Manager
::
instance
().
getAudioDriver
()
->
getMainBuffer
()
->
bindCallID
(
participant_id
,
*
iter
);
}
_participants
.
erase
(
participant_id
);
_nbParticipant
--
;
}
sflphone-common/src/conference.h
0 → 100644
View file @
d64a2ebf
/*
* 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"
#include
"manager.h"
#include
"audio/audiolayer.h"
typedef
std
::
set
<
CallID
>
ParticipantSet
;
class
Conference
{
public:
Conference
();
~
Conference
();
int
getNbParticipants
()
{
return
_nbParticipant
;
}
void
add
(
CallID
participant_id
);
void
remove
(
CallID
participant_id
);
private:
/** Unique ID of the call */
CallID
_id
;
ParticipantSet
_participants
;
int
_nbParticipant
;
};
#endif
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment