mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
added extern C crap
git-svn-id: http://svn.openzap.org/svn/openzap/branches/sangoma_boost@880 a93c3328-9c30-0410-af19-c9cd2b2d52af
This commit is contained in:
@@ -35,6 +35,10 @@
|
||||
#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 */
|
||||
@@ -109,5 +113,9 @@ void dsp_fsk_sample(dsp_fsk_handle_t *handle, double normalized_sample);
|
||||
|
||||
extern fsk_modem_definition_t fsk_modem_definitions[];
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
@@ -9,6 +9,9 @@
|
||||
#endif
|
||||
#include "openzap.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
struct hashtable;
|
||||
struct hashtable_iterator;
|
||||
|
||||
@@ -181,6 +184,10 @@ OZ_DECLARE(struct hashtable_iterator*) hashtable_first(struct hashtable *h);
|
||||
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__ */
|
||||
|
||||
/*
|
||||
|
@@ -5,6 +5,9 @@
|
||||
#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. */
|
||||
@@ -79,7 +82,9 @@ hashtable_iterator_search(struct hashtable_itr *itr,
|
||||
return (hashtable_iterator_search(i,h,k)); \
|
||||
}
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __HASHTABLE_ITR_CWC22__*/
|
||||
|
||||
|
@@ -5,7 +5,9 @@
|
||||
|
||||
#include "hashtable.h"
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/*****************************************************************************/
|
||||
|
||||
struct entry
|
||||
@@ -56,6 +58,9 @@ indexFor(unsigned int tablelength, unsigned int hashvalue) {
|
||||
#define freekey(X) free(X)
|
||||
/*define freekey(X) ; */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
|
@@ -297,12 +297,6 @@
|
||||
} 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)) { \
|
||||
@@ -323,6 +317,16 @@ typedef enum {
|
||||
*/
|
||||
#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;
|
||||
@@ -851,6 +855,10 @@ static __inline__ void zap_clear_flag_all(zap_span_t *span, uint32_t flag)
|
||||
zap_mutex_unlock(span->mutex);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* extern C */
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* For Emacs:
|
||||
|
@@ -34,6 +34,10 @@
|
||||
#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);
|
||||
|
||||
@@ -72,5 +76,8 @@ void dsp_uart_destroy(dsp_uart_handle_t **handle);
|
||||
|
||||
void dsp_uart_bit_handler(void *handle, int bit);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
@@ -36,6 +36,10 @@
|
||||
|
||||
#include "openzap.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @defgroup zap_buffer Buffer Routines
|
||||
* @ingroup buffer
|
||||
@@ -133,6 +137,10 @@ OZ_DECLARE(zap_size_t) zap_buffer_seek(zap_buffer_t *buffer, zap_size_t datalen)
|
||||
|
||||
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:
|
||||
|
@@ -70,6 +70,10 @@
|
||||
#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 **/
|
||||
@@ -123,6 +127,9 @@ int zap_config_next_pair(zap_config_t * cfg, char **var, char **val);
|
||||
*/
|
||||
OZ_DECLARE (int) zap_config_get_cas_bits(char *strvalue, unsigned char *outbits);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
#endif
|
||||
|
@@ -21,6 +21,10 @@
|
||||
#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;
|
||||
|
||||
@@ -28,6 +32,9 @@ void zap_dso_destroy(zap_dso_lib_t *lib);
|
||||
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
|
||||
|
||||
|
@@ -39,6 +39,10 @@
|
||||
|
||||
//#include "m3ua_client.h"
|
||||
#include "openzap.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
enum e_sigboost_event_id_values
|
||||
{
|
||||
SIGBOOST_EVENT_CALL_START = 0x80, /*128*/
|
||||
@@ -113,7 +117,9 @@ zap_status_t m3ua_init(zap_io_interface_t **zint);
|
||||
zap_status_t m3ua_destroy(void);
|
||||
zap_status_t m3ua_start(zap_span_t *span);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/* For Emacs:
|
||||
* Local Variables:
|
||||
|
@@ -27,6 +27,9 @@
|
||||
|
||||
#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;
|
||||
@@ -45,6 +48,10 @@ OZ_DECLARE(zap_status_t) zap_condition_destroy(zap_condition_t **cond);
|
||||
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:
|
||||
|
@@ -63,6 +63,9 @@ typedef ssize_t zap_ssize_t;
|
||||
typedef int zap_filehandle_t;
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
#define TAG_END NULL
|
||||
|
||||
typedef size_t zap_size_t;
|
||||
@@ -655,6 +658,10 @@ typedef enum {
|
||||
ZAP_CAUSE_MEDIA_TIMEOUT = 604
|
||||
} zap_call_cause_t;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/* For Emacs:
|
||||
|
Reference in New Issue
Block a user