which included commits to RCS files with non-trunk default branches.
The various routines are prefixed by CIMD.
$Log$
+ Revision 1.1.1.2 2002/04/03 01:44:15 short
+ Implemented connection type "tcp" (GCT_TCP), use <hostname>:<port> as "port"
+
Revision 1.1.1.1 2002/04/03 00:08:03 short
Found in "gnokii-working" directory, some November-patches version
static void CIMD_RX_Char(char rx_byte);
static void CIMD_SigHandler(int status);
-static bool CIMD_OpenSerial(void);
+static bool CIMD_OpenSerial(GSM_ConnectionType connection);
GSM_Phone phone_cimd; /* forward declaration */
}
#else
SAFE_STRNCPY_SIZEOF(PortDevice,state->Link.PortDevice);
- if (!CIMD_OpenSerial())
+ if (!CIMD_OpenSerial(state->Link.ConnectionType))
return(GE_INTERNALERROR);
#endif
/* Called by initialisation code to open comm port in asynchronous mode. */
-static bool CIMD_OpenSerial(void)
+static bool CIMD_OpenSerial(GSM_ConnectionType connection)
{
int result;
/* Open device. */
- result = device_open(PortDevice, false/*with_odd_parity*/, true/*with_async*/, -1/*with_hw_handshake*/, GCT_Serial);
+ result = device_open(PortDevice, false/*with_odd_parity*/, true/*with_async*/, -1/*with_hw_handshake*/, connection);
if (!result) {
perror(_("Couldn't open CIMD device"));
Released under the terms of the GNU GPL, see file COPYING for more details.
$Log$
+ Revision 1.1.1.2 2002/04/03 01:44:15 short
+ Implemented connection type "tcp" (GCT_TCP), use <hostname>:<port> as "port"
+
Revision 1.1.1.1 2001/11/25 21:58:58 short
:pserver:cvs@pserver.samba.org:/cvsroot - gnokii - Sun Nov 25 22:56 CET 2001
#include "devices/unixserial.h"
#include "devices/unixirda.h"
#include "devices/tekram.h"
+#include "devices/tcp.h"
#include "device.h"
/*
case GCT_Irda:
device_portfd = irda_open();
break;
+ case GCT_TCP:
+ device_portfd = tcp_opendevice(__file, __with_async);
+ break;
default:
break;
}
case GCT_Irda:
irda_close(device_portfd);
break;
+ case GCT_TCP:
+ tcp_close(device_portfd);
+ break;
default:
break;
}
break;
case GCT_Irda:
break;
+ case GCT_TCP:
+ break;
default:
break;
}
break;
case GCT_Irda:
break;
+ case GCT_TCP:
+ break;
default:
break;
}
case GCT_Irda:
return irda_read(device_portfd, __buf, __nbytes);
break;
+ case GCT_TCP:
+ return tcp_read(device_portfd, __buf, __nbytes);
+ break;
default:
break;
}
case GCT_Irda:
return irda_write(device_portfd, __buf, __n);
break;
+ case GCT_TCP:
+ return tcp_write(device_portfd, __buf, __n);
+ break;
default:
break;
}
case GCT_Irda:
return irda_select(device_portfd, timeout);
break;
+ case GCT_TCP:
+ return tcp_select(device_portfd, timeout);
+ break;
default:
break;
}
OBJS += $(TOPDIR)/win32/winserial.o
else
OBJS += unixserial.o \
- unixirda.o
+ unixirda.o \
+ tcp.o
endif
all: DEVICES.o
Released under the terms of the GNU GPL, see file COPYING for more details.
$Log$
+ Revision 1.1.1.6 2002/04/03 01:44:15 short
+ Implemented connection type "tcp" (GCT_TCP), use <hostname>:<port> as "port"
+
Revision 1.1.1.5 2002/04/03 00:08:07 short
Found in "gnokii-working" directory, some November-patches version
setenv(key,value,1/*overwrite*/); /* errors ignored */
}
-static int device_script(int fd, const char *section)
+int device_script(int fd, const char *section)
{
pid_t pid;
const char *scriptname = CFG_Get(CFG_Info, "global", section);
int serial_close_all_openfds[0x10]; /* -1 when entry not used, fd otherwise */
int serial_close(int __fd);
-static void serial_close_all(void)
+void serial_close_all(void)
{
int i;
serial_close(serial_close_all_openfds[i]);
}
-static void unixserial_interrupted(int signo)
+void unixserial_interrupted(int signo)
{
exit(EXIT_FAILURE);
/* NOTREACHED */
really powerful and useful :-)
$Log$
+ Revision 1.1.1.12 2002/04/03 01:44:15 short
+ Implemented connection type "tcp" (GCT_TCP), use <hostname>:<port> as "port"
+
Revision 1.1.1.11 2002/04/03 00:08:17 short
Found in "gnokii-working" directory, some November-patches version
if (!strcmp(Connection, "infrared")) connection=GCT_Infrared;
if (!strcmp(Connection, "irda")) connection=GCT_Irda;
+ if (!strcmp(Connection, "tcp")) connection=GCT_TCP;
/* Initialise the code for the GSM interface. */
various daemon functions.
$Log$
+ Revision 1.1.1.4 2002/04/03 01:44:15 short
+ Implemented connection type "tcp" (GCT_TCP), use <hostname>:<port> as "port"
+
Revision 1.1.1.3 2002/04/03 00:08:17 short
Found in "gnokii-working" directory, some November-patches version
connection=GCT_Infrared;
}
+ if (!strcmp(Connection, "tcp")) {
+ connection=GCT_TCP;
+ }
+
TerminateThread=false;
if (VM_Initialise(Model, Port, Initlength, connection, BinDir, DebugMode, true) == false) {
Released under the terms of the GNU GPL, see file COPYING for more details.
$Log$
+ Revision 1.1.1.5 2002/04/03 01:44:15 short
+ Implemented connection type "tcp" (GCT_TCP), use <hostname>:<port> as "port"
+
Revision 1.1.1.4 2002/04/03 00:08:20 short
Found in "gnokii-working" directory, some November-patches version
int serial_select(int fd, struct timeval *timeout);
+extern int serial_close_all_openfds[0x10];
+extern void serial_close_all(void);
+extern int device_script(int fd, const char *section);
+extern void unixserial_interrupted(int signo);
+
#endif /* __devices_unixserial_h */
handset.
$Log$
+ Revision 1.1.1.10 2002/04/03 01:44:15 short
+ Implemented connection type "tcp" (GCT_TCP), use <hostname>:<port> as "port"
+
Revision 1.1.1.9 2002/04/03 00:08:19 short
Found in "gnokii-working" directory, some November-patches version
GCT_Serial, /* Serial connection. */
GCT_Infrared, /* Infrared connection. */
GCT_Tekram, /* Tekram Ir-Dongle */
- GCT_Irda
+ GCT_Irda,
+ GCT_TCP, /* TCP network connection */
} GSM_ConnectionType;
/* Maximum length of device name for serial port */
$Id$
$Log$
+ Revision 1.1.1.4 2002/04/03 01:44:15 short
+ Implemented connection type "tcp" (GCT_TCP), use <hostname>:<port> as "port"
+
Revision 1.1.1.3 2002/04/03 00:08:22 short
Found in "gnokii-working" directory, some November-patches version
if (!strcmp(smsdConfig.connection, "infrared"))
connection = GCT_Infrared;
+ if (!strcmp(smsdConfig.connection, "tcp"))
+ connection = GCT_TCP;
/* Initialise the code for the GSM interface. */
Released under the terms of the GNU GPL, see file COPYING for more details.
$Log$
+ Revision 1.1.1.5 2002/04/03 01:44:15 short
+ Implemented connection type "tcp" (GCT_TCP), use <hostname>:<port> as "port"
+
Revision 1.1.1.4 2002/04/03 00:08:33 short
Found in "gnokii-working" directory, some November-patches version
if (!strcmp(xgnokiiConfig.connection, "irda"))
connection = GCT_Irda;
+ if (!strcmp(xgnokiiConfig.connection, "tcp"))
+ connection = GCT_TCP;
+
/* Initialise the code for the GSM interface. */
if (error == GE_NOLINK)