diff options
Diffstat (limited to 'include/asterisk/smdi.h')
-rw-r--r-- | include/asterisk/smdi.h | 42 |
1 files changed, 14 insertions, 28 deletions
diff --git a/include/asterisk/smdi.h b/include/asterisk/smdi.h index 9dbec6288..d5deb5e0d 100644 --- a/include/asterisk/smdi.h +++ b/include/asterisk/smdi.h @@ -37,7 +37,6 @@ #include "asterisk/config.h" #include "asterisk/module.h" #include "asterisk/astobj.h" -#include "asterisk/optional_api.h" #define SMDI_MESG_DESK_NUM_LEN 3 #define SMDI_MESG_DESK_TERM_LEN 4 @@ -85,8 +84,7 @@ struct ast_smdi_md_message { */ struct ast_smdi_interface; -AST_OPTIONAL_API(void, ast_smdi_interface_unref, (struct ast_smdi_interface - *iface), { return; }); +void ast_smdi_interface_unref(struct ast_smdi_interface *iface) attribute_weak; /*! * \brief Get the next SMDI message from the queue. @@ -98,8 +96,7 @@ AST_OPTIONAL_API(void, ast_smdi_interface_unref, (struct ast_smdi_interface * * \return the next SMDI message, or NULL if there were no pending messages. */ -AST_OPTIONAL_API(struct ast_smdi_md_message *, ast_smdi_md_message_pop, (struct - ast_smdi_interface *iface), { return NULL; }); +struct ast_smdi_md_message *ast_smdi_md_message_pop(struct ast_smdi_interface *iface) attribute_weak; /*! * \brief Get the next SMDI message from the queue. @@ -113,8 +110,7 @@ AST_OPTIONAL_API(struct ast_smdi_md_message *, ast_smdi_md_message_pop, (struct * \return the next SMDI message, or NULL if there were no pending messages and * the timeout has expired. */ -AST_OPTIONAL_API(struct ast_smdi_md_message *, ast_smdi_md_message_wait, - (struct ast_smdi_interface *iface, int timeout), { return NULL; }); +struct ast_smdi_md_message *ast_smdi_md_message_wait(struct ast_smdi_interface *iface, int timeout) attribute_weak; /*! * \brief Put an SMDI message back in the front of the queue. @@ -125,8 +121,7 @@ AST_OPTIONAL_API(struct ast_smdi_md_message *, ast_smdi_md_message_wait, * should be used if a message was popped but is not going to be processed for * some reason, and the message needs to be returned to the queue. */ -AST_OPTIONAL_API(void, ast_smdi_md_message_putback, (struct ast_smdi_interface - *iface, struct ast_smdi_md_message *msg), { return; }); +void ast_smdi_md_message_putback(struct ast_smdi_interface *iface, struct ast_smdi_md_message *msg) attribute_weak; /*! * \brief Get the next SMDI message from the queue. @@ -138,8 +133,7 @@ AST_OPTIONAL_API(void, ast_smdi_md_message_putback, (struct ast_smdi_interface * * \return the next SMDI message, or NULL if there were no pending messages. */ -AST_OPTIONAL_API(struct ast_smdi_mwi_message *, ast_smdi_mwi_message_pop, - (struct ast_smdi_interface *iface), { return NULL; }); +struct ast_smdi_mwi_message *ast_smdi_mwi_message_pop(struct ast_smdi_interface *iface) attribute_weak; /*! * \brief Get the next SMDI message from the queue. @@ -153,11 +147,9 @@ AST_OPTIONAL_API(struct ast_smdi_mwi_message *, ast_smdi_mwi_message_pop, * \return the next SMDI message, or NULL if there were no pending messages and * the timeout has expired. */ -AST_OPTIONAL_API(struct ast_smdi_mwi_message *, ast_smdi_mwi_message_wait, - (struct ast_smdi_interface *iface, int timeout), { return NULL; }); -AST_OPTIONAL_API(struct ast_smdi_mwi_message *, - ast_smdi_mwi_message_wait_station, (struct ast_smdi_interface *iface, int - timeout, const char *station), { return NULL; }); +struct ast_smdi_mwi_message *ast_smdi_mwi_message_wait(struct ast_smdi_interface *iface, int timeout) attribute_weak; +struct ast_smdi_mwi_message *ast_smdi_mwi_message_wait_station(struct ast_smdi_interface *iface, int + timeout, const char *station) attribute_weak; /*! * \brief Put an SMDI message back in the front of the queue. @@ -168,8 +160,7 @@ AST_OPTIONAL_API(struct ast_smdi_mwi_message *, * should be used if a message was popped but is not going to be processed for * some reason, and the message needs to be returned to the queue. */ -AST_OPTIONAL_API(void, ast_smdi_mwi_message_putback, (struct ast_smdi_interface - *iface, struct ast_smdi_mwi_message *msg), { return; }); +void ast_smdi_mwi_message_putback(struct ast_smdi_interface *iface, struct ast_smdi_mwi_message *msg) attribute_weak; /*! * \brief Find an SMDI interface with the specified name. @@ -179,31 +170,26 @@ AST_OPTIONAL_API(void, ast_smdi_mwi_message_putback, (struct ast_smdi_interface * actually returns an ASTOBJ reference and should be released using * #ASTOBJ_UNREF(iface, ast_smdi_interface_destroy). */ -AST_OPTIONAL_API(struct ast_smdi_interface *, ast_smdi_interface_find, - (const char *iface_name), { return NULL; }); +struct ast_smdi_interface *ast_smdi_interface_find(const char *iface_name) attribute_weak; /*! * \brief Set the MWI indicator for a mailbox. * \param iface the interface to use. * \param mailbox the mailbox to use. */ -AST_OPTIONAL_API(int, ast_smdi_mwi_set, (struct ast_smdi_interface *iface, - const char *mailbox), { return -1; }); +int ast_smdi_mwi_set(struct ast_smdi_interface *iface, const char *mailbox) attribute_weak; /*! * \brief Unset the MWI indicator for a mailbox. * \param iface the interface to use. * \param mailbox the mailbox to use. */ -AST_OPTIONAL_API(int, ast_smdi_mwi_unset, (struct ast_smdi_interface *iface, - const char *mailbox), { return -1; }); +int ast_smdi_mwi_unset(struct ast_smdi_interface *iface, const char *mailbox) attribute_weak; /*! \brief ast_smdi_md_message destructor. */ -AST_OPTIONAL_API(void, ast_smdi_md_message_destroy, - (struct ast_smdi_md_message *msg), { return; }); +void ast_smdi_md_message_destroy(struct ast_smdi_md_message *msg) attribute_weak; /*! \brief ast_smdi_mwi_message destructor. */ -AST_OPTIONAL_API(void, ast_smdi_mwi_message_destroy, (struct - ast_smdi_mwi_message *msg), { return; }); +void ast_smdi_mwi_message_destroy(struct ast_smdi_mwi_message *msg) attribute_weak; #endif /* !ASTERISK_SMDI_H */ |