[asterisk-commits] russell: branch group/asterisk-cpp r168375 - in /team/group/asterisk-cpp: ./ ...
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Fri Jan 9 22:48:26 CST 2009
Author: russell
Date: Fri Jan 9 22:48:25 2009
New Revision: 168375
URL: http://svn.digium.com/view/asterisk?view=rev&rev=168375
Log:
app.c compiles, but linkedlists_compat still needs love
Modified:
team/group/asterisk-cpp/Makefile
team/group/asterisk-cpp/include/asterisk/abstract_jb.h
team/group/asterisk-cpp/include/asterisk/acl.h
team/group/asterisk-cpp/include/asterisk/agi.h
team/group/asterisk-cpp/include/asterisk/app.h
team/group/asterisk-cpp/include/asterisk/astdb.h
team/group/asterisk-cpp/include/asterisk/astobj.h
team/group/asterisk-cpp/include/asterisk/audiohook.h
team/group/asterisk-cpp/include/asterisk/channel.h
team/group/asterisk-cpp/include/asterisk/chanvars.h
team/group/asterisk-cpp/include/asterisk/cli.h
team/group/asterisk-cpp/include/asterisk/config.h
team/group/asterisk-cpp/include/asterisk/crypto.h
team/group/asterisk-cpp/include/asterisk/datastore.h
team/group/asterisk-cpp/include/asterisk/devicestate.h
team/group/asterisk-cpp/include/asterisk/dial.h
team/group/asterisk-cpp/include/asterisk/dnsmgr.h
team/group/asterisk-cpp/include/asterisk/event.h
team/group/asterisk-cpp/include/asterisk/extconf.h
team/group/asterisk-cpp/include/asterisk/features.h
team/group/asterisk-cpp/include/asterisk/file.h
team/group/asterisk-cpp/include/asterisk/frame.h
team/group/asterisk-cpp/include/asterisk/http.h
team/group/asterisk-cpp/include/asterisk/io.h
team/group/asterisk-cpp/include/asterisk/jabber.h
team/group/asterisk-cpp/include/asterisk/linkedlists_compat.hpp
team/group/asterisk-cpp/include/asterisk/logger.h
team/group/asterisk-cpp/include/asterisk/mod_format.h
team/group/asterisk-cpp/include/asterisk/musiconhold.h
team/group/asterisk-cpp/include/asterisk/netsock.h
team/group/asterisk-cpp/include/asterisk/network.h
team/group/asterisk-cpp/include/asterisk/options.h
team/group/asterisk-cpp/include/asterisk/pbx.h
team/group/asterisk-cpp/include/asterisk/plc.h
team/group/asterisk-cpp/include/asterisk/privacy.h
team/group/asterisk-cpp/include/asterisk/res_odbc.h
team/group/asterisk-cpp/include/asterisk/rtp.h
team/group/asterisk-cpp/include/asterisk/say.h
team/group/asterisk-cpp/include/asterisk/sched.h
team/group/asterisk-cpp/include/asterisk/slinfactory.h
team/group/asterisk-cpp/include/asterisk/speech.h
team/group/asterisk-cpp/include/asterisk/taskprocessor.h
team/group/asterisk-cpp/include/asterisk/translate.h
team/group/asterisk-cpp/include/asterisk/udptl.h
team/group/asterisk-cpp/include/asterisk/unaligned.h
team/group/asterisk-cpp/include/asterisk/utils.h
team/group/asterisk-cpp/main/app.c
team/group/asterisk-cpp/main/channel.c
Modified: team/group/asterisk-cpp/Makefile
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/Makefile?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/Makefile (original)
+++ team/group/asterisk-cpp/Makefile Fri Jan 9 22:48:25 2009
@@ -293,7 +293,8 @@
# value directly to ASTCFLAGS
ASTCFLAGS+=$(MALLOC_DEBUG)$(OPTIONS)
-MOD_SUBDIRS:=channels pbx apps codecs formats cdr funcs tests main res $(LOCAL_MOD_SUBDIRS)
+#MOD_SUBDIRS:=channels pbx apps codecs formats cdr funcs tests main res $(LOCAL_MOD_SUBDIRS)
+MOD_SUBDIRS:=main
OTHER_SUBDIRS:=
SUBDIRS:=$(OTHER_SUBDIRS) $(MOD_SUBDIRS)
SUBDIRS_INSTALL:=$(SUBDIRS:%=%-install)
Modified: team/group/asterisk-cpp/include/asterisk/abstract_jb.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/abstract_jb.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/abstract_jb.h (original)
+++ team/group/asterisk-cpp/include/asterisk/abstract_jb.h Fri Jan 9 22:48:25 2009
@@ -31,10 +31,6 @@
#define _ABSTRACT_JB_H_
#include <sys/time.h>
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
struct ast_frame;
@@ -219,8 +215,4 @@
*/
void ast_jb_empty_and_reset(struct ast_channel *c0, struct ast_channel *c1);
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ABSTRACT_JB_H_ */
Modified: team/group/asterisk-cpp/include/asterisk/acl.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/acl.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/acl.h (original)
+++ team/group/asterisk-cpp/include/asterisk/acl.h Fri Jan 9 22:48:25 2009
@@ -22,11 +22,6 @@
#ifndef _ASTERISK_ACL_H
#define _ASTERISK_ACL_H
-
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
#include "asterisk/network.h"
#include "asterisk/io.h"
@@ -77,8 +72,4 @@
int ast_str2tos(const char *value, unsigned int *tos);
const char *ast_tos2str(unsigned int tos);
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_ACL_H */
Modified: team/group/asterisk-cpp/include/asterisk/agi.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/agi.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/agi.h (original)
+++ team/group/asterisk-cpp/include/asterisk/agi.h Fri Jan 9 22:48:25 2009
@@ -22,10 +22,6 @@
#ifndef _ASTERISK_AGI_H
#define _ASTERISK_AGI_H
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
#include "asterisk/cli.h"
#include "asterisk/optional_api.h"
@@ -136,8 +132,4 @@
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)
-}
-#endif
-
#endif /* _ASTERISK_AGI_H */
Modified: team/group/asterisk-cpp/include/asterisk/app.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/app.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/app.h (original)
+++ team/group/asterisk-cpp/include/asterisk/app.h Fri Jan 9 22:48:25 2009
@@ -27,10 +27,6 @@
#include "asterisk/threadstorage.h"
struct ast_flags64;
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
AST_THREADSTORAGE_EXTERNAL(global_app_buf);
@@ -67,9 +63,13 @@
*/
struct ast_ivr_option {
+ typedef int (*ivr_func)(struct ast_channel *, void *);
char *option;
ast_ivr_action action;
- void *adata;
+ union {
+ void *adata;
+ ivr_func func;
+ };
};
struct ast_ivr_menu {
@@ -505,8 +505,4 @@
/*! \brief Common routine to cleanup after fork'ed process is complete (if reaping was stopped) */
void ast_safe_fork_cleanup(void);
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_APP_H */
Modified: team/group/asterisk-cpp/include/asterisk/astdb.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/astdb.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/astdb.h (original)
+++ team/group/asterisk-cpp/include/asterisk/astdb.h Fri Jan 9 22:48:25 2009
@@ -23,10 +23,6 @@
#ifndef _ASTERISK_ASTDB_H
#define _ASTERISK_ASTDB_H
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
struct ast_db_entry {
struct ast_db_entry *next;
char *key;
@@ -51,8 +47,4 @@
/*! \brief Free in-memory data */
void ast_db_freetree(struct ast_db_entry *entry);
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_ASTDB_H */
Modified: team/group/asterisk-cpp/include/asterisk/astobj.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/astobj.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/astobj.h (original)
+++ team/group/asterisk-cpp/include/asterisk/astobj.h Fri Jan 9 22:48:25 2009
@@ -81,10 +81,6 @@
* }
* \endcode
*/
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
#define ASTOBJ_DEFAULT_NAMELEN 80
#define ASTOBJ_DEFAULT_BUCKETS 256
@@ -814,8 +810,4 @@
#define ASTOBJ_CONTAINER_DUMP(fd,s,slen,container) \
ASTOBJ_CONTAINER_TRAVERSE(container, 1, do { ASTOBJ_DUMP(s,slen,iterator); ast_cli(fd, "%s", s); } while(0))
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_ASTOBJ_H */
Modified: team/group/asterisk-cpp/include/asterisk/audiohook.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/audiohook.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/audiohook.h (original)
+++ team/group/asterisk-cpp/include/asterisk/audiohook.h Fri Jan 9 22:48:25 2009
@@ -23,13 +23,9 @@
#ifndef _ASTERISK_AUDIOHOOK_H
#define _ASTERISK_AUDIOHOOK_H
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
/* these two are used in struct ast_audiohook */
#include "asterisk/lock.h"
-#include "asterisk/linkedlists.h"
+#include "asterisk/linkedlists_compat.hpp"
#include "asterisk/slinfactory.h"
@@ -258,8 +254,4 @@
*/
int ast_audiohook_volume_adjust(struct ast_channel *chan, enum ast_audiohook_direction direction, int volume);
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_AUDIOHOOK_H */
Modified: team/group/asterisk-cpp/include/asterisk/channel.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/channel.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/channel.h (original)
+++ team/group/asterisk-cpp/include/asterisk/channel.h Fri Jan 9 22:48:25 2009
@@ -131,10 +131,6 @@
#include "asterisk/poll-compat.h"
#endif
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
#define AST_MAX_EXTENSION 80 /*!< Max length of an extension */
#define AST_MAX_CONTEXT 80 /*!< Max length of a context */
#define AST_CHANNEL_NAME 80 /*!< Max length of an ast_channel name */
@@ -148,7 +144,7 @@
#include "asterisk/lock.h"
#include "asterisk/cdr.h"
#include "asterisk/utils.h"
-#include "asterisk/linkedlists.h"
+#include "asterisk/linkedlists_compat.hpp"
#include "asterisk/stringfields.h"
#include "asterisk/datastore.h"
@@ -1235,8 +1231,8 @@
for the first digit. Returns 0 on normal return, or 1 on a timeout. In the case of
a timeout, any digits that were read before the timeout will still be available in s.
RETURNS 2 in full version when ctrlfd is available, NOT 1*/
-int ast_readstring(struct ast_channel *c, char *s, int len, int timeout, int rtimeout, char *enders);
-int ast_readstring_full(struct ast_channel *c, char *s, int len, int timeout, int rtimeout, char *enders, int audiofd, int ctrlfd);
+int ast_readstring(struct ast_channel *c, char *s, int len, int timeout, int rtimeout, const char *enders);
+int ast_readstring_full(struct ast_channel *c, char *s, int len, int timeout, int rtimeout, const char *enders, int audiofd, int ctrlfd);
/*! \brief Report DTMF on channel 0 */
#define AST_BRIDGE_DTMF_CHANNEL_0 (1 << 0)
@@ -1669,9 +1665,4 @@
AST_LIST_ENTRY(ast_group_info) list;
};
-
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_CHANNEL_H */
Modified: team/group/asterisk-cpp/include/asterisk/chanvars.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/chanvars.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/chanvars.h (original)
+++ team/group/asterisk-cpp/include/asterisk/chanvars.h Fri Jan 9 22:48:25 2009
@@ -23,7 +23,7 @@
#ifndef _ASTERISK_CHANVARS_H
#define _ASTERISK_CHANVARS_H
-#include "asterisk/linkedlists.h"
+#include "asterisk/linkedlists_compat.hpp"
struct ast_var_t {
AST_LIST_ENTRY(ast_var_t) entries;
Modified: team/group/asterisk-cpp/include/asterisk/cli.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/cli.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/cli.h (original)
+++ team/group/asterisk-cpp/include/asterisk/cli.h Fri Jan 9 22:48:25 2009
@@ -23,11 +23,7 @@
#ifndef _ASTERISK_CLI_H
#define _ASTERISK_CLI_H
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#include "asterisk/linkedlists.h"
+#include "asterisk/linkedlists_compat.hpp"
void ast_cli(int fd, const char *fmt, ...)
__attribute__((format(printf, 2, 3)));
@@ -288,8 +284,4 @@
*/
char *ast_complete_channels(const char *line, const char *word, int pos, int state, int rpos);
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_CLI_H */
Modified: team/group/asterisk-cpp/include/asterisk/config.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/config.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/config.h (original)
+++ team/group/asterisk-cpp/include/asterisk/config.h Fri Jan 9 22:48:25 2009
@@ -22,10 +22,6 @@
#ifndef _ASTERISK_CONFIG_H
#define _ASTERISK_CONFIG_H
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
#include "asterisk/utils.h"
#include "asterisk/inline_api.h"
@@ -541,8 +537,4 @@
}
)
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_CONFIG_H */
Modified: team/group/asterisk-cpp/include/asterisk/crypto.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/crypto.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/crypto.h (original)
+++ team/group/asterisk-cpp/include/asterisk/crypto.h Fri Jan 9 22:48:25 2009
@@ -22,10 +22,6 @@
#ifndef _ASTERISK_CRYPTO_H
#define _ASTERISK_CRYPTO_H
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
#define AST_KEY_PUBLIC (1 << 0)
#define AST_KEY_PRIVATE (1 << 1)
@@ -119,8 +115,5 @@
*
*/
int (*ast_decrypt_bin)(unsigned char *dst, const unsigned char *src, int srclen, struct ast_key *key);
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
#endif /* _ASTERISK_CRYPTO_H */
Modified: team/group/asterisk-cpp/include/asterisk/datastore.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/datastore.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/datastore.h (original)
+++ team/group/asterisk-cpp/include/asterisk/datastore.h Fri Jan 9 22:48:25 2009
@@ -21,11 +21,7 @@
#ifndef _ASTERISK_DATASTORE_H
#define _ASTERISK_DATASTORE_H
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
-#include "asterisk/linkedlists.h"
+#include "asterisk/linkedlists_compat.hpp"
/*! \brief Structure for a data store type */
struct ast_datastore_info {
@@ -69,8 +65,4 @@
*/
int ast_datastore_free(struct ast_datastore *datastore);
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_DATASTORE_H */
Modified: team/group/asterisk-cpp/include/asterisk/devicestate.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/devicestate.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/devicestate.h (original)
+++ team/group/asterisk-cpp/include/asterisk/devicestate.h Fri Jan 9 22:48:25 2009
@@ -36,10 +36,6 @@
#ifndef _ASTERISK_DEVICESTATE_H
#define _ASTERISK_DEVICESTATE_H
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
/*! \brief Device States
* \note The order of these states may not change because they are included
@@ -253,8 +249,4 @@
unsigned int ring:1;
};
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_DEVICESTATE_H */
Modified: team/group/asterisk-cpp/include/asterisk/dial.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/dial.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/dial.h (original)
+++ team/group/asterisk-cpp/include/asterisk/dial.h Fri Jan 9 22:48:25 2009
@@ -22,10 +22,6 @@
#ifndef _ASTERISK_DIAL_H
#define _ASTERISK_DIAL_H
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
/*! \brief Main dialing structure. Contains global options, channels being dialed, and more! */
struct ast_dial;
@@ -167,8 +163,4 @@
*/
void ast_dial_set_timeout(struct ast_dial *dial, int num, int timeout);
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_DIAL_H */
Modified: team/group/asterisk-cpp/include/asterisk/dnsmgr.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/dnsmgr.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/dnsmgr.h (original)
+++ team/group/asterisk-cpp/include/asterisk/dnsmgr.h Fri Jan 9 22:48:25 2009
@@ -22,10 +22,6 @@
#ifndef _ASTERISK_DNSMGR_H
#define _ASTERISK_DNSMGR_H
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
#include "asterisk/network.h"
#include "asterisk/srv.h"
@@ -96,8 +92,4 @@
*/
int ast_dnsmgr_changed(struct ast_dnsmgr_entry *entry);
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif /* c_plusplus */
-
#endif /* ASTERISK_DNSMGR_H */
Modified: team/group/asterisk-cpp/include/asterisk/event.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/event.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/event.h (original)
+++ team/group/asterisk-cpp/include/asterisk/event.h Fri Jan 9 22:48:25 2009
@@ -57,10 +57,6 @@
#ifndef AST_EVENT_H
#define AST_EVENT_H
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
#include "asterisk/event_defs.h"
/*!
@@ -635,8 +631,4 @@
*/
void *ast_event_iterator_get_ie_raw(struct ast_event_iterator *iterator);
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* AST_EVENT_H */
Modified: team/group/asterisk-cpp/include/asterisk/extconf.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/extconf.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/extconf.h (original)
+++ team/group/asterisk-cpp/include/asterisk/extconf.h Fri Jan 9 22:48:25 2009
@@ -23,10 +23,6 @@
#ifndef _ASTERISK_EXTCONF_H
#define _ASTERISK_EXTCONF_H
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
#ifdef NOTYET
/* I'm going to define all the structs mentioned below, to avoid
@@ -248,8 +244,4 @@
enum ext_match_t action);
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_PBX_H */
Modified: team/group/asterisk-cpp/include/asterisk/features.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/features.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/features.h (original)
+++ team/group/asterisk-cpp/include/asterisk/features.h Fri Jan 9 22:48:25 2009
@@ -25,7 +25,7 @@
#define _AST_FEATURES_H
#include "asterisk/pbx.h"
-#include "asterisk/linkedlists.h"
+#include "asterisk/linkedlists_compat.hpp"
#define FEATURE_MAX_LEN 11
#define FEATURE_APP_LEN 64
Modified: team/group/asterisk-cpp/include/asterisk/file.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/file.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/file.h (original)
+++ team/group/asterisk-cpp/include/asterisk/file.h Fri Jan 9 22:48:25 2009
@@ -31,10 +31,6 @@
#ifdef HAVE_MMAP
#include <sys/mman.h>
-#endif
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
#endif
struct ast_filestream;
@@ -340,8 +336,4 @@
#define AST_RESERVED_POINTERS 20
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_FILE_H */
Modified: team/group/asterisk-cpp/include/asterisk/frame.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/frame.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/frame.h (original)
+++ team/group/asterisk-cpp/include/asterisk/frame.h Fri Jan 9 22:48:25 2009
@@ -25,14 +25,10 @@
#ifndef _ASTERISK_FRAME_H
#define _ASTERISK_FRAME_H
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
#include <sys/time.h>
#include "asterisk/endian.h"
-#include "asterisk/linkedlists.h"
+#include "asterisk/linkedlists_compat.hpp"
struct ast_codec_pref {
char order[32];
@@ -636,8 +632,4 @@
return 8000;
}
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_FRAME_H */
Modified: team/group/asterisk-cpp/include/asterisk/http.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/http.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/http.h (original)
+++ team/group/asterisk-cpp/include/asterisk/http.h Fri Jan 9 22:48:25 2009
@@ -21,7 +21,7 @@
#include "asterisk/config.h"
#include "asterisk/tcptls.h"
-#include "asterisk/linkedlists.h"
+#include "asterisk/linkedlists_compat.hpp"
/*!
* \file http.h
Modified: team/group/asterisk-cpp/include/asterisk/io.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/io.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/io.h (original)
+++ team/group/asterisk-cpp/include/asterisk/io.h Fri Jan 9 22:48:25 2009
@@ -27,10 +27,6 @@
#include <sys/poll.h> /* For POLL* constants */
#else
#include "asterisk/poll-compat.h"
-#endif
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
#endif
/*! Input ready */
@@ -143,8 +139,4 @@
int ast_get_termcols(int fd);
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_IO_H */
Modified: team/group/asterisk-cpp/include/asterisk/jabber.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/jabber.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/jabber.h (original)
+++ team/group/asterisk-cpp/include/asterisk/jabber.h Fri Jan 9 22:48:25 2009
@@ -58,7 +58,7 @@
#include <iksemel.h>
#include "asterisk/astobj.h"
-#include "asterisk/linkedlists.h"
+#include "asterisk/linkedlists_compat.hpp"
/*
* As per RFC 3920 - section 3.1, the maximum length for a full Jabber ID
Modified: team/group/asterisk-cpp/include/asterisk/linkedlists_compat.hpp
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/linkedlists_compat.hpp?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/linkedlists_compat.hpp (original)
+++ team/group/asterisk-cpp/include/asterisk/linkedlists_compat.hpp Fri Jan 9 22:48:25 2009
@@ -25,7 +25,68 @@
* in C++ source code.
*/
+#include <list>
+
+#include "asterisk/lock.h"
+
#ifndef __AST_LINKEDLISTS_COMPAT_HPP__
#define __AST_LINKEDLISTS_COMPAT_HPP__
+#define AST_LIST_ENTRY(foo) int
+#define AST_RWLIST_ENTRY(foo) int
+
+#define AST_RWLIST_HEAD_STATIC(name, type) \
+struct name { \
+ name(void) { \
+ ast_rwlock_init(&rwlock); \
+ } \
+ \
+ ast_rwlock_t rwlock; \
+ std::list<type> _list; \
+} name
+
+#define AST_LIST_HEAD_STATIC(name, type) \
+struct name { \
+ name(void) { \
+ ast_mutex_init(&lock); \
+ } \
+ \
+ ast_mutex_t lock; \
+ std::list<type> _list; \
+} name
+
+#define AST_LIST_HEAD_NOLOCK(name, type) \
+struct name { \
+ std::list<type> stuff; \
+}
+
+#define AST_RWLIST_WRLOCK(list) \
+ ast_rwlock_wrlock(&(list)->rwlock)
+
+#define AST_RWLIST_RDLOCK(list) \
+ ast_rwlock_rdlock(&(list)->rwlock)
+
+#define AST_RWLIST_UNLOCK(list) \
+ ast_rwlock_unlock(&(list)->rwlock)
+
+#define AST_LIST_LOCK(list) \
+ ast_mutex_lock(&(list)->lock)
+
+#define AST_LIST_UNLOCK(list) \
+ ast_mutex_unlock(&(list)->lock)
+
+/* XXX */
+#define AST_RWLIST_TRAVERSE_SAFE_BEGIN(a, b, c) while (0)
+#define AST_RWLIST_TRAVERSE_SAFE_END
+#define AST_RWLIST_TRAVERSE(a, b, c) while (0)
+#define AST_RWLIST_REMOVE_CURRENT(a)
+#define AST_RWLIST_INSERT_TAIL(a, b, c)
+#define AST_RWLIST_FIRST(a) NULL
+#define AST_LIST_TRAVERSE_SAFE_BEGIN(a, b, c) while (0)
+#define AST_LIST_TRAVERSE_SAFE_END
+#define AST_LIST_TRAVERSE(a, b, c) while (0)
+#define AST_LIST_REMOVE_CURRENT(a)
+#define AST_LIST_INSERT_TAIL(a, b, c)
+#define AST_LIST_FIRST(a) NULL
+
#endif /* __AST_LINKEDLISTS_COMPAT_HPP__ */
Modified: team/group/asterisk-cpp/include/asterisk/logger.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/logger.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/logger.h (original)
+++ team/group/asterisk-cpp/include/asterisk/logger.h Fri Jan 9 22:48:25 2009
@@ -26,10 +26,6 @@
#define _ASTERISK_LOGGER_H
#include "asterisk/options.h" /* need option_debug */
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
#define EVENTLOG "event_log"
#define QUEUELOG "queue_log"
@@ -267,8 +263,4 @@
#endif /* HAVE_BKTR */
#endif /* _LOGGER_BACKTRACE_H */
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_LOGGER_H */
Modified: team/group/asterisk-cpp/include/asterisk/mod_format.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/mod_format.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/mod_format.h (original)
+++ team/group/asterisk-cpp/include/asterisk/mod_format.h Fri Jan 9 22:48:25 2009
@@ -26,10 +26,6 @@
#include "asterisk/file.h"
#include "asterisk/frame.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
/*! \brief
* Each supported file format is described by the following structure.
@@ -138,8 +134,4 @@
*/
int ast_format_unregister(const char *name);
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_MOD_FORMAT_H */
Modified: team/group/asterisk-cpp/include/asterisk/musiconhold.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/musiconhold.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/musiconhold.h (original)
+++ team/group/asterisk-cpp/include/asterisk/musiconhold.h Fri Jan 9 22:48:25 2009
@@ -22,10 +22,6 @@
#ifndef _ASTERISK_MOH_H
#define _ASTERISK_MOH_H
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
/*!
* \brief Turn on music on hold on a given channel
@@ -52,8 +48,4 @@
void ast_moh_cleanup(struct ast_channel *chan);
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_MOH_H */
Modified: team/group/asterisk-cpp/include/asterisk/netsock.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/netsock.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/netsock.h (original)
+++ team/group/asterisk-cpp/include/asterisk/netsock.h Fri Jan 9 22:48:25 2009
@@ -23,10 +23,6 @@
#ifndef _ASTERISK_NETSOCK_H
#define _ASTERISK_NETSOCK_H
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
#include "asterisk/network.h"
#include "asterisk/io.h"
@@ -62,8 +58,4 @@
void ast_netsock_unref(struct ast_netsock *ns);
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_NETSOCK_H */
Modified: team/group/asterisk-cpp/include/asterisk/network.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/network.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/network.h (original)
+++ team/group/asterisk-cpp/include/asterisk/network.h Fri Jan 9 22:48:25 2009
@@ -25,10 +25,6 @@
#ifndef _ASTERISK_NETWORK_H
#define _ASTERISK_NETWORK_H
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
/*
* Include relevant network headers.
@@ -93,8 +89,4 @@
|| (sin1->sin_port != sin2->sin_port));
}
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_NETWORK_H */
Modified: team/group/asterisk-cpp/include/asterisk/options.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/options.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/options.h (original)
+++ team/group/asterisk-cpp/include/asterisk/options.h Fri Jan 9 22:48:25 2009
@@ -22,10 +22,6 @@
#ifndef _ASTERISK_OPTIONS_H
#define _ASTERISK_OPTIONS_H
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
#define AST_CACHE_DIR_LEN 512
#define AST_FILENAME_MAX 80
@@ -154,8 +150,4 @@
extern int ast_language_is_prefix;
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_OPTIONS_H */
Modified: team/group/asterisk-cpp/include/asterisk/pbx.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/pbx.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/pbx.h (original)
+++ team/group/asterisk-cpp/include/asterisk/pbx.h Fri Jan 9 22:48:25 2009
@@ -27,10 +27,6 @@
#include "asterisk/chanvars.h"
#include "asterisk/hashtab.h"
#include "asterisk/stringfields.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
#define AST_MAX_APP 32 /*!< Max length of an application */
@@ -1094,8 +1090,4 @@
int ast_hashtab_compare_contexts(const void *ah_a, const void *ah_b);
unsigned int ast_hashtab_hash_contexts(const void *obj);
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_PBX_H */
Modified: team/group/asterisk-cpp/include/asterisk/plc.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/plc.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/plc.h (original)
+++ team/group/asterisk-cpp/include/asterisk/plc.h Fri Jan 9 22:48:25 2009
@@ -119,10 +119,6 @@
} plc_state_t;
-#ifdef __cplusplus
-extern "C" {
-#endif
-
/*! Process a block of received audio samples.
\brief Process a block of received audio samples.
\param s The packet loss concealer context.
@@ -145,9 +141,5 @@
\return A pointer to the he packet loss concealer context. */
plc_state_t *plc_init(plc_state_t *s);
-#ifdef __cplusplus
-}
-#endif
-
#endif
/*- End of file ------------------------------------------------------------*/
Modified: team/group/asterisk-cpp/include/asterisk/privacy.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/privacy.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/privacy.h (original)
+++ team/group/asterisk-cpp/include/asterisk/privacy.h Fri Jan 9 22:48:25 2009
@@ -23,10 +23,6 @@
#ifndef _ASTERISK_PRIVACY_H
#define _ASTERISK_PRIVACY_H
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
-
#define AST_PRIVACY_DENY (1 << 0) /* Don't bother ringing, send to voicemail */
#define AST_PRIVACY_ALLOW (1 << 1) /* Pass directly to me */
#define AST_PRIVACY_KILL (1 << 2) /* Play anti-telemarketer message and hangup */
@@ -39,8 +35,4 @@
int ast_privacy_reset(char *dest);
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_PRIVACY_H */
Modified: team/group/asterisk-cpp/include/asterisk/res_odbc.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/res_odbc.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/res_odbc.h (original)
+++ team/group/asterisk-cpp/include/asterisk/res_odbc.h Fri Jan 9 22:48:25 2009
@@ -30,7 +30,7 @@
#include <sql.h>
#include <sqlext.h>
#include <sqltypes.h>
-#include "asterisk/linkedlists.h"
+#include "asterisk/linkedlists_compat.hpp"
typedef enum { ODBC_SUCCESS=0, ODBC_FAIL=-1} odbc_status;
Modified: team/group/asterisk-cpp/include/asterisk/rtp.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/rtp.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/rtp.h (original)
+++ team/group/asterisk-cpp/include/asterisk/rtp.h Fri Jan 9 22:48:25 2009
@@ -32,11 +32,7 @@
#include "asterisk/io.h"
#include "asterisk/sched.h"
#include "asterisk/channel.h"
-#include "asterisk/linkedlists.h"
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
+#include "asterisk/linkedlists_compat.hpp"
/* Codes for RTP-specific data - not defined by our AST_FORMAT codes */
/*! DTMF (RFC2833) */
@@ -354,8 +350,4 @@
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_RTP_H */
Modified: team/group/asterisk-cpp/include/asterisk/say.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/say.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/say.h (original)
+++ team/group/asterisk-cpp/include/asterisk/say.h Fri Jan 9 22:48:25 2009
@@ -27,10 +27,6 @@
#include "asterisk/file.h"
#include <time.h>
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
/*! \brief
* The basic ast_say_* functions are implemented as function pointers,
@@ -163,8 +159,4 @@
SAY_EXTERN int (* ast_say_date_with_format)(struct ast_channel *chan, time_t t, const char *ints, const char *lang, const char *format, const char *timezone) SAY_INIT(ast_say_date_with_format);
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_SAY_H */
Modified: team/group/asterisk-cpp/include/asterisk/sched.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/sched.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/sched.h (original)
+++ team/group/asterisk-cpp/include/asterisk/sched.h Fri Jan 9 22:48:25 2009
@@ -22,10 +22,6 @@
#ifndef _ASTERISK_SCHED_H
#define _ASTERISK_SCHED_H
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
/*! \brief Max num of schedule structs
@@ -282,8 +278,4 @@
} \
} while(0)
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_SCHED_H */
Modified: team/group/asterisk-cpp/include/asterisk/slinfactory.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/slinfactory.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/slinfactory.h (original)
+++ team/group/asterisk-cpp/include/asterisk/slinfactory.h Fri Jan 9 22:48:25 2009
@@ -23,10 +23,6 @@
#ifndef _ASTERISK_SLINFACTORY_H
#define _ASTERISK_SLINFACTORY_H
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
#define AST_SLINFACTORY_MAX_HOLD 1280
@@ -101,8 +97,4 @@
*/
void ast_slinfactory_flush(struct ast_slinfactory *sf);
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_SLINFACTORY_H */
Modified: team/group/asterisk-cpp/include/asterisk/speech.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/speech.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/speech.h (original)
+++ team/group/asterisk-cpp/include/asterisk/speech.h Fri Jan 9 22:48:25 2009
@@ -22,10 +22,6 @@
#ifndef _ASTERISK_SPEECH_H
#define _ASTERISK_SPEECH_H
-
-#if defined(__cplusplus) || defined(c_plusplus)
-extern "C" {
-#endif
/* Speech structure flags */
enum ast_speech_flags {
@@ -149,8 +145,4 @@
/*! \brief Unregister a speech recognition engine */
int ast_speech_unregister(char *engine_name);
-#if defined(__cplusplus) || defined(c_plusplus)
-}
-#endif
-
#endif /* _ASTERISK_SPEECH_H */
Modified: team/group/asterisk-cpp/include/asterisk/taskprocessor.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/taskprocessor.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/taskprocessor.h (original)
+++ team/group/asterisk-cpp/include/asterisk/taskprocessor.h Fri Jan 9 22:48:25 2009
@@ -17,7 +17,7 @@
*/
#include "asterisk.h"
#include "asterisk/lock.h"
-#include "asterisk/linkedlists.h"
+#include "asterisk/linkedlists_compat.hpp"
#include "asterisk/utils.h"
#include "asterisk/options.h"
Modified: team/group/asterisk-cpp/include/asterisk/translate.h
URL: http://svn.digium.com/view/asterisk/team/group/asterisk-cpp/include/asterisk/translate.h?view=diff&rev=168375&r1=168374&r2=168375
==============================================================================
--- team/group/asterisk-cpp/include/asterisk/translate.h (original)
[... 354 lines stripped ...]
More information about the asterisk-commits
mailing list