Changeset 45033 in vbox for trunk/src/VBox/Main
- Timestamp:
- Mar 13, 2013 11:45:23 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-client/UsbCardReader.cpp
r45032 r45033 69 69 if (!pUsbCardReader) 70 70 { 71 pThis->pICardReaderUp->pfn CardReaderUpSetStatusChange(pThis->pICardReaderUp,72 73 71 pThis->pICardReaderUp->pfnSetStatusChange(pThis->pICardReaderUp, 72 pvUser, VRDE_SCARD_E_NO_SMARTCARD, 73 paReaderStats, cReaderStats); 74 74 } 75 75 else … … 90 90 if (!pUsbCardReader) 91 91 { 92 pThis->pICardReaderUp->pfn CardReaderUpEstablishContext(pThis->pICardReaderUp,93 92 pThis->pICardReaderUp->pfnEstablishContext(pThis->pICardReaderUp, 93 VRDE_SCARD_E_NO_SMARTCARD); 94 94 } 95 95 else … … 130 130 if (!pUsbCardReader) 131 131 { 132 pThis->pICardReaderUp->pfn CardReaderUpStatus(pThis->pICardReaderUp,133 134 135 136 137 138 139 140 132 pThis->pICardReaderUp->pfnStatus(pThis->pICardReaderUp, 133 pvUser, 134 VRDE_SCARD_E_NO_SMARTCARD, 135 /* pszReaderName */ NULL, 136 /* cchReaderName */ 0, 137 /* u32CardState */ 0, 138 /* u32Protocol */ 0, 139 /* pu8Atr */ 0, 140 /* cbAtr */ 0); 141 141 } 142 142 else … … 160 160 if (!pUsbCardReader) 161 161 { 162 pThis->pICardReaderUp->pfnC ardReaderUpConnect(pThis->pICardReaderUp,163 164 165 162 pThis->pICardReaderUp->pfnConnect(pThis->pICardReaderUp, 163 pvUser, 164 VRDE_SCARD_E_NO_SMARTCARD, 165 0); 166 166 } 167 167 else … … 184 184 if (!pUsbCardReader) 185 185 { 186 pThis->pICardReaderUp->pfn CardReaderUpDisconnect(pThis->pICardReaderUp,187 188 186 pThis->pICardReaderUp->pfnDisconnect(pThis->pICardReaderUp, 187 pvUser, 188 VRDE_SCARD_E_NO_SMARTCARD); 189 189 } 190 190 else … … 209 209 if (!pUsbCardReader) 210 210 { 211 pThis->pICardReaderUp->pfn CardReaderUpTransmit(pThis->pICardReaderUp,212 213 214 215 216 211 pThis->pICardReaderUp->pfnTransmit(pThis->pICardReaderUp, 212 pvUser, 213 VRDE_SCARD_E_NO_SMARTCARD, 214 /* pioRecvPci */ NULL, 215 /* pu8RecvBuffer */ NULL, 216 /* cbRecvBuffer*/ 0); 217 217 } 218 218 else … … 240 240 if (!pUsbCardReader) 241 241 { 242 pThis->pICardReaderUp->pfn CardReaderUpGetAttrib(pThis->pICardReaderUp,243 244 245 246 247 242 pThis->pICardReaderUp->pfnGetAttrib(pThis->pICardReaderUp, 243 pvUser, 244 VRDE_SCARD_E_NO_SMARTCARD, 245 u32AttrId, 246 /* pvAttrib */ NULL, 247 /* cbAttrib */ 0); 248 248 } 249 249 else … … 267 267 if (!pUsbCardReader) 268 268 { 269 pThis->pICardReaderUp->pfn CardReaderUpSetAttrib(pThis->pICardReaderUp,270 271 272 269 pThis->pICardReaderUp->pfnSetAttrib(pThis->pICardReaderUp, 270 pvUser, 271 VRDE_SCARD_E_NO_SMARTCARD, 272 u32AttrId); 273 273 } 274 274 else … … 296 296 if (!pUsbCardReader) 297 297 { 298 pThis->pICardReaderUp->pfnC ardReaderUpControl(pThis->pICardReaderUp,299 300 301 302 303 298 pThis->pICardReaderUp->pfnControl(pThis->pICardReaderUp, 299 pvUser, 300 VRDE_SCARD_E_NO_SMARTCARD, 301 u32ControlCode, 302 /* pvOutBuffer */ NULL, 303 /* cbOutBuffer */ 0); 304 304 } 305 305 else … … 891 891 } 892 892 893 mpDrv->pICardReaderUp->pfn CardReaderUpSetStatusChange(mpDrv->pICardReaderUp,894 895 896 897 893 mpDrv->pICardReaderUp->pfnSetStatusChange(mpDrv->pICardReaderUp, 894 pCtx->pvUser, 895 rcCard, 896 pCtx->u.GetStatusChange.paReaderStats, 897 pCtx->u.GetStatusChange.cReaderStats); 898 898 899 899 RTMemFree(pCtx); … … 942 942 } 943 943 944 mpDrv->pICardReaderUp->pfnC ardReaderUpConnect(mpDrv->pICardReaderUp,945 946 947 944 mpDrv->pICardReaderUp->pfnConnect(mpDrv->pICardReaderUp, 945 pCtx->pvUser, 946 rcCard, 947 u32ActiveProtocol); 948 948 949 949 RTMemFree(pCtx); … … 984 984 } 985 985 986 mpDrv->pICardReaderUp->pfn CardReaderUpDisconnect(mpDrv->pICardReaderUp,987 988 986 mpDrv->pICardReaderUp->pfnDisconnect(mpDrv->pICardReaderUp, 987 pCtx->pvUser, 988 rcCard); 989 989 990 990 RTMemFree(pCtx); … … 1062 1062 } 1063 1063 1064 mpDrv->pICardReaderUp->pfn CardReaderUpStatus(mpDrv->pICardReaderUp,1065 1066 1067 1068 1069 1070 1071 1072 1064 mpDrv->pICardReaderUp->pfnStatus(mpDrv->pICardReaderUp, 1065 pCtx->pvUser, 1066 rcCard, 1067 pszReaderName, 1068 cchReaderName, 1069 u32CardState, 1070 u32Protocol, 1071 pbAtr, 1072 u32AtrLength); 1073 1073 1074 1074 RTMemFree(pCtx); … … 1107 1107 } 1108 1108 1109 mpDrv->pICardReaderUp->pfn CardReaderUpTransmit(mpDrv->pICardReaderUp,1110 1111 1112 1113 1114 1109 mpDrv->pICardReaderUp->pfnTransmit(mpDrv->pICardReaderUp, 1110 pCtx->pvUser, 1111 rcCard, 1112 pioRecvPci, 1113 pu8RecvBuffer, 1114 cbRecvBuffer); 1115 1115 1116 1116 RTMemFree(pioRecvPci); … … 1149 1149 } 1150 1150 1151 mpDrv->pICardReaderUp->pfnC ardReaderUpControl(mpDrv->pICardReaderUp,1152 1153 1154 1155 1156 1151 mpDrv->pICardReaderUp->pfnControl(mpDrv->pICardReaderUp, 1152 pCtx->pvUser, 1153 rcCard, 1154 pCtx->u.Control.u32ControlCode, 1155 pu8OutBuffer, 1156 cbOutBuffer); 1157 1157 1158 1158 RTMemFree(pCtx); … … 1189 1189 } 1190 1190 1191 mpDrv->pICardReaderUp->pfn CardReaderUpGetAttrib(mpDrv->pICardReaderUp,1192 1193 1194 1195 1196 1191 mpDrv->pICardReaderUp->pfnGetAttrib(mpDrv->pICardReaderUp, 1192 pCtx->pvUser, 1193 rcCard, 1194 pCtx->u.GetAttrib.u32AttrId, 1195 pu8Attrib, 1196 cbAttrib); 1197 1197 1198 1198 RTMemFree(pCtx); … … 1220 1220 } 1221 1221 1222 mpDrv->pICardReaderUp->pfn CardReaderUpSetAttrib(mpDrv->pICardReaderUp,1223 1224 1225 1222 mpDrv->pICardReaderUp->pfnSetAttrib(mpDrv->pICardReaderUp, 1223 pCtx->pvUser, 1224 rcCard, 1225 pCtx->u.SetAttrib.u32AttrId); 1226 1226 1227 1227 RTMemFree(pCtx); … … 1245 1245 */ 1246 1246 1247 return mpDrv->pICardReaderUp->pfn CardReaderUpEstablishContext(mpDrv->pICardReaderUp,1248 1247 return mpDrv->pICardReaderUp->pfnEstablishContext(mpDrv->pICardReaderUp, 1248 VRDE_SCARD_S_SUCCESS); 1249 1249 } 1250 1250 … … 1306 1306 || !m_pRemote->reader.fAvailable) 1307 1307 { 1308 rc = mpDrv->pICardReaderUp->pfn CardReaderUpSetStatusChange(mpDrv->pICardReaderUp,1309 1310 1311 1312 1308 rc = mpDrv->pICardReaderUp->pfnSetStatusChange(mpDrv->pICardReaderUp, 1309 pvUser, 1310 VRDE_SCARD_E_NO_SMARTCARD, 1311 paReaderStats, 1312 cReaderStats); 1313 1313 } 1314 1314 else … … 1317 1317 if (!pCtx) 1318 1318 { 1319 rc = mpDrv->pICardReaderUp->pfn CardReaderUpSetStatusChange(mpDrv->pICardReaderUp,1320 1321 1322 1323 1319 rc = mpDrv->pICardReaderUp->pfnSetStatusChange(mpDrv->pICardReaderUp, 1320 pvUser, 1321 VRDE_SCARD_E_NO_MEMORY, 1322 paReaderStats, 1323 cReaderStats); 1324 1324 } 1325 1325 else … … 1364 1364 || !m_pRemote->reader.fAvailable) 1365 1365 { 1366 rc = mpDrv->pICardReaderUp->pfnC ardReaderUpConnect(mpDrv->pICardReaderUp,1367 1368 1369 1366 rc = mpDrv->pICardReaderUp->pfnConnect(mpDrv->pICardReaderUp, 1367 pvUser, 1368 VRDE_SCARD_E_NO_SMARTCARD, 1369 VRDE_SCARD_PROTOCOL_T0); 1370 1370 } 1371 1371 else … … 1374 1374 if (!pCtx) 1375 1375 { 1376 rc = mpDrv->pICardReaderUp->pfnC ardReaderUpConnect(mpDrv->pICardReaderUp,1377 1378 1379 1376 rc = mpDrv->pICardReaderUp->pfnConnect(mpDrv->pICardReaderUp, 1377 pvUser, 1378 VRDE_SCARD_E_NO_MEMORY, 1379 VRDE_SCARD_PROTOCOL_T0); 1380 1380 } 1381 1381 else … … 1416 1416 || !m_pRemote->reader.fHandle) 1417 1417 { 1418 rc = mpDrv->pICardReaderUp->pfn CardReaderUpDisconnect(mpDrv->pICardReaderUp,1419 1420 1418 rc = mpDrv->pICardReaderUp->pfnDisconnect(mpDrv->pICardReaderUp, 1419 pvUser, 1420 VRDE_SCARD_E_NO_SMARTCARD); 1421 1421 } 1422 1422 else … … 1425 1425 if (!pCtx) 1426 1426 { 1427 rc = mpDrv->pICardReaderUp->pfn CardReaderUpDisconnect(mpDrv->pICardReaderUp,1428 1429 1427 rc = mpDrv->pICardReaderUp->pfnDisconnect(mpDrv->pICardReaderUp, 1428 pvUser, 1429 VRDE_SCARD_E_NO_MEMORY); 1430 1430 } 1431 1431 else … … 1467 1467 || !m_pRemote->reader.fHandle) 1468 1468 { 1469 rc = mpDrv->pICardReaderUp->pfn CardReaderUpStatus(mpDrv->pICardReaderUp,1470 1471 1472 1473 1474 1475 1476 1477 1469 rc = mpDrv->pICardReaderUp->pfnStatus(mpDrv->pICardReaderUp, 1470 pvUser, 1471 VRDE_SCARD_E_NO_SMARTCARD, 1472 /* pszReaderName */ NULL, 1473 /* cchReaderName */ 0, 1474 /* u32CardState */ 0, 1475 /* u32Protocol */ 0, 1476 /* pu8Atr */ 0, 1477 /* cbAtr */ 0); 1478 1478 } 1479 1479 else … … 1482 1482 if (!pCtx) 1483 1483 { 1484 rc = mpDrv->pICardReaderUp->pfn CardReaderUpStatus(mpDrv->pICardReaderUp,1485 1486 1487 1488 1489 1490 1491 1492 1484 rc = mpDrv->pICardReaderUp->pfnStatus(mpDrv->pICardReaderUp, 1485 pvUser, 1486 VRDE_SCARD_E_NO_MEMORY, 1487 /* pszReaderName */ NULL, 1488 /* cchReaderName */ 0, 1489 /* u32CardState */ 0, 1490 /* u32Protocol */ 0, 1491 /* pu8Atr */ 0, 1492 /* cbAtr */ 0); 1493 1493 } 1494 1494 else … … 1560 1560 Assert(pCtx == NULL); 1561 1561 1562 rc = pDrv->pICardReaderUp->pfn CardReaderUpTransmit(pDrv->pICardReaderUp,1563 1564 1565 1566 1567 1562 rc = pDrv->pICardReaderUp->pfnTransmit(pDrv->pICardReaderUp, 1563 pvUser, 1564 rcSCard, 1565 /* pioRecvPci */ NULL, 1566 /* pu8RecvBuffer */ NULL, 1567 /* cbRecvBuffer*/ 0); 1568 1568 } 1569 1569 else … … 1645 1645 Assert(pCtx == NULL); 1646 1646 1647 rc = pDrv->pICardReaderUp->pfnC ardReaderUpControl(pDrv->pICardReaderUp,1648 1649 1650 1651 1652 1647 rc = pDrv->pICardReaderUp->pfnControl(pDrv->pICardReaderUp, 1648 pvUser, 1649 rcSCard, 1650 u32ControlCode, 1651 /* pvOutBuffer */ NULL, 1652 /* cbOutBuffer*/ 0); 1653 1653 } 1654 1654 else … … 1719 1719 Assert(pCtx == NULL); 1720 1720 1721 pDrv->pICardReaderUp->pfn CardReaderUpGetAttrib(pDrv->pICardReaderUp,1722 1723 1724 1725 1726 1721 pDrv->pICardReaderUp->pfnGetAttrib(pDrv->pICardReaderUp, 1722 pvUser, 1723 rcSCard, 1724 u32AttrId, 1725 /* pvAttrib */ NULL, 1726 /* cbAttrib */ 0); 1727 1727 } 1728 1728 else … … 1792 1792 Assert(pCtx == NULL); 1793 1793 1794 pDrv->pICardReaderUp->pfn CardReaderUpSetAttrib(pDrv->pICardReaderUp,1795 1796 1797 1794 pDrv->pICardReaderUp->pfnSetAttrib(pDrv->pICardReaderUp, 1795 pvUser, 1796 rcSCard, 1797 u32AttrId); 1798 1798 } 1799 1799 else
Note:
See TracChangeset
for help on using the changeset viewer.