mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-06 01:45:11 +00:00
Refactor extraneous channel events
This change removes JitterBufStats, ChannelReload, and ChannelUpdate and refactors the following events to travel over Stasis-Core: * LocalBridge * DAHDIChannel * AlarmClear * SpanAlarmClear * Alarm * SpanAlarm * DNDState * MCID * SIPQualifyPeerDone * SessionTimeout Review: https://reviewboard.asterisk.org/r/2627/ (closes issue ASTERISK-21476) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@393284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -906,6 +906,18 @@ struct ast_json_payload {
|
||||
*/
|
||||
struct ast_json_payload *ast_json_payload_create(struct ast_json *json);
|
||||
|
||||
struct ast_party_id;
|
||||
/*!
|
||||
* \brief Construct an ast_party_id as JSON.
|
||||
* \since 12.0.0
|
||||
*
|
||||
* \param party The party ID to represent as JSON.
|
||||
*
|
||||
* \return JSON object with \c name, \c number and \c subaddress objects
|
||||
* for those that are valid in the party ID
|
||||
*/
|
||||
struct ast_json *ast_json_party_id(struct ast_party_id *party);
|
||||
|
||||
/*!@}*/
|
||||
|
||||
#endif /* _ASTERISK_JSON_H */
|
||||
|
||||
@@ -735,6 +735,32 @@ void stasis_log_bad_type_access(const char *name);
|
||||
return _priv_ ## name; \
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Boiler-plate removing macro for defining local message types.
|
||||
*
|
||||
* \code
|
||||
* STASIS_MESSAGE_TYPE_DEFN_LOCAL(ast_foo_type,
|
||||
* .to_ami = foo_to_ami,
|
||||
* .to_json = foo_to_json,
|
||||
* );
|
||||
* \endcode
|
||||
*
|
||||
* \param name Name of message type.
|
||||
* \param ... Virtual table methods for messages of this type.
|
||||
* \since 12
|
||||
*/
|
||||
#define STASIS_MESSAGE_TYPE_DEFN_LOCAL(name, ...) \
|
||||
static struct stasis_message_vtable _priv_ ## name ## _v = { \
|
||||
__VA_ARGS__ \
|
||||
}; \
|
||||
static struct stasis_message_type *_priv_ ## name; \
|
||||
static struct stasis_message_type *name(void) { \
|
||||
if (_priv_ ## name == NULL) { \
|
||||
stasis_log_bad_type_access(#name); \
|
||||
} \
|
||||
return _priv_ ## name; \
|
||||
}
|
||||
|
||||
/*!
|
||||
* \brief Boiler-plate removing macro for initializing message types.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user