Files
asterisk/apps/confbridge/conf_state_multi.c
Naveen Albert cf0f1829fb general: Remove obsolete SVN references.
There are a handful of files in the tree that
reference an SVN link for the coding guidelines.

This removes these because the links are dead
and the vast majority of source files do not
contain these links, so this is more consistent.

app_skel still maintains an (up to date) link
to the coding guidelines.

ASTERISK-30159 #close

Change-Id: I35bbb20f66982e98099cff3029ede20091ffdac7
2022-08-01 11:06:37 -05:00

70 lines
1.8 KiB
C

/*
* Asterisk -- An open source telephony toolkit.
*
* Copyright (C) 2012, Terry Wilson
*
* Terry Wilson <twilson@digium.com>
*
* See http://www.asterisk.org for more information about
* the Asterisk project. Please do not directly contact
* any of the maintainers of this project for assistance;
* the project provides a web site, mailing lists and IRC
* channels for your use.
*
* This program is free software, distributed under the terms of
* the GNU General Public License Version 2. See the LICENSE file
* at the top of the source tree.
*/
/*! \file
*
* \brief Confbridge state handling for the MULTI state
*
* \author\verbatim Terry Wilson <twilson@digium.com> \endverbatim
*
* \ingroup applications
*/
/*** MODULEINFO
<support_level>core</support_level>
***/
#include "include/confbridge.h"
#include "include/conf_state.h"
static void join_unmarked(struct confbridge_user *user);
static void join_marked(struct confbridge_user *user);
static void leave_unmarked(struct confbridge_user *user);
struct confbridge_state STATE_MULTI = {
.name = "MULTI",
.join_unmarked = join_unmarked,
.join_waitmarked = conf_default_join_waitmarked,
.join_marked = join_marked,
.leave_unmarked = leave_unmarked,
.leave_waitmarked = conf_default_leave_waitmarked,
};
struct confbridge_state *CONF_STATE_MULTI = &STATE_MULTI;
static void join_unmarked(struct confbridge_user *user)
{
conf_add_user_active(user->conference, user);
conf_update_user_mute(user);
}
static void join_marked(struct confbridge_user *user)
{
conf_add_user_marked(user->conference, user);
conf_update_user_mute(user);
conf_change_state(user, CONF_STATE_MULTI_MARKED);
}
static void leave_unmarked(struct confbridge_user *user)
{
conf_remove_user_active(user->conference, user);
if (user->conference->activeusers == 1) {
conf_change_state(user, CONF_STATE_SINGLE);
}
}