/[winpt]/trunk/Src/wptCardPCSC.c
ViewVC logotype

Diff of /trunk/Src/wptCardPCSC.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 48 by werner, Mon Oct 31 21:14:11 2005 UTC revision 193 by twoaday, Sat Apr 1 12:36:35 2006 UTC
# Line 18  Line 18 
18   * along with WinPT; if not, write to the Free Software Foundation,   * along with WinPT; if not, write to the Free Software Foundation,
19   * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA   * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
20   */   */
   
21  #ifdef HAVE_CONFIG_H  #ifdef HAVE_CONFIG_H
22  #include <config.h>  #include <config.h>
23  #endif  #endif
24    
25  #include <stdio.h>  #if 0 /* not needed right now. */
26  #include <stdio.h>  #include <stdio.h>
27  #include <windows.h>  #include <windows.h>
28    #ifndef __MINGW32__
29    #include <winscard.h>
30    #endif
31    
32  #include "gpgme.h"  #include "gpgme.h"
33  #include "wptTypes.h"  #include "wptTypes.h"
# Line 36  Line 38 
38     mingw does not come with winscard and we dlopen the stuff     mingw does not come with winscard and we dlopen the stuff
39     anyway. */     anyway. */
40  typedef unsigned long pcsc_context_t;  typedef unsigned long pcsc_context_t;
   
41  struct pcsc_readerstate_s  struct pcsc_readerstate_s
42  {  {
43    const char *reader;      const char *reader;
44    void *user_data;      void *user_data;
45    unsigned long current_state;      unsigned long current_state;
46    unsigned long event_state;      unsigned long event_state;
47    unsigned long atrlen;      unsigned long atrlen;
48    unsigned char atr[33];      unsigned char atr[33];
49  };  };
50    
51  typedef struct pcsc_readerstate_s *pcsc_readerstate_t;  typedef struct pcsc_readerstate_s *pcsc_readerstate_t;
# Line 110  typedef struct pcsc_readerstate_s *pcsc_ Line 111  typedef struct pcsc_readerstate_s *pcsc_
111  #define PCSC_E_READER_UNAVAILABLE      0x80100017  #define PCSC_E_READER_UNAVAILABLE      0x80100017
112  #define PCSC_W_REMOVED_CARD            0x80100069  #define PCSC_W_REMOVED_CARD            0x80100069
113    
114    
115  /* Possible card states. */  /* Possible card states. */
116  enum card_state_t {  enum card_state_t {
117      CARD_STATE_NONE=0,      CARD_STATE_NONE=0,
# Line 294  pcsc_scan_readers (pcsc_reader_t * ret_r Line 296  pcsc_scan_readers (pcsc_reader_t * ret_r
296          if (rc == PCSC_E_TIMEOUT)          if (rc == PCSC_E_TIMEOUT)
297              continue;              continue;
298          if (rc)          if (rc)
299            ; /* FIXME:  What is this?? */              ; /* FIXME:  What is this?? */
300    
301          /* next reader */          /* next reader */
302          curr_rd++;          curr_rd++;
# Line 332  pcsc_get_card_status (void) Line 334  pcsc_get_card_status (void)
334          stat |= CARD_STATE_EXCLUSI;          stat |= CARD_STATE_EXCLUSI;
335      return stat;      return stat;
336  }  }
337    #endif

Legend:
Removed from v.48  
changed lines
  Added in v.193

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26