]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
move internal function declarations to include/asterisk/_private.h
authorLuigi Rizzo <rizzo@icir.org>
Tue, 20 Nov 2007 22:18:21 +0000 (22:18 +0000)
committerLuigi Rizzo <rizzo@icir.org>
Tue, 20 Nov 2007 22:18:21 +0000 (22:18 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89465 65c4cc65-6c06-0410-ace0-fbb531ad65f3

18 files changed:
build_tools/strip_nonapi
include/asterisk.h
include/asterisk/_private.h [new file with mode: 0644]
main/asterisk.c
main/astobj2.c
main/channel.c
main/cli.c
main/db.c
main/devicestate.c
main/dnsmgr.c
main/event.c
main/frame.c
main/loader.c
main/logger.c
main/manager.c
main/pbx.c
main/term.c
main/threadstorage.c

index c2262cafacd02e8ff4880ed4c6e92485f95acca4..5a52eef1e8ef927234e310a8d84ae7e52f174b4d 100755 (executable)
@@ -18,7 +18,7 @@
 FILTER="${GREP} -v -e ^ast_ -e ^_ast_ -e ^__ast_ -e ^astman_ -e ^pbx_"
 
 case "${OSARCH}" in
-    linux-gnu)
+    linux-gnu|FreeBSD)
        nm ${1} | ${GREP} -e " T " | cut -d" " -f3 | ${FILTER} > striplist
        sed -e "s/^/-N /" striplist | xargs ${STRIP} ${1}
        rm -f striplist
index da70e8a8c40d3692295969c6f25bd7f2fe54f911..5605d2f3bae006ebae2c6befefc1621a800674d2 100644 (file)
 #define        sched_setscheduler      __PLEASE_USE_ast_set_priority_INSTEAD_OF_sched_setscheduler__
 
 int ast_set_priority(int);                     /*!< Provided by asterisk.c */
