[asterisk-commits] kpfleming: branch kpfleming/new_optional_api r197782 - /team/kpfleming/new_op...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu May 28 15:58:55 CDT 2009
Author: kpfleming
Date: Thu May 28 15:58:51 2009
New Revision: 197782
URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=197782
Log:
clean up formatting
Modified:
team/kpfleming/new_optional_api/include/asterisk/agi.h
team/kpfleming/new_optional_api/include/asterisk/monitor.h
team/kpfleming/new_optional_api/include/asterisk/optional_api.h
team/kpfleming/new_optional_api/include/asterisk/smdi.h
Modified: team/kpfleming/new_optional_api/include/asterisk/agi.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/kpfleming/new_optional_api/include/asterisk/agi.h?view=diff&rev=197782&r1=197781&r2=197782
==============================================================================
--- team/kpfleming/new_optional_api/include/asterisk/agi.h (original)
+++ team/kpfleming/new_optional_api/include/asterisk/agi.h Thu May 28 15:58:51 2009
@@ -72,7 +72,8 @@
* \return 1 on success, 0 if the command is already registered
*
*/
-AST_OPTIONAL_API(int, ast_agi_register, (struct ast_module *mod, agi_command *cmd),
+AST_OPTIONAL_API(int, ast_agi_register,
+ (struct ast_module *mod, agi_command *cmd),
{ return AST_OPTIONAL_API_UNAVAILABLE; });
/*!
@@ -85,7 +86,8 @@
* \return 1 on success, 0 if the command was not already registered
*
*/
-AST_OPTIONAL_API(int, ast_agi_unregister, (struct ast_module *mod, agi_command *cmd),
+AST_OPTIONAL_API(int, ast_agi_unregister,
+ (struct ast_module *mod, agi_command *cmd),
{ return AST_OPTIONAL_API_UNAVAILABLE; });
/*!
@@ -103,7 +105,8 @@
* will be unregistered. In other words, this function registers all the provided commands, or none
* of them.
*/
-AST_OPTIONAL_API(int, ast_agi_register_multiple, (struct ast_module *mod, struct agi_command *cmd, unsigned int len),
+AST_OPTIONAL_API(int, ast_agi_register_multiple,
+ (struct ast_module *mod, struct agi_command *cmd, unsigned int len),
{ return AST_OPTIONAL_API_UNAVAILABLE; });
/*!
@@ -120,7 +123,8 @@
* \note If any command fails to unregister, this function will continue to unregister the
* remaining commands in the array; it will not reregister the already-unregistered commands.
*/
-AST_OPTIONAL_API(int, ast_agi_unregister_multiple, (struct ast_module *mod, struct agi_command *cmd, unsigned int len),
+AST_OPTIONAL_API(int, ast_agi_unregister_multiple,
+ (struct ast_module *mod, struct agi_command *cmd, unsigned int len),
{ return AST_OPTIONAL_API_UNAVAILABLE; });
/*!
@@ -134,7 +138,8 @@
* \return 0 for success, -1 for failure, AST_OPTIONAL_API_UNAVAILABLE if res_agi is not loaded
*
*/
-AST_OPTIONAL_API_ATTR(int, format(printf, 3, 4), ast_agi_send, (int fd, struct ast_channel *chan, char *fmt, ...),
+AST_OPTIONAL_API_ATTR(int, format(printf, 3, 4), ast_agi_send,
+ (int fd, struct ast_channel *chan, char *fmt, ...),
{ return AST_OPTIONAL_API_UNAVAILABLE; });
#if defined(__cplusplus) || defined(c_plusplus)
Modified: team/kpfleming/new_optional_api/include/asterisk/monitor.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/kpfleming/new_optional_api/include/asterisk/monitor.h?view=diff&rev=197782&r1=197781&r2=197782
==============================================================================
--- team/kpfleming/new_optional_api/include/asterisk/monitor.h (original)
+++ team/kpfleming/new_optional_api/include/asterisk/monitor.h Thu May 28 15:58:51 2009
@@ -51,27 +51,34 @@
};
/* Start monitoring a channel */
-AST_OPTIONAL_API(int, ast_monitor_start, (struct ast_channel *chan, const char
- *format_spec, const char *fname_base, int need_lock, int stream_action),
- { return -1; });
+AST_OPTIONAL_API(int, ast_monitor_start,
+ (struct ast_channel *chan, const char *format_spec,
+ const char *fname_base, int need_lock, int stream_action),
+ { return -1; });
/* Stop monitoring a channel */
-AST_OPTIONAL_API(int, ast_monitor_stop, (struct ast_channel *chan, int
- need_lock), { return -1; });
+AST_OPTIONAL_API(int, ast_monitor_stop,
+ (struct ast_channel *chan, int need_lock),
+ { return -1; });
/* Change monitoring filename of a channel */
-AST_OPTIONAL_API(int, ast_monitor_change_fname, (struct ast_channel *chan,
- const char *fname_base, int need_lock), { return -1; });
+AST_OPTIONAL_API(int, ast_monitor_change_fname,
+ (struct ast_channel *chan, const char *fname_base,
+ int need_lock),
+ { return -1; });
-AST_OPTIONAL_API(void, ast_monitor_setjoinfiles, (struct ast_channel *chan,
- int turnon), { return; });
+AST_OPTIONAL_API(void, ast_monitor_setjoinfiles,
+ (struct ast_channel *chan, int turnon),
+ { return; });
/* Pause monitoring of a channel */
-AST_OPTIONAL_API(int, ast_monitor_pause, (struct ast_channel *chan),
- { return -1; });
+AST_OPTIONAL_API(int, ast_monitor_pause,
+ (struct ast_channel *chan),
+ { return -1; });
/* Unpause monitoring of a channel */
-AST_OPTIONAL_API(int, ast_monitor_unpause, (struct ast_channel *chan),
- { return -1; });
+AST_OPTIONAL_API(int, ast_monitor_unpause,
+ (struct ast_channel *chan),
+ { return -1; });
#endif /* _ASTERISK_MONITOR_H */
Modified: team/kpfleming/new_optional_api/include/asterisk/optional_api.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/kpfleming/new_optional_api/include/asterisk/optional_api.h?view=diff&rev=197782&r1=197781&r2=197782
==============================================================================
--- team/kpfleming/new_optional_api/include/asterisk/optional_api.h (original)
+++ team/kpfleming/new_optional_api/include/asterisk/optional_api.h Thu May 28 15:58:51 2009
@@ -133,15 +133,15 @@
#define AST_OPTIONAL_API(result, name, proto, stub) \
static result __stub__##name proto stub; \
- __attribute__((weak_import)) typeof(__stub__##name) __##name; \
+ __attribute__((weak_import)) typeof(__stub__##name) AST_OPTIONAL_API_NAME(name); \
static attribute_unused typeof(__stub__##name) * name; \
- static void __attribute__((constructor)) __init__##name(void) { name = __##name ? : __stub__##name; }
+ static void __attribute__((constructor)) __init__##name(void) { name = AST_OPTIONAL_API_NAME(name) ? : __stub__##name; }
#define AST_OPTIONAL_API_ATTR(result, attr, name, proto, stub) \
static __attribute__((attr)) result __stub__##name proto stub; \
- __attribute__((attr, weak_import)) typeof(__stub__##name) __##name; \
+ __attribute__((attr, weak_import)) typeof(__stub__##name) AST_OPTIONAL_API_NAME(name); \
static attribute_unused __attribute__((attr)) typeof(__stub__##name) * name; \
- static void __attribute__((constructor)) __init__##name(void) { name = __##name ? : __stub__##name; }
+ static void __attribute__((constructor)) __init__##name(void) { name = AST_OPTIONAL_API_NAME(name) ? : __stub__##name; }
#endif
Modified: team/kpfleming/new_optional_api/include/asterisk/smdi.h
URL: http://svn.asterisk.org/svn-view/asterisk/team/kpfleming/new_optional_api/include/asterisk/smdi.h?view=diff&rev=197782&r1=197781&r2=197782
==============================================================================
--- team/kpfleming/new_optional_api/include/asterisk/smdi.h (original)
+++ team/kpfleming/new_optional_api/include/asterisk/smdi.h Thu May 28 15:58:51 2009
@@ -85,8 +85,9 @@
*/
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 @@
*
* \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 @@
* 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 @@
* 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 @@
* \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 @@
* 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 @@
* 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 @@
* #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 */
More information about the asterisk-commits
mailing list