Interface ICardChannel
Interface for card channels, ie objects capable of managing access to a smartcard.
Namespace: WSCT.Core
Assembly: WSCT.dll
Syntax
public interface ICardChannel
Properties
| Improve this Doc View SourceProtocol
Accessor to the protocol T in use.
Declaration
Protocol Protocol { get; }
Property Value
| Type | Description |
|---|---|
| Protocol |
ReaderName
Accessor to the name of the reader in use.
Declaration
string ReaderName { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Methods
| Improve this Doc View SourceAttach(ICardContext, String)
Associates a card context and reader to the instance.
Declaration
void Attach(ICardContext context, string readerName)
Parameters
| Type | Name | Description |
|---|---|---|
| ICardContext | context | Context of the resource manager. |
| System.String | readerName | Name of the reader to use for this instance. |
Connect(ShareMode, Protocol)
Establishes a connection with the smartcard contained by the reader.
Declaration
ErrorCode Connect(ShareMode shareMode, Protocol preferedProtocol)
Parameters
| Type | Name | Description |
|---|---|---|
| ShareMode | shareMode | Shared access mode. |
| Protocol | preferedProtocol | Protocol T to use. |
Returns
| Type | Description |
|---|---|
| ErrorCode | Success if succeeded. |
Disconnect(Disposition)
Terminates the connection with the smartcard in the reader.
Declaration
ErrorCode Disconnect(Disposition disposition)
Parameters
| Type | Name | Description |
|---|---|---|
| Disposition | disposition | What to do with the card after disconnection. |
Returns
| Type | Description |
|---|---|
| ErrorCode | Success if succeeded. |
GetAttrib(Attrib, ref Byte[])
Retrieves an attribute from the reader, in the context of the card used.
Declaration
ErrorCode GetAttrib(Attrib attrib, ref byte[] buffer)
Parameters
| Type | Name | Description |
|---|---|---|
| Attrib | attrib | Identifier to the attrib to retrieve. |
| System.Byte[] | buffer | Buffer that will be set to the value of the attrib. |
Returns
| Type | Description |
|---|---|
| ErrorCode | Success if succeeded. |
GetStatus()
Retrieves current status of the smartcard in the reader.
Declaration
State GetStatus()
Returns
| Type | Description |
|---|---|
| State | Success if succeeded. |
Reconnect(ShareMode, Protocol, Disposition)
Re-establishes a connection with the smartcard contained by the reader.
Declaration
ErrorCode Reconnect(ShareMode shareMode, Protocol preferedProtocol, Disposition initialization)
Parameters
| Type | Name | Description |
|---|---|---|
| ShareMode | shareMode | Shared access mode. |
| Protocol | preferedProtocol | Protocol T to use. |
| Disposition | initialization | Reconnection mode. |
Returns
| Type | Description |
|---|---|
| ErrorCode | Success if succeeded. |
Transmit(ICardCommand, ICardResponse)
Sends a service request to the smart card and expects to receive data back from the card.
Declaration
ErrorCode Transmit(ICardCommand command, ICardResponse response)
Parameters
| Type | Name | Description |
|---|---|---|
| ICardCommand | command | Command to send to the smartcard. |
| ICardResponse | response | Response received from the smartcard. |
Returns
| Type | Description |
|---|---|
| ErrorCode | Success if succeeded. |