Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages

readerserver.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  $RCSfile: readerserver.h,v $
00003  -------------------
00004  cvs         : $Id: readerserver.h,v 1.6 2003/04/22 22:59:23 aquamaniac Exp $
00005  begin       : Sat Jan 11 2003
00006  copyright   : (C) 2003 by Martin Preuss
00007  email       : martin@libchipcard.de
00008 
00009  ***************************************************************************
00010  *                                                                         *
00011  *   This library is free software; you can redistribute it and/or         *
00012  *   modify it under the terms of the GNU Lesser General Public            *
00013  *   License as published by the Free Software Foundation; either          *
00014  *   version 2.1 of the License, or (at your option) any later version.    *
00015  *                                                                         *
00016  *   This library is distributed in the hope that it will be useful,       *
00017  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00018  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU     *
00019  *   Lesser General Public License for more details.                       *
00020  *                                                                         *
00021  *   You should have received a copy of the GNU Lesser General Public      *
00022  *   License along with this library; if not, write to the Free Software   *
00023  *   Foundation, Inc., 59 Temple Place, Suite 330, Boston,                 *
00024  *   MA  02111-1307  USA                                                   *
00025  *                                                                         *
00026  ***************************************************************************/
00027 
00028 
00029 
00030 #ifndef READERSERVER_H
00031 #define READERSERVER_H "$Id: readerserver.h,v 1.6 2003/04/22 22:59:23 aquamaniac Exp $"
00032 
00033 #include <ctcore.h>
00034 #include <ctserver.h>
00035 #include <chameleon/conf.h>
00036 
00037 
00038 #ifdef __cplusplus
00039 extern "C" {
00040 #endif
00041 
00042 
00043 /*___________________________________________________________________________
00044  *AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
00045  *                          Wait-For-Reader-Status
00046  *YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
00047  */
00048 
00049 typedef struct READERSERVERWAITSTRUCT READERSERVERWAITDATA;
00050 struct READERSERVERWAITSTRUCT {
00051   READERSERVERWAITDATA *next;
00052   int msgLayerId;
00053   int requestId;
00054   int mustChange;
00055   char *typeName;
00056   unsigned int readerFlags;
00057   unsigned int readerFlagsMask;
00058   unsigned int readerStatus;
00059   unsigned int readerStatusMask;
00060   unsigned int readerDeltaStatus;
00061 };
00062 
00063 
00064 READERSERVERWAITDATA *ReaderServer__WaitRequest_new();
00065 void ReaderServer_WaitRequest__free(READERSERVERWAITDATA *wr);
00066 
00067 
00068 
00069 /*___________________________________________________________________________
00070  *AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
00071  *                          Wait-For-Reader-Unlock
00072  *YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY
00073  */
00074 
00075 typedef struct READERSERVEROPENSTRUCT READERSERVEROPENDATA;
00076 struct READERSERVEROPENSTRUCT {
00077   READERSERVEROPENDATA *next;
00078   int msgLayerId;
00079   int requestId;
00080   int readerId;
00081   int readerNumber;
00082   int cardId;
00083 };
00084 
00085 READERSERVEROPENDATA *ReaderServer__OpenRequest_new();
00086 void ReaderServer_OpenRequest__free(READERSERVEROPENDATA *wr);
00087 
00088 
00089 
00090 
00091 
00092 struct READERSERVERDATASTRUCT {
00093   CTCORETABLE *core;
00094   int coreClientId;
00095   READERSERVERWAITDATA *waitRequests;
00096   READERSERVEROPENDATA *openRequests;
00097 };
00098 typedef struct READERSERVERDATASTRUCT READERSERVERDATA;
00099 
00100 
00101 READERSERVERDATA *ReaderServer_new();
00102 void ReaderServer_free(READERSERVERDATA *rsd);
00103 
00104 ERRORCODE ReaderServer_Init(CTSERVERDATA *sd, CONFIGGROUP *root);
00105 ERRORCODE ReaderServer_Fini(CTSERVERDATA *sd);
00106 
00111 ERRORCODE ReaderServer_AddReader(CTSERVERDATA *sd, CTREADERDESCRIPTION *rd);
00112 ERRORCODE ReaderServer_AllocAllReaders(CTSERVERDATA *sd);
00113 ERRORCODE ReaderServer_CheckWaitResponses(CTSERVERDATA *sd,
00114                                           int mustChange);
00115 ERRORCODE ReaderServer_CheckOpenResponses(CTSERVERDATA *sd,
00116                                           int ignoreLocks);
00117 ERRORCODE ReaderServer_Work(CTSERVERDATA *sd,
00118                             int timeout,
00119                             int maxmsg);
00120 
00121 
00122 #ifdef __cplusplus
00123 }
00124 #endif
00125 
00126 
00127 #endif
00128 

Generated on Mon Jan 5 20:56:27 2004 for libchipcard by doxygen 1.3.4