/** @file
* VBox Remote Desktop Extension (VRDE) - SmartCard interface.
*/
/*
* Copyright (C) 2011-2012 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*
* The contents of this file may alternatively be used under the terms
* of the Common Development and Distribution License Version 1.0
* (CDDL) only, as it comes in the "COPYING.CDDL" file of the
* VirtualBox OSE distribution, in which case the provisions of the
* CDDL are applicable instead of those of the GPL.
*
* You may elect to license modified versions of this file under the
* terms and conditions of either the GPL or the CDDL or both.
*/
/*
* Interface for accessing the smart card reader devices on the client.
*
* Async callbacks are used for providing feedback, reporting errors, etc.
*
* The caller prepares a VRDESCARD*REQ structure and submits it.
*/
/** The VRDE server smart card access interface entry points. Interface version 1. */
typedef struct VRDESCARDINTERFACE
{
/** The header. */
/** Submit an async IO request to the client.
*
* @param hServer The VRDE server instance.
* @param pvUser The callers context of this request.
* @param u32Function The function: VRDE_SCARD_FN_*.
* @param pvData Function specific data: VRDESCARD*REQ.
* @param cbData Size of data.
*
* @return IPRT status code.
*/
void *pvUser,
const void *pvData,
/* Smartcard interface callbacks. */
typedef struct VRDESCARDCALLBACKS
{
/** The header. */
/** Notifications.
*
* @param pvContext The callbacks context specified in VRDEGetInterface.
* @param u32Id The notification identifier: VRDE_SCARD_NOTIFY_*.
* @param pvData The notification specific data.
* @param cbData The size of buffer pointed by pvData.
*
* @return IPRT status code.
*/
void *pvData,
/** IO response.
*
* @param pvContext The callbacks context specified in VRDEGetInterface.
* @param rcRequest The IPRT status code for the request.
* @param pvUser The pvUser parameter of VRDESCardRequest.
* @param u32Function The completed function: VRDE_SCARD_FN_*.
* @param pvData Function specific response data: VRDESCARD*RSP.
* @param cbData The size of the buffer pointed by pvData.
*
* @return IPRT status code.
*/
int rcRequest,
void *pvUser,
void *pvData,
/*
* Notifications.
* u32Id parameter of VRDESCARDCALLBACKS::VRDESCardCbNotify.
*/
/*
* Notifications.
* Data structures: pvData of VRDESCARDCALLBACKS::VRDESCardCbNotify.
*/
typedef struct VRDESCARDNOTIFYATTACH
{
typedef struct VRDESCARDNOTIFYDETACH
{
/*
* IO request codes.
* Must be not 0, which is used internally.
*/
/* u32Initialization, u32Disposition */
/* VRDESCARDSTATUSRSP::u32State */
/*
* IO request data structures.
*/
typedef struct VRDESCARDCONTEXT
{
typedef struct VRDESCARDHANDLE
{
typedef struct VRDESCARDREADERSTATECALL
{
typedef struct VRDESCARDREADERSTATERETURN
{
typedef struct VRDESCARDPCI
{
uint32_t u32PciLength; /* Includes u32Protocol and u32PciLength fields. 8 if no data in au8PciData. */
} VRDESCARDPCI;
typedef struct VRDESCARDESTABLISHCONTEXTREQ
{
typedef struct VRDESCARDESTABLISHCONTEXTRSP
{
typedef struct VRDESCARDLISTREADERSREQ
{
typedef struct VRDESCARDLISTREADERSRSP
{
typedef struct VRDESCARDRELEASECONTEXTREQ
{
typedef struct VRDESCARDRELEASECONTEXTRSP
{
typedef struct VRDESCARDGETSTATUSCHANGEREQ
{
typedef struct VRDESCARDGETSTATUSCHANGERSP
{
typedef struct VRDESCARDCANCELREQ
{
typedef struct VRDESCARDCANCELRSP
{
typedef struct VRDESCARDCONNECTREQ
{
typedef struct VRDESCARDCONNECTRSP
{
typedef struct VRDESCARDRECONNECTREQ
{
typedef struct VRDESCARDRECONNECTRSP
{
typedef struct VRDESCARDDISCONNECTREQ
{
typedef struct VRDESCARDDISCONNECTRSP
{
typedef struct VRDESCARDBEGINTRANSACTIONREQ
{
typedef struct VRDESCARDBEGINTRANSACTIONRSP
{
typedef struct VRDESCARDENDTRANSACTIONREQ
{
typedef struct VRDESCARDENDTRANSACTIONRSP
{
typedef struct VRDESCARDSTATEREQ
{
typedef struct VRDESCARDSTATERSP
{
typedef struct VRDESCARDSTATUSREQ
{
typedef struct VRDESCARDSTATUSRSP
{
char *szReader;
typedef struct VRDESCARDTRANSMITREQ
{
typedef struct VRDESCARDTRANSMITRSP
{
typedef struct VRDESCARDCONTROLREQ
{
typedef struct VRDESCARDCONTROLRSP
{
typedef struct VRDESCARDGETATTRIBREQ
{
typedef struct VRDESCARDGETATTRIBRSP
{
typedef struct VRDESCARDSETATTRIBREQ
{
typedef struct VRDESCARDSETATTRIBRSP
{
#endif