Asterisk - The Open Source Telephony Project GIT-master-a358458
conf_state_inactive.c
Go to the documentation of this file.
1/*
2 * Asterisk -- An open source telephony toolkit.
3 *
4 * Copyright (C) 2012, Terry Wilson
5 *
6 * Terry Wilson <twilson@digium.com>
7 *
8 * See http://www.asterisk.org for more information about
9 * the Asterisk project. Please do not directly contact
10 * any of the maintainers of this project for assistance;
11 * the project provides a web site, mailing lists and IRC
12 * channels for your use.
13 *
14 * This program is free software, distributed under the terms of
15 * the GNU General Public License Version 2. See the LICENSE file
16 * at the top of the source tree.
17 */
18
19/*! \file
20 *
21 * \brief Confbridge state handling for the INACTIVE state
22 *
23 * \author\verbatim Terry Wilson <twilson@digium.com> \endverbatim
24 *
25 * \ingroup applications
26 */
27
28/*** MODULEINFO
29 <support_level>core</support_level>
30 ***/
31
32#include "include/confbridge.h"
33#include "include/conf_state.h"
34
35static void join_unmarked(struct confbridge_user *user);
36static void join_marked(struct confbridge_user *user);
37static void leave_waitmarked(struct confbridge_user *user);
38
40 .name = "INACTIVE",
41 .join_unmarked = join_unmarked,
42 .join_waitmarked = conf_default_join_waitmarked,
43 .join_marked = join_marked,
44 .leave_waitmarked = leave_waitmarked,
45};
47
49{
50 conf_add_user_active(user->conference, user);
52
54}
55
56static void join_marked(struct confbridge_user *user)
57{
58 conf_add_user_marked(user->conference, user);
60
62}
63
65{
67 if (user->conference->waitingusers == 0) {
69 }
70}
int conf_handle_only_person(struct confbridge_user *user)
Handle actions whenever an user joins an empty conference.
void conf_add_user_active(struct confbridge_conference *conference, struct confbridge_user *user)
Add a conference bridge user as an unmarked active user of the conference.
void conf_add_user_marked(struct confbridge_conference *conference, struct confbridge_user *user)
Add a conference bridge user as a marked active user of the conference.
void conf_update_user_mute(struct confbridge_user *user)
Update the actual mute status of the user and set it on the bridge.
int conf_add_post_join_action(struct confbridge_user *user, int(*func)(struct confbridge_user *user))
Queue a function to run with the given conference bridge user as an argument once the state transitio...
void conf_default_leave_waitmarked(struct confbridge_user *user)
Logic to execute every time a waitmarked user leaves an unmarked conference.
Definition: conf_state.c:69
void conf_change_state(struct confbridge_user *user, struct confbridge_state *newstate)
Execute conference state transition because of a user action.
Definition: conf_state.c:77
void conf_default_join_waitmarked(struct confbridge_user *user)
Logic to execute every time a waitmarked user joins an unmarked conference.
Definition: conf_state.c:62
Confbridge state handling.
struct confbridge_state * CONF_STATE_EMPTY
Conference state with no active or waiting users.
static void leave_waitmarked(struct confbridge_user *user)
static void join_unmarked(struct confbridge_user *user)
struct confbridge_state STATE_INACTIVE
struct confbridge_state * CONF_STATE_INACTIVE
Conference state with only waiting users.
static void join_marked(struct confbridge_user *user)
struct confbridge_state * CONF_STATE_MULTI_MARKED
Conference state with multiple active users and at least one marked user.
struct confbridge_state * CONF_STATE_SINGLE
Conference state with only a single unmarked active user.
A conference state object to hold the various state callback functions.
Definition: conf_state.h:45
const char * name
Definition: conf_state.h:46
The structure that represents a conference bridge user.
Definition: confbridge.h:273
structure to hold users read from users.conf