[Pcsclite-cvs-commit] r3056 - in /trunk/PCSC/src: error.c winscard_clnt.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Mon Jul 7 08:38:55 UTC 2008


Author: rousseau
Date: Mon Jul  7 08:38:54 2008
New Revision: 3056

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=3056
Log:
improve Doxygen documentation

Modified:
    trunk/PCSC/src/error.c
    trunk/PCSC/src/winscard_clnt.c

Modified: trunk/PCSC/src/error.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/error.c?rev=3056&op=diff
==============================================================================
--- trunk/PCSC/src/error.c (original)
+++ trunk/PCSC/src/error.c Mon Jul  7 08:38:54 2008
@@ -3,7 +3,7 @@
  *
  * Copyright (C) 1999-2002
  *  David Corcoran <corcoran at linuxnet.com>
- * Copyright (C) 1999-2005
+ * Copyright (C) 1999-2008
  *  Ludovic Rousseau <ludovic.rousseau at free.fr>
  *
  * This file is dual licenced:
@@ -26,18 +26,19 @@
 #include "strlcpycat.h"
 
 /**
- * @brief This function return a human readable text for the given PC/SC error code.
+ * @brief This function return a human readable text for the given PC/SC error
+ * code.
  *
  * @ingroup API
  * @param[in] pcscError Error code to be translated to text.
  *
- * @return Text representing de error code passed.
+ * @return Text representing the error code passed.
  *
  * @test
  * @code
  * SCARDCONTEXT hContext;
  * LONG rv;
- * rv = SCardEstablishContext(SCARD\_SCOPE\_SYSTEM, NULL, NULL, &hContext);
+ * rv = SCardEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL, &hContext);
  * if (rv != SCARD_S_SUCCESS)
  *     printf("SCardReleaseContext: %s (0x%lX)\n",
  *         pcsc_stringify_error(rv), rv);
@@ -174,4 +175,3 @@
 	return strError;
 }
 
-

Modified: trunk/PCSC/src/winscard_clnt.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/PCSC/src/winscard_clnt.c?rev=3056&op=diff
==============================================================================
--- trunk/PCSC/src/winscard_clnt.c (original)
+++ trunk/PCSC/src/winscard_clnt.c Mon Jul  7 08:38:54 2008
@@ -269,7 +269,6 @@
  * @brief Creates an Application Context to the PC/SC Resource Manager.
 
  * This must be the first function called in a PC/SC application.
- * This is a thread-safe wrapper to the function SCardEstablishContextTH().
  *
  * @ingroup API
  * @param[in] dwScope Scope of the establishment.
@@ -278,7 +277,7 @@
  * - \ref SCARD_SCOPE_TERMINAL - Not used.
  * - \ref SCARD_SCOPE_GLOBAL - Not used.
  * - \ref SCARD_SCOPE_SYSTEM - Services on the local machine.
- * @param[in] pvReserved1 Reserved for future use. Can be used for remote connection.
+ * @param[in] pvReserved1 Reserved for future use.
  * @param[in] pvReserved2 Reserved for future use.
  * @param[out] phContext Returned Application Context.
  *
@@ -666,9 +665,8 @@
 }
 
 /**
- * This function establishes a connection to the friendly name of the reader
- * specified in \p szReader. The first connection will power up and perform a
- * reset on the card.
+ * @brief This function establishes a connection to the reader specified in \p
+ * szReader.
  *
  * @ingroup API
  * @param[in] hContext Connection context to the PC/SC Resource Manager.
@@ -687,8 +685,8 @@
  * - \ref SCARD_PROTOCOL_T1 - Use the T=1 protocol.
  * - \ref SCARD_PROTOCOL_RAW - Use with memory type cards.
  * \p dwPreferredProtocols is a bit mask of acceptable protocols for the
- * connection. You can use (SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1) if you
- * do not have a preferred protocol.
+ * connection. You can use (\ref SCARD_PROTOCOL_T0 | \ref SCARD_PROTOCOL_T1) if
+ * you do not have a preferred protocol.
  * @param[out] phCard Handle to this connection.
  * @param[out] pdwActiveProtocol Established protocol to this connection.
  *
@@ -875,15 +873,18 @@
  * BYTE pbSendBuffer[] = {0xC0, 0xA4, 0x00, 0x00, 0x02, 0x3F, 0x00};
  * ...
  * rv = SCardEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL, &hContext);
- * rv = SCardConnect(hContext, "Reader X", SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0, &hCard, &dwActiveProtocol);
+ * rv = SCardConnect(hContext, "Reader X", SCARD_SHARE_SHARED,
+ *          SCARD_PROTOCOL_T0, &hCard, &dwActiveProtocol);
  * ...
  * dwSendLength = sizeof(pbSendBuffer);
  * dwRecvLength = sizeof(pbRecvBuffer);
- * rv = SCardTransmit(hCard, SCARD_PCI_T0, pbSendBuffer, dwSendLength, &pioRecvPci, pbRecvBuffer, &dwRecvLength);
+ * rv = SCardTransmit(hCard, SCARD_PCI_T0, pbSendBuffer, dwSendLength,
+ *          &pioRecvPci, pbRecvBuffer, &dwRecvLength);
  * / * Card has been reset by another application * /
  * if (rv == SCARD_W_RESET_CARD)
  * {
- *   rv = SCardReconnect(hCard, SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0, SCARD_RESET_CARD, &dwActiveProtocol);
+ *   rv = SCardReconnect(hCard, SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0,
+ *            SCARD_RESET_CARD, &dwActiveProtocol);
  * }
  * @endcode
  */
