shareToInt static method

int shareToInt(
  1. PcscShare share
)

Converts a share mode to its corresponding identifier.

Implementation

static int shareToInt(PcscShare share) {
  switch (share) {
    case PcscShare.exclusive:
      return PcscConstants.SCARD_SHARE_EXCLUSIVE;
    case PcscShare.shared:
      return PcscConstants.SCARD_SHARE_SHARED;
    case PcscShare.direct:
      return PcscConstants.SCARD_SHARE_DIRECT;
  }
}