-int load_modules(unsigned int);                        /*!< Provided by loader.c */
-int load_pbx(void);                            /*!< Provided by pbx.c */
-int init_logger(void);                         /*!< Provided by logger.c */
-void close_logger(void);                       /*!< Provided by logger.c */
-int reload_logger(int);                                /*!< Provided by logger.c */
-int init_framer(void);                         /*!< Provided by frame.c */
-int ast_term_init(void);                       /*!< Provided by term.c */
-int astdb_init(void);                          /*!< Provided by db.c */
-void ast_channels_init(void);                  /*!< Provided by channel.c */
-void ast_builtins_init(void);                  /*!< Provided by cli.c */
-int dnsmgr_init(void);                         /*!< Provided by dnsmgr.c */ 
-void dnsmgr_start_refresh(void);               /*!< Provided by dnsmgr.c */
-int dnsmgr_reload(void);                       /*!< Provided by dnsmgr.c */
-void threadstorage_init(void);                 /*!< Provided by threadstorage.c */
-void ast_event_init(void);          /*!< Provided by event.c */
-int ast_device_state_engine_init(void); /*!< Provided by devicestate.c */
-int astobj2_init(void);                                /*! Provided by astobj2.c */
-
-/*!
- * \brief Reload asterisk modules.
- * \param name the name of the module to reload
- *
- * This function reloads the specified module, or if no modules are specified,
- * it will reload all loaded modules.
- *
- * \note Modules are reloaded using their reload() functions, not unloading
- * them and loading them again.
- * 
- * \return 0 if the specified module was not found.
- * \retval 1 if the module was found but cannot be reloaded.
- * \retval -1 if a reload operation is already in progress.
- * \retval 2 if the specfied module was found and reloaded.
- */
-int ast_module_reload(const char *name);
 
 /*!
  * \brief Register a function to be executed before Asterisk exits.
diff --git a/include/asterisk/_private.h b/include/asterisk/_private.h
new file mode 100644 (file)
index 0000000..ad4ca72
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Prototypes for public functions only of internal interest,
+ * normally not used by modules.
+ * What goes here are typically *_init() routines.
+ */
+
+#ifndef _ASTERISK__PRIVATE_H
+#define _ASTERISK__PRIVATE_H
+
+int load_modules(unsigned int);                /*!< Provided by loader.c */
+int load_pbx(void);                    /*!< Provided by pbx.c */
+int init_logger(void);                 /*!< Provided by logger.c */
+void close_logger(void);               /*!< Provided by logger.c */
+int init_framer(void);                 /*!< Provided by frame.c */
+int ast_term_init(void);               /*!< Provided by term.c */
+int astdb_init(void);                  /*!< Provided by db.c */
+void ast_channels_init(void);          /*!< Provided by channel.c */
+void ast_builtins_init(void);          /*!< Provided by cli.c */
+int dnsmgr_init(void);                 /*!< Provided by dnsmgr.c */ 
+void dnsmgr_start_refresh(void);       /*!< Provided by dnsmgr.c */
+int dnsmgr_reload(void);               /*!< Provided by dnsmgr.c */
+void threadstorage_init(void);         /*!< Provided by threadstorage.c */
+void ast_event_init(void);             /*!< Provided by event.c */
+int ast_device_state_engine_init(void);        /*!< Provided by devicestate.c */
+int astobj2_init(void);                        /*! Provided by astobj2.c */
+
+/*!
+ * \brief Reload asterisk modules.
+ * \param name the name of the module to reload
+ *
+ * This function reloads the specified module, or if no modules are specified,
+ * it will reload all loaded modules.
+ *
+ * \note Modules are reloaded using their reload() functions, not unloading
+ * them and loading them again.
+ * 
+ * \return 0 if the specified module was not found.
+ * \retval 1 if the module was found but cannot be reloaded.
+ * \retval -1 if a reload operation is already in progress.
+ * \retval 2 if the specfied module was found and reloaded.
+ */
+int ast_module_reload(const char *name);
+
+#endif /* _ASTERISK__PRIVATE_H */
index dc013375816fca2fbaf2b7900adacab1b3a72cc6..69e75abdfc1bfd68b93687a1ca56816b8e7a08e0 100644 (file)
@@ -61,6 +61,8 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
+#include "asterisk/_private.h"
+
 #undef sched_setscheduler
 #undef setpriority
 #include <sys/time.h>
index 8404f036d0b8179a676270fb9f579a0a52c6d340..e7a091c80b8ac6932bf9158144017af931258ab0 100644 (file)
@@ -21,6 +21,7 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
+#include "asterisk/_private.h"
 #include "asterisk/astobj2.h"
 #include "asterisk/utils.h"
 #include "asterisk/cli.h"
index 94814e45003cbe9a409fec79446e9fe9d3050ac4..1fcc096bbc5e014465994365615f3131a96eabe9 100644 (file)
@@ -27,6 +27,8 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
+#include "asterisk/_private.h"
+
 #include <sys/time.h>
 #include <signal.h>
 #include <math.h>
index aae8dfc046b66578e4007c1876017d429cf95f9c..b4c4b5fd261fd7a820adfe59c1593694a0a89771 100644 (file)
@@ -27,6 +27,7 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
+#include "asterisk/_private.h"
 #include <sys/signal.h>
 #include <signal.h>
 #include <ctype.h>
index ea22f5674a9cce4efe9cdf78a68314de6ed26e49..aea825d1a0ca0824c91371bacd0b24540012fc3d 100644 (file)
--- a/main/db.c
+++ b/main/db.c
@@ -31,6 +31,7 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
+#include "asterisk/_private.h"
 #include <sys/time.h>
 #include <signal.h>
 #include <dirent.h>
index 91ef8ee5d02bd65dae7dd4fd34c09ce693c77f10..7f00425fea510469f89128df0d9a01b5af794ed9 100644 (file)
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
+#include "asterisk/_private.h"
 #include "asterisk/channel.h"
 #include "asterisk/utils.h"
 #include "asterisk/lock.h"
index d5ab8e0cec1181e3c44890c0723558c4deb8ebbb..c6e3adffc5c3542f5cc6f2e5fc466f2e02dda356 100644 (file)
@@ -27,6 +27,7 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
+#include "asterisk/_private.h"
 #include <regex.h>
 #include <signal.h>
 
