Asterisk - The Open Source Telephony Project  18.5.0
Public Member Functions | Data Fields
ast_bridge_technology Struct Reference

Structure that is the essence of a bridge technology. More...

#include <bridge_technology.h>

Collaboration diagram for ast_bridge_technology:
Collaboration graph
[legend]

Public Member Functions

 AST_RWLIST_ENTRY (ast_bridge_technology) entry
 

Data Fields

uint32_t capabilities
 
int(* compatible )(struct ast_bridge *bridge)
 Check if a bridge is compatible with the bridging technology. More...
 
int(* create )(struct ast_bridge *bridge)
 Create a bridge technology instance for a bridge. More...
 
void(* destroy )(struct ast_bridge *bridge)
 Destroy a bridging technology instance for a bridge. More...
 
int(* join )(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
 Add a channel to a bridging technology instance for a bridge. More...
 
void(* leave )(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
 Remove a channel from a bridging technology instance for a bridge. More...
 
struct ast_modulemod
 
const char * name
 
enum ast_bridge_preference preference
 
int(* start )(struct ast_bridge *bridge)
 Request a bridge technology instance start operations. More...
 
void(* stop )(struct ast_bridge *bridge)
 Request a bridge technology instance stop in preparation for being destroyed. More...
 
void(* stream_topology_changed )(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
 Callback for when a stream topology changes on the channel. More...
 
int(* stream_topology_request_change )(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
 Callback for when a request has been made to change a stream topology on a channel. More...
 
void(* suspend )(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
 Suspend a channel on a bridging technology instance for a bridge. More...
 
unsigned int suspended:1
 
void(* unsuspend )(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)
 Unsuspend a channel on a bridging technology instance for a bridge. More...
 
int(* write )(struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, struct ast_frame *frame)
 Write a frame into the bridging technology instance for a bridge. More...
 

Detailed Description

Structure that is the essence of a bridge technology.

Definition at line 61 of file bridge_technology.h.

Member Function Documentation

◆ AST_RWLIST_ENTRY()

AST_RWLIST_ENTRY ( ast_bridge_technology  )

Linked list information

Field Documentation

◆ capabilities

uint32_t capabilities

◆ compatible

int(* compatible) (struct ast_bridge *bridge)

Check if a bridge is compatible with the bridging technology.

Return values
0if not compatible
non-zeroif compatible
Note
On entry, bridge may or may not already be locked. However, it can be accessed as if it were locked.

Definition at line 149 of file bridge_technology.h.

Referenced by find_best_technology(), and smart_bridge_operation().

◆ create

int(* create) (struct ast_bridge *bridge)

Create a bridge technology instance for a bridge.

Return values
0on success
-1on failure
Note
On entry, bridge may or may not already be locked. However, it can be accessed as if it were locked.

Definition at line 78 of file bridge_technology.h.

Referenced by smart_bridge_operation().

◆ destroy

void(* destroy) (struct ast_bridge *bridge)

Destroy a bridging technology instance for a bridge.

Note
On entry, bridge must NOT be locked.

Definition at line 100 of file bridge_technology.h.

Referenced by bridge_tech_deferred_destroy(), destroy_bridge(), and smart_bridge_operation().

◆ join

int(* join) (struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)

Add a channel to a bridging technology instance for a bridge.

Return values
0on success
-1on failure
Note
On entry, bridge is already locked.
The bridge technology must tolerate a failed to join channel until it can be kicked from the bridge.
A channel may be in a suspended state already when joining a bridge technology. The technology must handle this case.
A channel may not be answered when joining a bridge technology.

Definition at line 117 of file bridge_technology.h.

Referenced by bridge_channel_complete_join().

◆ leave

void(* leave) (struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)

Remove a channel from a bridging technology instance for a bridge.

Note
On entry, bridge is already locked.
Do not make assumptions about the number of channels in the bridge when this callback is called. When a channel is swapped into a bridge for another channel, the leave callback is called after the new channel has been added to the bridge.

Definition at line 127 of file bridge_technology.h.

Referenced by bridge_channel_internal_pull(), and smart_bridge_operation().

◆ mod

struct ast_module* mod

Module this bridge technology belongs to. It is used for reference counting bridges using the technology.

Definition at line 196 of file bridge_technology.h.

Referenced by __ast_bridge_technology_register(), bridge_tech_deferred_destroy(), destroy_bridge(), find_best_technology(), and smart_bridge_operation().

◆ name

const char* name

◆ preference

enum ast_bridge_preference preference

Preference level that should be used when determining whether to use this bridge technology or not

Definition at line 68 of file bridge_technology.h.

Referenced by __ast_bridge_technology_register(), find_best_technology(), handle_bridge_technology_show(), and manager_bridge_tech_list().

◆ start

int(* start) (struct ast_bridge *bridge)

Request a bridge technology instance start operations.

Return values
0on success
-1on failure
Note
On entry, bridge may or may not already be locked. However, it can be accessed as if it were locked.

Definition at line 88 of file bridge_technology.h.

Referenced by smart_bridge_operation().

◆ stop

void(* stop) (struct ast_bridge *bridge)

Request a bridge technology instance stop in preparation for being destroyed.

Note
On entry, bridge is already locked.

Definition at line 94 of file bridge_technology.h.

Referenced by destroy_bridge(), and smart_bridge_operation().

◆ stream_topology_changed

void(* stream_topology_changed) (struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)

Callback for when a stream topology changes on the channel.

This is called when a bridge receives an indication that a topology has been changed on a channel and the new topology has been mapped to the bridge. A bridge technology should define a handler for this callback if it needs to update internals due to a channel's topology changing.

Note
On entry, bridge is already locked.

Definition at line 192 of file bridge_technology.h.

Referenced by bridge_channel_complete_join(), and bridge_handle_trip().

◆ stream_topology_request_change

int(* stream_topology_request_change) (struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)

Callback for when a request has been made to change a stream topology on a channel.

This is called when a bridge receives a request to change the topology on the channel. A bridge technology should define a handler for this callback if it needs to update internals or intercept the request and not pass it on to other channels. This can be done by returning a nonzero value.

Return values
0Frame can pass to the bridge technology.
non-zeroFrame intercepted by the bridge technology.
Note
On entry, bridge is already locked.

Definition at line 179 of file bridge_technology.h.

Referenced by bridge_handle_trip().

◆ suspend

void(* suspend) (struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)

Suspend a channel on a bridging technology instance for a bridge.

Note
On entry, bridge is already locked.

Definition at line 133 of file bridge_technology.h.

Referenced by bridge_channel_internal_suspend_nolock().

◆ suspended

unsigned int suspended

TRUE if the bridge technology is currently suspended.

Definition at line 194 of file bridge_technology.h.

Referenced by ast_bridge_technology_suspend(), ast_bridge_technology_unsuspend(), find_best_technology(), handle_bridge_technology_show(), and manager_bridge_tech_list().

◆ unsuspend

void(* unsuspend) (struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel)

Unsuspend a channel on a bridging technology instance for a bridge.

Note
On entry, bridge is already locked.

Definition at line 139 of file bridge_technology.h.

Referenced by bridge_channel_internal_unsuspend_nolock().

◆ write

int(* write) (struct ast_bridge *bridge, struct ast_bridge_channel *bridge_channel, struct ast_frame *frame)

Write a frame into the bridging technology instance for a bridge.

Note
The bridge must be tolerant of bridge_channel being NULL.
Return values
0Frame accepted into the bridge.
-1Frame needs to be deferred.
Note
On entry, bridge is already locked.
Deferred frames will be automatically queued onto the channel when another channel joins the bridge.

Definition at line 163 of file bridge_technology.h.

Referenced by __ast_bridge_technology_register(), bridge_channel_settle_owed_events(), bridge_channel_write_frame(), and MultiOrderedConfigParser::write().


The documentation for this struct was generated from the following file: