File: libsms_modem.h

package info (click to toggle)
kamailio 4.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 56,100 kB
  • sloc: ansic: 552,832; xml: 166,484; sh: 8,659; makefile: 7,676; sql: 6,235; perl: 3,487; yacc: 3,428; python: 1,457; cpp: 1,219; php: 1,047; java: 449; pascal: 194; cs: 40; awk: 27
file content (55 lines) | stat: -rw-r--r-- 1,349 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
/*
SMS Server Tools
Copyright (C) 2000 Stefan Frings

This program is free software unless you got it under another license directly
from the author. You can redistribute it and/or modify it under the terms of 
the GNU General Public License as published by the Free Software Foundation.
Either version 2 of the License, or (at your option) any later version.

http://www.isis.de/members/~s.frings
mailto:s.frings@mail.isis.de
 */


#ifndef _LIBSMS_MODEM_H
#define _LIBSMS_MODEM_H

#include <termios.h>
#include "sms_funcs.h"


#define MODE_OLD      1
#define MODE_DIGICOM  2
#define MODE_ASCII    3
#define MODE_NEW      4

#define READ_SLEEP   10000
#define READ_TIMEOUT  10

typedef int(*cds_report)( struct modem* , char* , int );


/* put_command
   Sends a command to the modem and waits max timout*0.1 seconds for an answer.
   The function returns the length of the answer.
   The answer can be Ok, ERROR or expect.
   The command may be empty or NULL  */

int put_command( struct modem *mdm, char* command, int clen, char* answer,
											int max, int timeout,char* expect);

int setmodemparams( struct modem *mdm);

int checkmodem(struct modem *mdm);

int initmodem(struct modem *mdm, cds_report cds_report_f);

int setsmsc(struct modem *mdm, char *smsc);

int openmodem(struct modem *mdm);

int closemodem(struct modem *mdm);


#endif