@@ -982,8 +983,7 @@
 }
 
 /**
- * This function terminates a connection to the connection made through
- * SCardConnect(). \p dwDisposition can have the following values:
+ * @brief This function terminates a connection made through SCardConnect().
  *
  * @ingroup API
  * @param[in] hCard Connection made from SCardConnect().
@@ -1008,7 +1008,8 @@
  * LONG rv;
  * ...
  * rv = SCardEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL, &hContext);
- * rv = SCardConnect(hContext, "Reader X", SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0, &hCard, &dwActiveProtocol);
+ * rv = SCardConnect(hContext, "Reader X", SCARD_SHARE_SHARED,
+ *          SCARD_PROTOCOL_T0, &hCard, &dwActiveProtocol);
  * rv = SCardDisconnect(hCard, SCARD_UNPOWER_CARD);
  * @endcode
  */
@@ -1082,7 +1083,7 @@
 
 /**
  * @brief This function establishes a temporary exclusive access mode for
- * doing a series of commands or transaction.
+ * doing a serie of commands in a transaction.
  *
  * You might want to use this when you are selecting a few files and then
  * writing a large file so you can make sure that another application will
@@ -1109,7 +1110,8 @@
  * LONG rv;
  * ...
  * rv = SCardEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL, &hContext);
- * rv = SCardConnect(hContext, "Reader X", SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0, &hCard, &dwActiveProtocol);
+ * rv = SCardConnect(hContext, "Reader X", SCARD_SHARE_SHARED,
+ *          SCARD_PROTOCOL_T0, &hCard, &dwActiveProtocol);
  * rv = SCardBeginTransaction(hCard);
  * ...
  * / * Do some transmit commands * /
@@ -1240,7 +1242,8 @@
  * LONG rv;
  * ...
  * rv = SCardEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL, &hContext);
- * rv = SCardConnect(hContext, "Reader X", SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0, &hCard, &dwActiveProtocol);
+ * rv = SCardConnect(hContext, "Reader X", SCARD_SHARE_SHARED,
+ *          SCARD_PROTOCOL_T0, &hCard, &dwActiveProtocol);
  * rv = SCardBeginTransaction(hCard);
  * ...
  * / * Do some transmit commands * /
@@ -2155,8 +2158,8 @@
 }
 
 /**
- * @brief This function sends a command directly to the IFD Handler to be
- * processed by the reader.
+ * @brief This function sends a command directly to the IFD Handler (reader
+ * driver) to be processed by the reader.
  *
  * This is useful for creating client side reader drivers for functions like
  * PIN pads, biometrics, or other extensions to the normal smart card reader
@@ -2400,8 +2403,9 @@
 }
 
 /**
- * This function get an attribute from the IFD Handler. The list of possible
- * attributes is available in the file \c pcsclite.h.
+ * @brief This function get an attribute from the IFD Handler (reader driver).
+ *
+ * The list of possible attributes is available in the file \c reader.h.
  *
  * @ingroup API
  * @param[in] hCard Connection made from SCardConnect().
@@ -2728,10 +2732,12 @@
  * BYTE pbSendBuffer[] = { 0xC0, 0xA4, 0x00, 0x00, 0x02, 0x3F, 0x00 };
  * ...
  * rv = SCardEstablishContext(SCARD_SCOPE_SYSTEM, NULL, NULL, &hContext);
- * rv = SCardConnect(hContext, "Reader X", SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0, &hCard, &dwActiveProtocol);
+ * rv = SCardConnect(hContext, "Reader X", SCARD_SHARE_SHARED,
+ *          SCARD_PROTOCOL_T0, &hCard, &dwActiveProtocol);
  * dwSendLength = sizeof(pbSendBuffer);
  * dwRecvLength = sizeof(pbRecvBuffer);
- * rv = SCardTransmit(hCard, SCARD_PCI_T0, pbSendBuffer, dwSendLength, &pioRecvPci, pbRecvBuffer, &dwRecvLength);
+ * rv = SCardTransmit(hCard, SCARD_PCI_T0, pbSendBuffer, dwSendLength,
+ *          &pioRecvPci, pbRecvBuffer, &dwRecvLength);
  * @endcode
  */
 LONG SCardTransmit(SCARDHANDLE hCard, LPCSCARD_IO_REQUEST pioSendPci,
@@ -3100,8 +3106,8 @@
 }
 
 /**
- * @brief releases memory that has been returned from the resource manager
- * using the SCARD_AUTOALLOCATE length designator.
+ * @brief Releases memory that has been returned from the resource manager
+ * using the \ref SCARD_AUTOALLOCATE length designator.
  *
  * @ingroup API
  * @param[in] hContext Connection context to the PC/SC Resource Manager.
@@ -3143,9 +3149,9 @@
  * then this function will return the size of the buffer needed to allocate in
  * \p pcchGroups.
  *
- * The group names is a multi-string and separated by a nul character ('\\0')
- * and ended by a double nul character. "SCard$DefaultReaders\\0Group 2\\0\\0".
- *
+ * The group names is a multi-string and separated by a nul character (\c
+ * '\\0') and ended by a double nul character like
+ * \c "SCard$DefaultReaders\\0Group 2\\0\\0".
  * @ingroup API
  * @param[in] hContext Connection context to the PC/SC Resource Manager.
  * @param[out] mszGroups List of groups to list readers.
@@ -3288,7 +3294,7 @@
 }
 
 /**
- * @brief check if a \ref SCARDCONTEXT is valid.
+ * @brief Check if a \ref SCARDCONTEXT is valid.
  *
  * Call this function to determine whether a smart card context handle is still
  * valid. After a smart card context handle has been set by
@@ -3344,7 +3350,7 @@
  */
 
 /**
- * @brief Adds an Application Context to the vector \ref psContextMap.
+ * @brief Adds an Application Context to the vector \c _psContextMap.
  *
  * @param[in] hContext Application Context ID.
  * @param[in] dwClientID Client connection ID.
@@ -3374,7 +3380,7 @@
 }
 
 /**
- * @brief Get the index from the Application Context vector \ref psContextMap
+ * @brief Get the index from the Application Context vector \c _psContextMap
  * for the passed context.
  *
  * This function is a thread-safe wrapper to the function
@@ -3397,7 +3403,7 @@
 }
 
 /**
- * @brief Get the index from the Application Context vector \ref psContextMap
+ * @brief Get the index from the Application Context vector \c _psContextMap
  * for the passed context.
  *
  * This functions is not thread-safe and should not be called. Instead, call




More information about the Pcsclite-cvs-commit mailing list