[Pcsclite-cvs-commit] PCSC/src hotplug.h,1.4,1.5 hotplug_libusb.c,1.15,1.16 hotplug_linux.c,1.19,1.20 hotplug_macosx.c,1.12,1.13 parser.h,1.4,1.5 tokenfactory.c,1.17,1.18
aet-guest@quantz.debian.org
aet-guest@quantz.debian.org
Tue, 21 Oct 2003 22:00:56 +0200
- Previous message: [Pcsclite-cvs-commit] PCSC/src readerfactory.c,1.31,1.32 pcscdaemon.c,1.34,1.35
- Next message: [Pcsclite-cvs-commit] PCSC/src hotplug_libusb.c,1.16,1.17 hotplug_linux.c,1.20,1.21 hotplug_macosx.c,1.13,1.14
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/pcsclite/PCSC/src
In directory quantz:/tmp/cvs-serv5439
Modified Files:
hotplug.h hotplug_libusb.c hotplug_linux.c hotplug_macosx.c
parser.h tokenfactory.c
Log Message:
- Move all common hotplug defines into hotplug.h
- Remove extra LTPBundleFindValueWithKey declarations
Index: hotplug.h
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/hotplug.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- hotplug.h 18 Oct 2003 17:19:36 -0000 1.4
+++ hotplug.h 21 Oct 2003 20:00:53 -0000 1.5
@@ -16,11 +16,23 @@
extern "C"
{
#endif
+
+#ifndef PCSCLITE_HP_DROPDIR
+#define PCSCLITE_HP_DROPDIR "/usr/local/pcsc/drivers/"
+#endif
+
+#define PCSCLITE_HP_MANUKEY_NAME "ifdVendorID"
+#define PCSCLITE_HP_PRODKEY_NAME "ifdProductID"
+#define PCSCLITE_HP_NAMEKEY_NAME "ifdFriendlyName"
+#define PCSCLITE_HP_LIBRKEY_NAME "CFBundleExecutable"
+
+#define PCSCLITE_HP_BASE_PORT 0x200000
+
LONG HPSearchHotPluggables(void);
ULONG HPRegisterForHotplugEvents(void);
+
#ifdef __cplusplus
}
#endif
#endif
-
Index: hotplug_libusb.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/hotplug_libusb.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -d -r1.15 -r1.16
--- hotplug_libusb.c 20 Oct 2003 16:45:07 -0000 1.15
+++ hotplug_libusb.c 21 Oct 2003 20:00:53 -0000 1.16
@@ -33,16 +33,11 @@
#include "debuglog.h"
#include "sys_generic.h"
#include "parser.h"
-
-#define PCSCLITE_MANUKEY_NAME "ifdVendorID"
-#define PCSCLITE_PRODKEY_NAME "ifdProductID"
-#define PCSCLITE_NAMEKEY_NAME "ifdFriendlyName"
-#define PCSCLITE_LIBRKEY_NAME "CFBundleExecutable"
+#include "hotplug.h"
/* PCSCLITE_MAX_READERS_CONTEXTS is defined in pcsclite.h */
#define PCSCLITE_MAX_DRIVERS 16
#define BUS_DEVICE_STRSIZE 256
-#define PCSCLITE_HP_BASE_PORT 0x200000
#define READER_ABSENT 0
#define READER_PRESENT 1
@@ -53,7 +48,6 @@
/* set to 1 if you want to see USB hotplug debug messages */
#define DEBUG_USB_HOTPLUG 0
-extern int LTPBundleFindValueWithKey(char *, char *, char *, int);
extern PCSCLITE_MUTEX usbNotifierMutex;
static PCSCLITE_THREAD_T usbNotifyThread;
@@ -122,32 +116,32 @@
fullPath[sizeof(fullPath) - 1] = '\0';
/* while we find a nth ifdVendorID in Info.plist */
- while (LTPBundleFindValueWithKey(fullPath, PCSCLITE_MANUKEY_NAME,
+ while (LTPBundleFindValueWithKey(fullPath, PCSCLITE_HP_MANUKEY_NAME,
keyValue, alias) == 0)
{
driverTracker[listCount].bundleName = strdup(currFP->d_name);
/* Get ifdVendorID */
- rv = LTPBundleFindValueWithKey(fullPath, PCSCLITE_MANUKEY_NAME,
+ rv = LTPBundleFindValueWithKey(fullPath, PCSCLITE_HP_MANUKEY_NAME,
keyValue, alias);
if (rv == 0)
driverTracker[listCount].manuID = strtol(keyValue, 0, 16);
/* get ifdProductID */
- rv = LTPBundleFindValueWithKey(fullPath, PCSCLITE_PRODKEY_NAME,
+ rv = LTPBundleFindValueWithKey(fullPath, PCSCLITE_HP_PRODKEY_NAME,
keyValue, alias);
if (rv == 0)
driverTracker[listCount].productID =
strtol(keyValue, 0, 16);
/* get ifdFriendlyName */
- rv = LTPBundleFindValueWithKey(fullPath, PCSCLITE_NAMEKEY_NAME,
+ rv = LTPBundleFindValueWithKey(fullPath, PCSCLITE_HP_NAMEKEY_NAME,
keyValue, alias);
if (rv == 0)
driverTracker[listCount].readerName = strdup(keyValue);
/* get CFBundleExecutable */
- rv = LTPBundleFindValueWithKey(fullPath, PCSCLITE_LIBRKEY_NAME,
+ rv = LTPBundleFindValueWithKey(fullPath, PCSCLITE_HP_LIBRKEY_NAME,
keyValue, 0);
if (rv == 0)
{
Index: hotplug_linux.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/hotplug_linux.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- hotplug_linux.c 20 Oct 2003 16:48:43 -0000 1.19
+++ hotplug_linux.c 21 Oct 2003 20:00:53 -0000 1.20
@@ -31,20 +31,15 @@
#include "debuglog.h"
#include "sys_generic.h"
#include "parser.h"
+#include "hotplug.h"
#define PCSCLITE_USB_PATH "/proc/bus/usb"
-#define PCSCLITE_MANUKEY_NAME "ifdVendorID"
-#define PCSCLITE_PRODKEY_NAME "ifdProductID"
-#define PCSCLITE_NAMEKEY_NAME "ifdFriendlyName"
-#define PCSCLITE_LIBRKEY_NAME "CFBundleExecutable"
-
/* PCSCLITE_MAX_READERS_CONTEXTS is defined in pcsclite.h */
#define PCSCLITE_HP_MAX_IDENTICAL_READERS 16
#define PCSCLITE_HP_MAX_SIMUL_READERS 04
#define PCSCLITE_HP_MAX_DRIVERS 20
-extern int LTPBundleFindValueWithKey(char *, char *, char *, int);
extern PCSCLITE_MUTEX usbNotifierMutex;
struct usb_device_descriptor
@@ -128,32 +123,32 @@
fullPath[FILENAME_MAX - 1] = '\0';
/* while we find a nth ifdVendorID in Info.plist */
- while (LTPBundleFindValueWithKey(fullPath, PCSCLITE_MANUKEY_NAME,
+ while (LTPBundleFindValueWithKey(fullPath, PCSCLITE_HP_MANUKEY_NAME,
keyValue, alias) == 0)
{
bundleTracker[listCount].bundleName = strdup(currFP->d_name);
/* Get ifdVendorID */
- rv = LTPBundleFindValueWithKey(fullPath, PCSCLITE_MANUKEY_NAME,
+ rv = LTPBundleFindValueWithKey(fullPath, PCSCLITE_HP_MANUKEY_NAME,
keyValue, alias);
if (rv == 0)
bundleTracker[listCount].manuID = strtol(keyValue, 0, 16);
/* get ifdProductID */
- rv = LTPBundleFindValueWithKey(fullPath, PCSCLITE_PRODKEY_NAME,
+ rv = LTPBundleFindValueWithKey(fullPath, PCSCLITE_HP_PRODKEY_NAME,
keyValue, alias);
if (rv == 0)
bundleTracker[listCount].productID =
strtol(keyValue, 0, 16);
/* get ifdFriendlyName */
- rv = LTPBundleFindValueWithKey(fullPath, PCSCLITE_NAMEKEY_NAME,
+ rv = LTPBundleFindValueWithKey(fullPath, PCSCLITE_HP_NAMEKEY_NAME,
keyValue, alias);
if (rv == 0)
bundleTracker[listCount].readerName = strdup(keyValue);
/* get CFBundleExecutable */
- rv = LTPBundleFindValueWithKey(fullPath, PCSCLITE_LIBRKEY_NAME,
+ rv = LTPBundleFindValueWithKey(fullPath, PCSCLITE_HP_LIBRKEY_NAME,
keyValue, 0);
if (rv == 0)
{
@@ -378,7 +373,7 @@
LONG HPAddHotPluggable(int i, unsigned long usbAddr)
{
- RFAddReader(bundleTracker[i].readerName, 0x200000 + usbAddr,
+ RFAddReader(bundleTracker[i].readerName, PCSCLITE_HP_BASE_PORT + usbAddr,
bundleTracker[i].libraryPath);
return 1;
@@ -386,7 +381,7 @@
LONG HPRemoveHotPluggable(int i, unsigned long usbAddr)
{
- RFRemoveReader(bundleTracker[i].readerName, 0x200000 + usbAddr);
+ RFRemoveReader(bundleTracker[i].readerName, PCSCLITE_HP_BASE_PORT + usbAddr);
return 1;
} /* End of function */
Index: hotplug_macosx.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/hotplug_macosx.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -d -r1.12 -r1.13
--- hotplug_macosx.c 18 Oct 2003 17:19:36 -0000 1.12
+++ hotplug_macosx.c 21 Oct 2003 20:00:53 -0000 1.13
@@ -22,19 +22,12 @@
#include "wintypes.h"
#include "pcsclite.h"
+#include "readerfactory.h"
+#include "winscard_msg.h"
#include "debuglog.h"
+#include "sys_generic.h"
+#include "parser.h"
#include "hotplug.h"
-#include "readerfactory.h"
-#include "thread_generic.h"
-
-#ifndef PCSCLITE_HP_DROPDIR
-#define PCSCLITE_HP_DROPDIR "/usr/local/pcsc/drivers/"
-#endif
-
-#define PCSCLITE_HP_MANUKEY_NAME "ifdVendorID"
-#define PCSCLITE_HP_PRODKEY_NAME "ifdProductID"
-#define PCSCLITE_HP_NAMEKEY_NAME "ifdFriendlyName"
-#define PCSCLITE_HP_BASE_PORT 0x200000
#define DEBUG_MACOS_HOTPLUG
Index: parser.h
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/parser.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- parser.h 18 Oct 2003 17:19:36 -0000 1.4
+++ parser.h 21 Oct 2003 20:00:53 -0000 1.5
@@ -10,6 +10,14 @@
* $Id$
*/
+#ifndef __parser_h__
+#define __parser_h__
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
#define TOKEN_MAX_KEY_SIZE 200
#define TOKEN_MAX_VALUE_SIZE 200
@@ -19,3 +27,8 @@
int LTPBundleFindValueWithKey(char *fileName, char *tokenKey,
char *tokenValue, int tokenIndice);
+#ifdef __cplusplus
+}
+#endif
+
+#endif
Index: tokenfactory.c
===================================================================
RCS file: /cvsroot/pcsclite/PCSC/src/tokenfactory.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- tokenfactory.c 18 Oct 2003 17:19:36 -0000 1.17
+++ tokenfactory.c 21 Oct 2003 20:00:53 -0000 1.18
@@ -37,8 +37,6 @@
#define MSC_LIBRMSC_KEY_NAME "CFBundleExecutable"
#define MSC_DEFAULTAPP_NAME "spDefaultApplication"
-extern int LTPBundleFindValueWithKey(char *, char *, char *, int);
-
int atrToString(MSCPUChar8 Atr, MSCULong32 Length, char *outAtr)
{
- Previous message: [Pcsclite-cvs-commit] PCSC/src readerfactory.c,1.31,1.32 pcscdaemon.c,1.34,1.35
- Next message: [Pcsclite-cvs-commit] PCSC/src hotplug_libusb.c,1.16,1.17 hotplug_linux.c,1.20,1.21 hotplug_macosx.c,1.13,1.14
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]