author | zautrix <zautrix> | 2004-10-05 11:13:51 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-05 11:13:51 (UTC) |
commit | 50ab40e1e02ad7c65c17a78d08116a808b1257aa (patch) (side-by-side diff) | |
tree | 0d1939e2297fa7bbd8e1f2030f154463854164c6 /gammu/emb/common/device/irda | |
parent | cf8616f64f20e5448d4ff644f7cc15750cf3f85f (diff) | |
download | kdepimpi-50ab40e1e02ad7c65c17a78d08116a808b1257aa.zip kdepimpi-50ab40e1e02ad7c65c17a78d08116a808b1257aa.tar.gz kdepimpi-50ab40e1e02ad7c65c17a78d08116a808b1257aa.tar.bz2 |
updated to latest gammu version
Diffstat (limited to 'gammu/emb/common/device/irda') (more/less context) (ignore whitespace changes)
-rw-r--r-- | gammu/emb/common/device/irda/irda.c | 8 | ||||
-rw-r--r-- | gammu/emb/common/device/irda/irda_unx.h | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/gammu/emb/common/device/irda/irda.c b/gammu/emb/common/device/irda/irda.c index fef50ac..e680377 100644 --- a/gammu/emb/common/device/irda/irda.c +++ b/gammu/emb/common/device/irda/irda.c @@ -1,51 +1,55 @@ /* (c) 2001-2004 by Marcin Wiacek */ -/* based on some work from Ralf Thelen and MyGnokii */ -/* based on some work from Gnokii and MSDN */ +/* based on some work from Ralf Thelen and MyGnokii (www.mwiacek.com) */ +/* based on some work from MSDN */ +/* based on some work from Gnokii (www.gnokii.org) + * (C) 1999-2000 Hugh Blemings & Pavel Janik ml. (C) 2001-2004 Pawel Kot + * GNU GPL version 2 or later + */ /* You have to include wsock32.lib library to MS VC project to compile it */ #include "../../gsmstate.h" #ifdef GSM_ENABLE_IRDADEVICE #ifndef DJGPP #ifndef WIN32 # include <stdlib.h> # include <unistd.h> # include <stdio.h> # include <fcntl.h> # include <errno.h> # include <string.h> # include <sys/time.h> # include <sys/poll.h> # include <sys/socket.h> # include <sys/ioctl.h> #else # include <windows.h> # include <io.h> #endif #include "../../gsmcomon.h" #include "../devfunc.h" #include "irda.h" static bool irda_discover_device(GSM_StateMachine *state) { GSM_Device_IrdaData *d = &state->Device.Data.Irda; struct irda_device_list *list; unsigned char *buf; unsigned int sec; int s, z, len, fd, i; GSM_DateTime Date; bool founddevice = false; #ifdef WIN32 int index; #endif fd = socket(AF_IRDA, SOCK_STREAM, 0); /* can handle maximally 10 devices during discovering */ len = sizeof(struct irda_device_list) + sizeof(struct irda_device_info) * 10; buf = malloc(len); list = (struct irda_device_list *)buf; diff --git a/gammu/emb/common/device/irda/irda_unx.h b/gammu/emb/common/device/irda/irda_unx.h index 8dbcb97..7a55273 100644 --- a/gammu/emb/common/device/irda/irda_unx.h +++ b/gammu/emb/common/device/irda/irda_unx.h @@ -1,49 +1,49 @@ -/* part of irda.h available in Linux kernel source */ +/* part of irda.h available in Linux kernel source (www.kernel.org) */ /********************************************************************* * * Filename: irda.h * Version: * Description: * Status: Experimental. * Author: Dag Brattli <dagb@cs.uit.no> * Created at: Mon Mar 8 14:06:12 1999 * Modified at: Sat Dec 25 16:06:42 1999 * Modified by: Dag Brattli <dagb@cs.uit.no> * * Copyright (c) 1999 Dag Brattli, All Rights Reserved. * * This program is free software; 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. * * Neither Dag Brattli nor University of Tromsų admit liability nor * provide warranty for any of this software. This material is * provided "AS-IS" and at no charge. * ********************************************************************/ #ifndef __irda_unx_h #define __irda_unx_h #include <sys/types.h> #include <sys/socket.h> #define SOL_IRLMP 266 /* Same as SOL_IRDA for now */ #define IRLMP_ENUMDEVICES 1 /* Return discovery log */ #define LSAP_ANY 0xff struct sockaddr_irda { sa_family_t irdaAddressFamily; /* AF_IRDA */ u_int8_t sir_lsap_sel; /* LSAP selector */ u_int32_t irdaDeviceID; /* Device address */ char irdaServiceName[25]; /* Usually <service>:IrDA:TinyTP */ }; struct irda_device_info { u_int32_t saddr; /* Address of local interface */ u_int32_t irdaDeviceID; /* Address of remote device */ char irdaDeviceName[22]; /* Description */ u_int8_t charset; /* Charset used for description */ u_int8_t hints[2]; /* Hint bits */ |