| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
#ifndef GSM_H |
| 10 |
#define GSM_H |
| 11 |
|
| 12 |
#ifdef __cplusplus |
| 13 |
# define NeedFunctionPrototypes 1 |
| 14 |
#endif |
| 15 |
|
| 16 |
#if __STDC__ |
| 17 |
# define NeedFunctionPrototypes 1 |
| 18 |
#endif |
| 19 |
|
| 20 |
#ifdef _NO_PROTO |
| 21 |
# undef NeedFunctionPrototypes |
| 22 |
#endif |
| 23 |
|
| 24 |
#ifdef NeedFunctionPrototypes |
| 25 |
# include <stdio.h> |
| 26 |
#endif |
| 27 |
|
| 28 |
#undef GSM_P |
| 29 |
#if NeedFunctionPrototypes |
| 30 |
# define GSM_P( protos ) protos |
| 31 |
#else |
| 32 |
# define GSM_P( protos ) ( ) |
| 33 |
#endif |
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
|
| 39 |
typedef struct gsm_state * gsm; |
| 40 |
typedef short gsm_signal; |
| 41 |
typedef unsigned char gsm_byte; |
| 42 |
typedef gsm_byte gsm_frame[33]; |
| 43 |
|
| 44 |
#define GSM_MAGIC 0xD |
| 45 |
|
| 46 |
#define GSM_PATCHLEVEL 7 |
| 47 |
#define GSM_MINOR 0 |
| 48 |
#define GSM_MAJOR 1 |
| 49 |
|
| 50 |
#define GSM_OPT_VERBOSE 1 |
| 51 |
#define GSM_OPT_FAST 2 |
| 52 |
#define GSM_OPT_LTP_CUT 3 |
| 53 |
|
| 54 |
extern gsm gsm_create GSM_P((void)); |
| 55 |
extern void gsm_destroy GSM_P((gsm)); |
| 56 |
|
| 57 |
extern int gsm_print GSM_P((FILE *, gsm, gsm_byte *)); |
| 58 |
extern int gsm_option GSM_P((gsm, int, int *)); |
| 59 |
|
| 60 |
extern void gsm_encode GSM_P((gsm, gsm_signal *, gsm_byte *)); |
| 61 |
extern int gsm_decode GSM_P((gsm, gsm_byte *, gsm_signal *)); |
| 62 |
|
| 63 |
extern int gsm_explode GSM_P((gsm, gsm_byte *, gsm_signal *)); |
| 64 |
extern void gsm_implode GSM_P((gsm, gsm_signal *, gsm_byte *)); |
| 65 |
|
| 66 |
#undef GSM_P |
| 67 |
|
| 68 |
#endif |