#define __FSK_H__
#include "uart.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct {
int freq_space; /* Frequency of the 0 bit */
int freq_mark; /* Frequency of the 1 bit */
extern fsk_modem_definition_t fsk_modem_definitions[];
+#ifdef __cplusplus
+} /* extern C */
+#endif
+
#endif
#endif
#include "openzap.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
struct hashtable;
struct hashtable_iterator;
OZ_DECLARE(struct hashtable_iterator*) hashtable_next(struct hashtable_iterator *i);
OZ_DECLARE(void) hashtable_this(struct hashtable_iterator *i, const void **key, int *klen, void **val);
+#ifdef __cplusplus
+} /* extern C */
+#endif
+
#endif /* __HASHTABLE_CWC22_H__ */
/*
#include "hashtable.h"
#include "hashtable_private.h" /* needed to enable inlining */
+#ifdef __cplusplus
+extern "C" {
+#endif
/*****************************************************************************/
/* This struct is only concrete here to allow the inlining of two of the
* accessor functions. */
return (hashtable_iterator_search(i,h,k)); \
}
-
+#ifdef __cplusplus
+}
+#endif
#endif /* __HASHTABLE_ITR_CWC22__*/
#include "hashtable.h"
-
+#ifdef __cplusplus
+extern "C" {
+#endif
/*****************************************************************************/
struct entry
#define freekey(X) free(X)
/*define freekey(X) ; */
+#ifdef __cplusplus
+}
+#endif
/*****************************************************************************/
} while(0);
-typedef enum {
- ZAP_STATE_CHANGE_FAIL,
- ZAP_STATE_CHANGE_SUCCESS,
- ZAP_STATE_CHANGE_SAME,
-} zap_state_change_result_t;
-
#define zap_set_state_r(obj, s, l, r) if ( obj->state == s ) { \
zap_log(ZAP_LOG_WARNING, "Why bother changing state on %d:%d from %s to %s\n", obj->span_id, obj->chan_id, zap_channel_state2str(obj->state), zap_channel_state2str(s)); r = ZAP_STATE_CHANGE_SAME; \
} else if (zap_test_flag(obj, ZAP_CHANNEL_READY)) { \
*/
#define zap_copy_flags(dest, src, flags) (dest)->flags &= ~(flags); (dest)->flags |= ((src)->flags & (flags))
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef enum {
+ ZAP_STATE_CHANGE_FAIL,
+ ZAP_STATE_CHANGE_SUCCESS,
+ ZAP_STATE_CHANGE_SAME,
+} zap_state_change_result_t;
+
struct zap_stream_handle {
zap_stream_handle_write_function_t write_function;
zap_stream_handle_raw_write_function_t raw_write_function;
zap_mutex_unlock(span->mutex);
}
+#ifdef __cplusplus
+} /* extern C */
+#endif
+
#endif
/* For Emacs:
#ifndef __UART_H__
#define __UART_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef void (*bytehandler_func_t) (void *, int);
typedef void (*bithandler_func_t) (void *, int);
void dsp_uart_bit_handler(void *handle, int bit);
+#ifdef __cplusplus
+}
+#endif
#endif
#include "openzap.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/**
* @defgroup zap_buffer Buffer Routines
* @ingroup buffer
OZ_DECLARE(zap_size_t) zap_buffer_zwrite(zap_buffer_t *buffer, const void *data, zap_size_t datalen);
+#ifdef __cplusplus
+}
+#endif
+
#endif
/* For Emacs:
* Local Variables:
#define zap_is_file_path(file) ((*file == '/') || strstr(file, SWITCH_URL_SEPARATOR))
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct zap_config zap_config_t;
/*! \brief A simple file handle representing an open configuration file **/
*/
OZ_DECLARE (int) zap_config_get_cas_bits(char *strvalue, unsigned char *outbits);
+#ifdef __cplusplus
+}
+#endif
/** @} */
#endif
#ifndef _ZAP_DSO_H
#define _ZAP_DSO_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef void (*zap_func_ptr_t) (void);
typedef void * zap_dso_lib_t;
zap_dso_lib_t zap_dso_open(const char *path, char **err);
void *zap_dso_func_sym(zap_dso_lib_t lib, const char *sym, char **err);
+#ifdef __cplusplus
+}
+#endif
#endif
//#include "m3ua_client.h"
#include "openzap.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
enum e_sigboost_event_id_values
{
SIGBOOST_EVENT_CALL_START = 0x80, /*128*/
zap_status_t m3ua_destroy(void);
zap_status_t m3ua_start(zap_span_t *span);
-
+#ifdef __cplusplus
+}
+#endif
/* For Emacs:
* Local Variables:
#include "openzap.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
typedef struct zap_mutex zap_mutex_t;
typedef struct zap_thread zap_thread_t;
typedef struct zap_condition zap_condition_t;
OZ_DECLARE(zap_status_t) zap_condition_signal(zap_condition_t *cond);
OZ_DECLARE(zap_status_t) zap_condition_wait(zap_condition_t *cond, int ms);
+#ifdef __cplusplus
+}
+#endif
+
#endif
/* For Emacs:
typedef int zap_filehandle_t;
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
#define TAG_END NULL
typedef size_t zap_size_t;
ZAP_CAUSE_MEDIA_TIMEOUT = 604
} zap_call_cause_t;
+#ifdef __cplusplus
+}
+#endif
+
#endif
/* For Emacs:
FAIL_CONFIG_RETURN(ZAP_FAIL);
}
- if (!(sigmod_iface = (boost_sigmod_interface_t *)zap_dso_func_sym(lib, BOOST_INTERFACE_NAME, &err))) {
+ if (!(sigmod_iface = (boost_sigmod_interface_t *)zap_dso_func_sym(lib, BOOST_INTERFACE_NAME_STR, &err))) {
zap_log(ZAP_LOG_ERROR, "Failed to read Sangoma boost signaling module interface '%s': %s\n", path, err);
snprintf(span->last_error, sizeof(span->last_error), "Failed to read Sangoma boost signaling module interface '%s': %s", path, err);
#ifndef SANGOMA_BOOST_INTERFACE_H
#define SANGOMA_BOOST_INTERFACE_H
-#include "zap_types.h"
+#include "openzap.h"
/*!
\brief Callback used to notify signaling status changes on a channel
*/
#define BOOST_SET_SIG_STATUS_ARGS (zap_channel_t *zchan, zap_channel_sig_status_t status)
typedef zap_status_t (*boost_set_sig_status_func_t) BOOST_SET_SIG_STATUS_ARGS;
-#define BOOST_SET_SIG_STATUS_FUNCTION(name) zap_status_t BOOST_SET_SIG_STATUS_ARGS
+#define BOOST_SET_SIG_STATUS_FUNCTION(name) zap_status_t name BOOST_SET_SIG_STATUS_ARGS
/*!
\brief Configure the given span signaling
void *pvt;
} boost_sigmod_interface_t;
-#define BOOST_INTERFACE_NAME "boost_sigmod_interface"
+#define BOOST_INTERFACE_NAME boost_sigmod_interface
+#define BOOST_INTERFACE_NAME_STR "boost_sigmod_interface"
/* use this in your sig boost module to declare your interface */
#define BOOST_INTERFACE boost_sigmod_interface_t BOOST_INTERFACE_NAME
#endif