mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 12:16:00 +00:00
Remove unneeded uses of optional_api providers.
A few cases exist where headers of optional_api provders are included but not needed. This causes unneeded calls to ast_optional_api_use. * Don't include optional_api.h from sip_api.h. * Move 'struct ast_channel_monitor' to channel.h. * Don't include monitor.h from chan_sip.c, channel.c or features.c. The move of struct ast_channel_monitor is needed since channel.c depends on it. This has no effect on users of monitor.h since channel.h is included from monitor.h. ASTERISK-25051 #close Reported by: Corey Farrell Change-Id: I53ea65a9fc9693c89f8bcfd6120649bfcfbc3478
This commit is contained in:
@@ -254,7 +254,6 @@ ASTERISK_REGISTER_FILE()
|
|||||||
#include "asterisk/astobj2.h"
|
#include "asterisk/astobj2.h"
|
||||||
#include "asterisk/dnsmgr.h"
|
#include "asterisk/dnsmgr.h"
|
||||||
#include "asterisk/devicestate.h"
|
#include "asterisk/devicestate.h"
|
||||||
#include "asterisk/monitor.h"
|
|
||||||
#include "asterisk/netsock2.h"
|
#include "asterisk/netsock2.h"
|
||||||
#include "asterisk/localtime.h"
|
#include "asterisk/localtime.h"
|
||||||
#include "asterisk/abstract_jb.h"
|
#include "asterisk/abstract_jb.h"
|
||||||
|
@@ -3885,6 +3885,26 @@ enum ama_flags ast_channel_string2amaflag(const char *flag);
|
|||||||
*/
|
*/
|
||||||
const char *ast_channel_amaflags2string(enum ama_flags flags);
|
const char *ast_channel_amaflags2string(enum ama_flags flags);
|
||||||
|
|
||||||
|
enum AST_MONITORING_STATE {
|
||||||
|
AST_MONITOR_RUNNING,
|
||||||
|
AST_MONITOR_PAUSED
|
||||||
|
};
|
||||||
|
|
||||||
|
/*! Responsible for channel monitoring data */
|
||||||
|
struct ast_channel_monitor {
|
||||||
|
struct ast_filestream *read_stream;
|
||||||
|
struct ast_filestream *write_stream;
|
||||||
|
char read_filename[FILENAME_MAX];
|
||||||
|
char write_filename[FILENAME_MAX];
|
||||||
|
char filename_base[FILENAME_MAX];
|
||||||
|
char beep_id[64];
|
||||||
|
int filename_changed;
|
||||||
|
char *format;
|
||||||
|
int joinfiles;
|
||||||
|
enum AST_MONITORING_STATE state;
|
||||||
|
int (*stop)(struct ast_channel *chan, int need_lock);
|
||||||
|
};
|
||||||
|
|
||||||
/* ACCESSOR FUNTIONS */
|
/* ACCESSOR FUNTIONS */
|
||||||
/*! \brief Set the channel name */
|
/*! \brief Set the channel name */
|
||||||
void ast_channel_name_set(struct ast_channel *chan, const char *name);
|
void ast_channel_name_set(struct ast_channel *chan, const char *name);
|
||||||
|
@@ -26,31 +26,11 @@
|
|||||||
#include "asterisk/channel.h"
|
#include "asterisk/channel.h"
|
||||||
#include "asterisk/optional_api.h"
|
#include "asterisk/optional_api.h"
|
||||||
|
|
||||||
enum AST_MONITORING_STATE {
|
|
||||||
AST_MONITOR_RUNNING,
|
|
||||||
AST_MONITOR_PAUSED
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Streams recording control */
|
/* Streams recording control */
|
||||||
#define X_REC_IN 1
|
#define X_REC_IN 1
|
||||||
#define X_REC_OUT 2
|
#define X_REC_OUT 2
|
||||||
#define X_JOIN 4
|
#define X_JOIN 4
|
||||||
|
|
||||||
/*! Responsible for channel monitoring data */
|
|
||||||
struct ast_channel_monitor {
|
|
||||||
struct ast_filestream *read_stream;
|
|
||||||
struct ast_filestream *write_stream;
|
|
||||||
char read_filename[FILENAME_MAX];
|
|
||||||
char write_filename[FILENAME_MAX];
|
|
||||||
char filename_base[FILENAME_MAX];
|
|
||||||
char beep_id[64];
|
|
||||||
int filename_changed;
|
|
||||||
char *format;
|
|
||||||
int joinfiles;
|
|
||||||
enum AST_MONITORING_STATE state;
|
|
||||||
int (*stop)(struct ast_channel *chan, int need_lock);
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Start monitoring a channel */
|
/* Start monitoring a channel */
|
||||||
AST_OPTIONAL_API(int, ast_monitor_start,
|
AST_OPTIONAL_API(int, ast_monitor_start,
|
||||||
(struct ast_channel *chan, const char *format_spec,
|
(struct ast_channel *chan, const char *format_spec,
|
||||||
|
@@ -23,7 +23,6 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "asterisk/optional_api.h"
|
|
||||||
#include "asterisk/config.h"
|
#include "asterisk/config.h"
|
||||||
|
|
||||||
#define AST_SIP_API_VERSION 1
|
#define AST_SIP_API_VERSION 1
|
||||||
|
@@ -53,7 +53,6 @@ ASTERISK_REGISTER_FILE()
|
|||||||
#include "asterisk/chanvars.h"
|
#include "asterisk/chanvars.h"
|
||||||
#include "asterisk/linkedlists.h"
|
#include "asterisk/linkedlists.h"
|
||||||
#include "asterisk/indications.h"
|
#include "asterisk/indications.h"
|
||||||
#include "asterisk/monitor.h"
|
|
||||||
#include "asterisk/causes.h"
|
#include "asterisk/causes.h"
|
||||||
#include "asterisk/callerid.h"
|
#include "asterisk/callerid.h"
|
||||||
#include "asterisk/utils.h"
|
#include "asterisk/utils.h"
|
||||||
|
@@ -66,7 +66,6 @@ ASTERISK_REGISTER_FILE()
|
|||||||
#include "asterisk/utils.h"
|
#include "asterisk/utils.h"
|
||||||
#include "asterisk/adsi.h"
|
#include "asterisk/adsi.h"
|
||||||
#include "asterisk/devicestate.h"
|
#include "asterisk/devicestate.h"
|
||||||
#include "asterisk/monitor.h"
|
|
||||||
#include "asterisk/audiohook.h"
|
#include "asterisk/audiohook.h"
|
||||||
#include "asterisk/global_datastores.h"
|
#include "asterisk/global_datastores.h"
|
||||||
#include "asterisk/astobj2.h"
|
#include "asterisk/astobj2.h"
|
||||||
|
Reference in New Issue
Block a user