Asterisk - The Open Source Telephony Project  18.5.0
Functions | Variables
conf_state_inactive.c File Reference

Confbridge state handling for the INACTIVE state. More...

#include "include/confbridge.h"
#include "include/conf_state.h"
Include dependency graph for conf_state_inactive.c:

Go to the source code of this file.

Functions

static void join_marked (struct confbridge_user *user)
 
static void join_unmarked (struct confbridge_user *user)
 
static void leave_waitmarked (struct confbridge_user *user)
 

Variables

struct confbridge_stateCONF_STATE_INACTIVE = &STATE_INACTIVE
 Conference state with only waiting users. More...
 
struct confbridge_state STATE_INACTIVE
 

Detailed Description

Confbridge state handling for the INACTIVE state.

Author
Terry Wilson <[email protected]> 

Definition in file conf_state_inactive.c.

Function Documentation

◆ join_marked()

static void join_marked ( struct confbridge_user user)
static

Definition at line 59 of file conf_state_inactive.c.

References conf_add_user_marked(), conf_change_state(), CONF_STATE_MULTI_MARKED, conf_update_user_mute(), and confbridge_user::conference.

60 {
61  conf_add_user_marked(user->conference, user);
63 
65 }
struct confbridge_conference * conference
Definition: confbridge.h:272
void conf_update_user_mute(struct confbridge_user *user)
Update the actual mute status of the user and set it on the bridge.
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.
struct confbridge_state * CONF_STATE_MULTI_MARKED
Conference state with multiple active users and at least one marked user.
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:82

◆ join_unmarked()

static void join_unmarked ( struct confbridge_user user)
static

Definition at line 51 of file conf_state_inactive.c.

References conf_add_post_join_action(), conf_add_user_active(), conf_change_state(), conf_handle_only_person(), CONF_STATE_SINGLE, and confbridge_user::conference.

52 {
53  conf_add_user_active(user->conference, user);
55 
57 }
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.
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...
struct confbridge_conference * conference
Definition: confbridge.h:272
int conf_handle_only_person(struct confbridge_user *user)
Handle actions whenever an user joins an empty conference.
struct confbridge_state * CONF_STATE_SINGLE
Conference state with only a single unmarked active user.
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:82

◆ leave_waitmarked()

static void leave_waitmarked ( struct confbridge_user user)
static

Definition at line 67 of file conf_state_inactive.c.

References conf_change_state(), conf_default_leave_waitmarked(), CONF_STATE_EMPTY, confbridge_user::conference, and confbridge_conference::waitingusers.

68 {
70  if (user->conference->waitingusers == 0) {
72  }
73 }
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:74
struct confbridge_conference * conference
Definition: confbridge.h:272
struct confbridge_state * CONF_STATE_EMPTY
Conference state with no active or waiting users.
unsigned int waitingusers
Definition: confbridge.h:251
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:82

Variable Documentation

◆ CONF_STATE_INACTIVE

struct confbridge_state* CONF_STATE_INACTIVE = &STATE_INACTIVE

Conference state with only waiting users.

Definition at line 49 of file conf_state_inactive.c.

Referenced by join_waitmarked(), leave_marked(), and leave_unmarked().

◆ STATE_INACTIVE

struct confbridge_state STATE_INACTIVE

Definition at line 42 of file conf_state_inactive.c.