00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef _LIBSMS_MODEM_H
00016 #define _LIBSMS_MODEM_H
00017
00018 #include <termios.h>
00019 #include "sms_funcs.h"
00020
00021
00022 #define MODE_OLD 1
00023 #define MODE_DIGICOM 2
00024 #define MODE_ASCII 3
00025 #define MODE_NEW 4
00026
00027 #define READ_SLEEP 10000
00028 #define READ_TIMEOUT 10
00029
00030 typedef int(*cds_report)( struct modem* , char* , int );
00031
00032
00033
00034
00035
00036
00037
00038
00039 int put_command( struct modem *mdm, char* command, int clen, char* answer,
00040 int max, int timeout,char* expect);
00041
00042 int setmodemparams( struct modem *mdm);
00043
00044 int checkmodem(struct modem *mdm);
00045
00046 int initmodem(struct modem *mdm, cds_report cds_report_f);
00047
00048 int setsmsc(struct modem *mdm, char *smsc);
00049
00050 int openmodem(struct modem *mdm);
00051
00052 int closemodem(struct modem *mdm);
00053
00054
00055 #endif