summaryrefslogtreecommitdiff
path: root/include/asterisk/smdi.h
diff options
context:
space:
mode:
authorKevin P. Fleming <kpfleming@digium.com>2009-06-15 16:07:23 +0000
committerKevin P. Fleming <kpfleming@digium.com>2009-06-15 16:07:23 +0000
commit6c5987811c7c3decff795e46f5b371fa931475fe (patch)
tree890da581f24a2e3e5d3947988627e6a294bed01d /include/asterisk/smdi.h
parentd224f78dd552131c387d1ccb8dae33d7883ea3a6 (diff)
Redesigned 'optional API' support.
This patch provides a new implementation of the optional API support defined in asterisk/optional_api.h; this new version provides solves compatibility issues with the use of linker version scripts for suppressing global symbols. In addition, there is now a functional (and tested!) implementation for Mac OS/X, so module writers no longer need to use special tests before calling optional API functions. All future implementations must provide these same semantics, so that module writers can rely on them. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@200519 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'include/asterisk/smdi.h')
-rw-r--r--include/asterisk/smdi.h57
1 files changed, 35 insertions, 22 deletions
diff --git a/include/asterisk/smdi.h b/include/asterisk/smdi.h
index 9dbec6288..9d80c9071 100644
--- a/include/asterisk/smdi.h
+++ b/include/asterisk/smdi.h
@@ -85,8 +85,9 @@ struct ast_smdi_md_message {
*/
struct ast_smdi_interface;
-AST_OPTIONAL_API(void, ast_smdi_interface_unref, (struct ast_smdi_interface
- *iface), { return; });
+AST_OPTIONAL_API(void, ast_smdi_interface_unref,
+ (struct ast_smdi_interface *iface),
+ { return; });
/*!
* \brief Get the next SMDI message from the queue.
@@ -98,8 +99,9 @@ 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; });
+AST_OPTIONAL_API(struct ast_smdi_md_message *, ast_smdi_md_message_pop,
+ (struct ast_smdi_interface *iface),
+ { return NULL; });
/*!
* \brief Get the next SMDI message from the queue.
@@ -114,7 +116,8 @@ AST_OPTIONAL_API(struct ast_smdi_md_message *, ast_smdi_md_message_pop, (struct
* 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_interface *iface, int timeout),
+ { return NULL; });
/*!
* \brief Put an SMDI message back in the front of the queue.
@@ -125,8 +128,9 @@ 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; });
+AST_OPTIONAL_API(void, ast_smdi_md_message_putback,
+ (struct ast_smdi_interface *iface, struct ast_smdi_md_message *msg),
+ { return; });
/*!
* \brief Get the next SMDI message from the queue.
@@ -139,7 +143,8 @@ 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_interface *iface),
+ { return NULL; });
/*!
* \brief Get the next SMDI message from the queue.
@@ -154,10 +159,12 @@ AST_OPTIONAL_API(struct ast_smdi_mwi_message *, ast_smdi_mwi_message_pop,
* 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_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; });
/*!
* \brief Put an SMDI message back in the front of the queue.
@@ -168,8 +175,9 @@ 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; });
+AST_OPTIONAL_API(void, ast_smdi_mwi_message_putback,
+ (struct ast_smdi_interface *iface, struct ast_smdi_mwi_message *msg),
+ { return; });
/*!
* \brief Find an SMDI interface with the specified name.
@@ -180,30 +188,35 @@ AST_OPTIONAL_API(void, ast_smdi_mwi_message_putback, (struct ast_smdi_interface
* #ASTOBJ_UNREF(iface, ast_smdi_interface_destroy).
*/
AST_OPTIONAL_API(struct ast_smdi_interface *, ast_smdi_interface_find,
- (const char *iface_name), { return NULL; });
+ (const char *iface_name),
+ { return NULL; });
/*!
* \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; });
+AST_OPTIONAL_API(int, ast_smdi_mwi_set,
+ (struct ast_smdi_interface *iface, const char *mailbox),
+ { return -1; });
/*!
* \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; });
+AST_OPTIONAL_API(int, ast_smdi_mwi_unset,
+ (struct ast_smdi_interface *iface, const char *mailbox),
+ { return -1; });
/*! \brief ast_smdi_md_message destructor. */
AST_OPTIONAL_API(void, ast_smdi_md_message_destroy,
- (struct ast_smdi_md_message *msg), { return; });
+ (struct ast_smdi_md_message *msg),
+ { return; });
/*! \brief ast_smdi_mwi_message destructor. */
-AST_OPTIONAL_API(void, ast_smdi_mwi_message_destroy, (struct
- ast_smdi_mwi_message *msg), { return; });
+AST_OPTIONAL_API(void, ast_smdi_mwi_message_destroy,
+ (struct ast_smdi_mwi_message *msg),
+ { return; });
#endif /* !ASTERISK_SMDI_H */