index f9d9b657c105730f0cdcb5a2906442fbd27598b3..be0d3f286576ea50e94bf4448c283abb893ee008 100644 (file)
@@ -27,6 +27,7 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
+#include "asterisk/_private.h"
 #include "asterisk/event.h"
 #include "asterisk/linkedlists.h"
 #include "asterisk/lock.h"
index 85fa6a96a4c9f5bf550192571896a7eb91168cda..13d81d4b4ac823c22961d2b718fc332b56a84d07 100644 (file)
@@ -27,6 +27,7 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
+#include "asterisk/_private.h"
 #include "asterisk/lock.h"
 #include "asterisk/frame.h"
 #include "asterisk/options.h"
index 5e51c84018c0f1235e62f2dd80f2997c0f8df955..3ffa68758b484e54a573a8d387e0f9f5feb70b9e 100644 (file)
@@ -31,6 +31,7 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
+#include "asterisk/_private.h"
 #include <dirent.h>
 
 #include "asterisk/linkedlists.h"
index 41501976179d0cf92731043f42c0b5fdf0d66a40..c94cf4b44201e004bc369732f0f18c283d4d1666 100644 (file)
  * \author Mark Spencer <markster@digium.com>
  */
 
-/* Prevent inclusion of logger.h - it redefines LOG_* which we need
- * to define syslog_level_map. Later, we force its inclusion again.
+/*
+ * define _ASTERISK_LOGGER_H to prevent the inclusion of logger.h;
+ * it redefines LOG_* which we need to define syslog_level_map.
+ * Later, we force the inclusion of logger.h again.
  */
 #define _ASTERISK_LOGGER_H
 #include "asterisk.h"
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
+#include "asterisk/_private.h"
 #include <signal.h>
 #include <time.h>
 #include <sys/stat.h>
@@ -511,7 +514,7 @@ static int rotate_file(const char *filename)
        return res;
 }
 
-int reload_logger(int rotate)
+static int reload_logger(int rotate)
 {
        char old[PATH_MAX] = "";
        int event_rotate = rotate, queue_rotate = rotate;
index f7f818c79cabaf68ccd611dd6a2a239d12b2139b..14a9d9881fce69633cedda62e50725b96e85c681 100644 (file)
@@ -45,6 +45,7 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
+#include "asterisk/_private.h"
 #include <ctype.h>
 #include <sys/time.h>
 #include <signal.h>
index cd8a23ca88a71c5332d9ac8a38019087c56a81b6..d1a0570c7cfd624d9bc37b1982f8267f46adf61d 100644 (file)
@@ -27,6 +27,7 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
+#include "asterisk/_private.h"
 #include <ctype.h>
 #include <time.h>
 #include <sys/time.h>
index d79c83c10606a4aea007287023c45a7b6deab222..825a710da3a79dbb1fd6511fc283ec5000112bd3 100644 (file)
@@ -27,6 +27,7 @@
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
+#include "asterisk/_private.h"
 #include <sys/time.h>
 #include <signal.h>
 #include <sys/stat.h>
index 5a6f4b3e86fd1bbd833b0bef9f63bc7889d1b541..35d3eca55ad2bcc5a49f52c47ee62a1158fb69d7 100644 (file)
  */
 
 #include "asterisk.h"
+#include "asterisk/_private.h"
 
-#if defined(DEBUG_THREADLOCALS)
+#if !defined(DEBUG_THREADLOCALS)
+
+void threadstorage_init(void)
+{
+}
+
+#else /* !defined(DEBUG_THREADLOCALS) */
 
 ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
 
@@ -226,11 +233,5 @@ void threadstorage_init(void)
        ast_cli_register_multiple(cli, sizeof(cli) / sizeof(cli[0]));
 }
 
-#else /* !defined(DEBUG_THREADLOCALS) */
-
-void threadstorage_init(void)
-{
-}
-
 #endif /* !defined(DEBUG_THREADLOCALS) */