Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043 #if !defined(_SPANDSP_V8_H_)
00044 #define _SPANDSP_V8_H_
00045
00046 typedef struct v8_parms_s v8_parms_t;
00047
00048 typedef void (v8_result_handler_t)(void *user_data, v8_parms_t *result);
00049
00050 enum v8_call_function_e
00051 {
00052 V8_CALL_TBS = 0,
00053 V8_CALL_H324 = 1,
00054 V8_CALL_V18 = 2,
00055 V8_CALL_T101 = 3,
00056 V8_CALL_T30_TX = 4,
00057 V8_CALL_T30_RX = 5,
00058 V8_CALL_V_SERIES = 6,
00059 V8_CALL_FUNCTION_EXTENSION = 7
00060 };
00061
00062 enum v8_modulation_e
00063 {
00064 V8_MOD_V17 = (1 << 0),
00065 V8_MOD_V21 = (1 << 1),
00066 V8_MOD_V22 = (1 << 2),
00067 V8_MOD_V23HALF = (1 << 3),
00068 V8_MOD_V23 = (1 << 4),
00069 V8_MOD_V26BIS = (1 << 5),
00070 V8_MOD_V26TER = (1 << 6),
00071 V8_MOD_V27TER = (1 << 7),
00072 V8_MOD_V29 = (1 << 8),
00073 V8_MOD_V32 = (1 << 9),
00074 V8_MOD_V34HALF = (1 << 10),
00075 V8_MOD_V34 = (1 << 11),
00076 V8_MOD_V90 = (1 << 12),
00077 V8_MOD_V92 = (1 << 13),
00078
00079 V8_MOD_FAILED = (1 << 15)
00080 };
00081
00082 enum v8_protocol_e
00083 {
00084 V8_PROTOCOL_NONE = 0,
00085 V8_PROTOCOL_LAPM_V42 = 1,
00086 V8_PROTOCOL_EXTENSION = 7
00087 };
00088
00089 enum v8_pstn_access_e
00090 {
00091 V8_PSTN_ACCESS_CALL_DCE_CELLULAR = 0x01,
00092 V8_PSTN_ACCESS_ANSWER_DCE_CELLULAR = 0x02,
00093 V8_PSTN_ACCESS_DCE_ON_DIGITAL = 0x04
00094 };
00095
00096 enum v8_pcm_modem_availability_e
00097 {
00098 V8_PSTN_PCM_MODEM_V90_V92_ANALOGUE = 0x01,
00099 V8_PSTN_PCM_MODEM_V90_V92_DIGITAL = 0x02,
00100 V8_PSTN_PCM_MODEM_V91 = 0x04
00101 };
00102
00103 typedef struct v8_state_s v8_state_t;
00104
00105 struct v8_parms_s
00106 {
00107 int modem_connect_tone;
00108 int call_function;
00109 unsigned int modulations;
00110 int protocol;
00111 int pstn_access;
00112 int pcm_modem_availability;
00113 int nsf;
00114 int t66;
00115 };
00116
00117 #if defined(__cplusplus)
00118 extern "C"
00119 {
00120 #endif
00121
00122 SPAN_DECLARE(int) v8_restart(v8_state_t *s,
00123 int calling_party,
00124 v8_parms_t *parms);
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134 SPAN_DECLARE(v8_state_t *) v8_init(v8_state_t *s,
00135 int calling_party,
00136 v8_parms_t *parms,
00137 v8_result_handler_t *result_handler,
00138 void *user_data);
00139
00140
00141
00142
00143
00144 SPAN_DECLARE(int) v8_release(v8_state_t *s);
00145
00146
00147
00148
00149
00150 SPAN_DECLARE(int) v8_free(v8_state_t *s);
00151
00152 SPAN_DECLARE(logging_state_t *) v8_get_logging_state(v8_state_t *s);
00153
00154
00155
00156
00157
00158
00159
00160
00161 SPAN_DECLARE_NONSTD(int) v8_tx(v8_state_t *s, int16_t *amp, int max_len);
00162
00163
00164
00165
00166
00167
00168
00169 SPAN_DECLARE_NONSTD(int) v8_rx(v8_state_t *s, const int16_t *amp, int len);
00170
00171
00172
00173
00174
00175 SPAN_DECLARE(void) v8_log_supported_modulations(v8_state_t *s, int modulation_schemes);
00176
00177 SPAN_DECLARE(const char *) v8_call_function_to_str(int call_function);
00178 SPAN_DECLARE(const char *) v8_modulation_to_str(int modulation_scheme);
00179 SPAN_DECLARE(const char *) v8_protocol_to_str(int protocol);
00180 SPAN_DECLARE(const char *) v8_pstn_access_to_str(int pstn_access);
00181 SPAN_DECLARE(const char *) v8_nsf_to_str(int nsf);
00182 SPAN_DECLARE(const char *) v8_pcm_modem_availability_to_str(int pcm_modem_availability);
00183 SPAN_DECLARE(const char *) v8_t66_to_str(int t66);
00184
00185 #if defined(__cplusplus)
00186 }
00187 #endif
00188
00189 #endif
00190