[asterisk-commits] tilghman: branch tilghman/optional_api_162 r220413 - in /team/tilghman/option...

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Sep 24 16:31:41 CDT 2009


Author: tilghman
Date: Thu Sep 24 16:31:38 2009
New Revision: 220413

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=220413
Log:
Initial removal of header

Removed:
    team/tilghman/optional_api_162/include/asterisk/optional_api.h
Modified:
    team/tilghman/optional_api_162/apps/app_voicemail.c
    team/tilghman/optional_api_162/include/asterisk/agi.h
    team/tilghman/optional_api_162/include/asterisk/monitor.h
    team/tilghman/optional_api_162/include/asterisk/smdi.h

Modified: team/tilghman/optional_api_162/apps/app_voicemail.c
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/optional_api_162/apps/app_voicemail.c?view=diff&rev=220413&r1=220412&r2=220413
==============================================================================
--- team/tilghman/optional_api_162/apps/app_voicemail.c (original)
+++ team/tilghman/optional_api_162/apps/app_voicemail.c Thu Sep 24 16:31:38 2009
@@ -39,10 +39,6 @@
  *        Feels like the database code before realtime. Someone - please come up
  *        with a plan to clean this up.
  */
-
-/*** MODULEINFO
-	<depend>res_smdi</depend>
- ***/
 
 /*** MAKEOPTS
 <category name="MENUSELECT_OPTS_app_voicemail" displayname="Voicemail Build Options" positive_output="yes" remove_on_change="apps/app_voicemail.o apps/app_voicemail.so apps/app_directory.o apps/app_directory.so">

Modified: team/tilghman/optional_api_162/include/asterisk/agi.h
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/optional_api_162/include/asterisk/agi.h?view=diff&rev=220413&r1=220412&r2=220413
==============================================================================
--- team/tilghman/optional_api_162/include/asterisk/agi.h (original)
+++ team/tilghman/optional_api_162/include/asterisk/agi.h Thu Sep 24 16:31:38 2009
@@ -29,7 +29,6 @@
 
 #include "asterisk/cli.h"
 #include "asterisk/xmldoc.h"
-#include "asterisk/optional_api.h"
 
 typedef struct agi_state {
 	int fd;		        /*!< FD for general output */
@@ -72,8 +71,7 @@
  * \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),
-		 { return AST_OPTIONAL_API_UNAVAILABLE; });
+int ast_agi_register(struct ast_module *mod, agi_command *cmd) attribute_weak;
 
 /*!
  * \brief
@@ -85,8 +83,7 @@
  * \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),
-		 { return AST_OPTIONAL_API_UNAVAILABLE; });
+int ast_agi_unregister(struct ast_module *mod, agi_command *cmd) attribute_weak;
 
 /*!
  * \brief
@@ -97,14 +94,13 @@
  * \param mod Pointer to the module_info structure for the module that is registering the commands
  * \param cmd Pointer to the first entry in the array of command descriptors
  * \param len Length of the array (use the ARRAY_LEN macro to determine this easily)
- * \return 0 on success, -1 on failure, AST_OPTIONAL_API_UNAVAILABLE if res_agi is not loaded
+ * \return 0 on success, -1 on failure
  *
  * \note If any command fails to register, all commands previously registered during the operation
  * 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),
-		 { return AST_OPTIONAL_API_UNAVAILABLE; });
+int ast_agi_register_multiple(struct ast_module *mod, struct agi_command *cmd, unsigned int len) attribute_weak;
 
 /*!
  * \brief
@@ -115,13 +111,12 @@
  * \param mod Pointer to the module_info structure for the module that is unregistering the commands
  * \param cmd Pointer to the first entry in the array of command descriptors
  * \param len Length of the array (use the ARRAY_LEN macro to determine this easily)
- * \return 0 on success, -1 on failure, AST_OPTIONAL_API_UNAVAILABLE if res_agi is not loaded
+ * \return 0 on success, -1 on failure
  *
  * \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),
-		 { return AST_OPTIONAL_API_UNAVAILABLE; });
+int ast_agi_unregister_multiple(struct ast_module *mod, struct agi_command *cmd, unsigned int len) attribute_weak;
 
 /*!
  * \brief
@@ -131,11 +126,10 @@
  * \param fd The file descriptor for the AGI session (from struct agi_state)
  * \param chan Pointer to an associated Asterisk channel, if any
  * \param fmt printf-style format string
- * \return 0 for success, -1 for failure, AST_OPTIONAL_API_UNAVAILABLE if res_agi is not loaded
+ * \return 0 for success, -1 for failure
  *
  */
-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; });
+int ast_agi_send(int fd, struct ast_channel *chan, char *fmt, ...) attribute_weak __attribute__((format(printf, 3, 4)));
 
 #if defined(__cplusplus) || defined(c_plusplus)
 }

Modified: team/tilghman/optional_api_162/include/asterisk/monitor.h
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/optional_api_162/include/asterisk/monitor.h?view=diff&rev=220413&r1=220412&r2=220413
==============================================================================
--- team/tilghman/optional_api_162/include/asterisk/monitor.h (original)
+++ team/tilghman/optional_api_162/include/asterisk/monitor.h Thu Sep 24 16:31:38 2009
@@ -24,7 +24,6 @@
 #define _ASTERISK_MONITOR_H
 
 #include "asterisk/channel.h"
-#include "asterisk/optional_api.h"
 
 enum AST_MONITORING_STATE {
 	AST_MONITOR_RUNNING,
@@ -51,27 +50,25 @@
 };
 
 /* 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; });
+int ast_monitor_start(struct ast_channel *chan, const char
+	*format_spec, const char *fname_base, int need_lock, int stream_action)
+	attribute_weak;
 
 /* Stop monitoring a channel */
-AST_OPTIONAL_API(int, ast_monitor_stop, (struct ast_channel *chan, int
-	need_lock), { return -1; });
+int ast_monitor_stop(struct ast_channel *chan, int need_lock)
+	attribute_weak;
 
 /* 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; });
+int ast_monitor_change_fname(struct ast_channel *chan, const char *fname_base,
+	int need_lock) attribute_weak;
 
-AST_OPTIONAL_API(void, ast_monitor_setjoinfiles, (struct ast_channel *chan,
-	int turnon), { return; });
+void ast_monitor_setjoinfiles(struct ast_channel *chan, int turnon)
+	attribute_weak;
 
 /* Pause monitoring of a channel */
-AST_OPTIONAL_API(int, ast_monitor_pause, (struct ast_channel *chan),
-	{ return -1; });
+int ast_monitor_pause(struct ast_channel *chan) attribute_weak;
 
 /* Unpause monitoring of a channel */
-AST_OPTIONAL_API(int, ast_monitor_unpause, (struct ast_channel *chan),
-	{ return -1; });
+int ast_monitor_unpause(struct ast_channel *chan) attribute_weak;
 
 #endif /* _ASTERISK_MONITOR_H */

Modified: team/tilghman/optional_api_162/include/asterisk/smdi.h
URL: http://svnview.digium.com/svn/asterisk/team/tilghman/optional_api_162/include/asterisk/smdi.h?view=diff&rev=220413&r1=220412&r2=220413
==============================================================================
--- team/tilghman/optional_api_162/include/asterisk/smdi.h (original)
+++ team/tilghman/optional_api_162/include/asterisk/smdi.h Thu Sep 24 16:31:38 2009
@@ -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_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 @@
  *
  * \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 @@
  * \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 @@
  * 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 @@
  *
  * \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 @@
  * \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 @@
  * 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 @@
  * 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 */




More information about the asterisk-commits mailing list