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:
Corey Farrell
2015-05-02 19:58:40 -04:00
parent 9888562c8c
commit ad6ea29697
6 changed files with 20 additions and 24 deletions

View File

@@ -3905,6 +3905,26 @@ enum ama_flags ast_channel_string2amaflag(const char *flag);
*/
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 */
/*! \brief Set the channel name */
void ast_channel_name_set(struct ast_channel *chan, const char *name);