Skip to content

Commit

Permalink
Remove unused SCardHelper_PrintReaderStateList()
Browse files Browse the repository at this point in the history
  • Loading branch information
LudovicRousseau committed Sep 27, 2024
1 parent 1baa8ea commit a75f2f4
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 72 deletions.
71 changes: 0 additions & 71 deletions src/smartcard/scard/helpers.c
Original file line number Diff line number Diff line change
Expand Up @@ -681,77 +681,6 @@ build a READERSTATELIST from a Python list of reader states
return (READERSTATELIST*)prl;
}

/**=======================================================================**/
void SCardHelper_PrintReaderStateList( READERSTATELIST* prl )
/*===========================================================================
dump a reader state list
===========================================================================*/
{
int i;
SCARDDWORDARG j;

for( i=0; prl && i<prl->cRStates; i++ )
{
printf("%s userdata: %p current: %lx event: %lx \n",
prl->ars[i].szReader,
prl->ars[i].pvUserData,
(long)prl->ars[i].dwCurrentState,
(long)prl->ars[i].dwEventState );
for(j=0; j<prl->ars[i].cbAtr; j++ )
{
printf("0x%.2X ", prl->ars[i].rgbAtr[j] );
}
printf("\n");

#ifdef WIN32
// SCARD_STATE_UNAWARE is 0 on Unix
if(prl->ars[i].dwEventState & SCARD_STATE_UNAWARE)
{
printf("Card state unaware\n");
}
#endif
if(prl->ars[i].dwEventState & SCARD_STATE_IGNORE)
{
printf("Card state ignore\n");
}
if(prl->ars[i].dwEventState & SCARD_STATE_CHANGED)
{
printf("Card state changed\n");
}
if(prl->ars[i].dwEventState & SCARD_STATE_UNKNOWN)
{
printf("Card state unknown\n");
}
if(prl->ars[i].dwEventState & SCARD_STATE_UNAVAILABLE)
{
printf("Card state unavailable\n");
}
if(prl->ars[i].dwEventState & SCARD_STATE_EMPTY)
{
printf("No card in reader\n");
}
if(prl->ars[i].dwEventState & SCARD_STATE_PRESENT)
{
printf("Card in reader\n");
}
if(prl->ars[i].dwEventState & SCARD_STATE_ATRMATCH)
{
printf("Card found\n");
}
if(prl->ars[i].dwEventState & SCARD_STATE_EXCLUSIVE)
{
printf("Card in reader allocated for exclusive use by another application\n");
}
if(prl->ars[i].dwEventState & SCARD_STATE_INUSE)
{
printf("Card in reader is in use but can be shared\n");
}
if(prl->ars[i].dwEventState & SCARD_STATE_MUTE)
{
printf("Card in reader is mute\n");
}
}
}

/**==========================================================================
SCARDCONTEXT Helpers
Expand Down
1 change: 0 additions & 1 deletion src/smartcard/scard/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ void SCardHelper_PrintGuidList( GUIDLIST* apsz );
// READERSTATELIST helpers
void SCardHelper_AppendReaderStateListToPyObject( READERSTATELIST* source, PyObject** ptarget );
READERSTATELIST* SCardHelper_PyReaderStateListToREADERSTATELIST(PyObject* source);
void SCardHelper_PrintReaderStateList( READERSTATELIST* apsz );

// SCARDCONTEXT helpers
void SCardHelper_AppendSCardContextToPyObject( SCARDCONTEXT source, PyObject** ptarget );
Expand Down

0 comments on commit a75f2f4

Please sign in to comment.