PCSC4Java
0.2
Library PCSC for Java language.
|
00001 /******************************************************** 00002 * Copyright (c) 2011, REDBILLED All Rights Reserved 00003 * 00004 * THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF REDBILLED 00005 * The copyright notice above does not evidence any actual 00006 * or intended publication of such source code. 00007 * ======================================================= 00008 * JNI for the using of PCSC 00009 * ======================================================= 00010 * File : PCSC.h 00011 * 00012 * List of functions 00013 * Java_fr_redbilled_security_pcscforjava_PCSC_SCardEstablishContext 00014 * Java_fr_redbilled_security_pcscforjava_PCSC_SCardReleaseContext 00015 * Java_fr_redbilled_security_pcscforjava_PCSC_SCardCancel 00016 * Java_fr_redbilled_security_pcscforjava_PCSC_SCardIsValidContext 00017 * Java_fr_redbilled_security_pcscforjava_PCSC_SCardLocateCards 00018 * Java_fr_redbilled_security_pcscforjava_PCSC_SCardListReaders 00019 * Java_fr_redbilled_security_pcscforjava_PCSC_SCardConnect 00020 * Java_fr_redbilled_security_pcscforjava_PCSC_SCardTransmit 00021 * Java_fr_redbilled_security_pcscforjava_PCSC_SCardStatus 00022 * Java_fr_redbilled_security_pcscforjava_PCSC_SCardDisconnect 00023 * Java_fr_redbilled_security_pcscforjava_PCSC_SCardGetStatusChange 00024 * Java_fr_redbilled_security_pcscforjava_PCSC_SCardBeginTransaction 00025 * Java_fr_redbilled_security_pcscforjava_PCSC_SCardEndTransaction 00026 * Java_fr_redbilled_security_pcscforjava_PCSC_SCardControl 00027 * Java_fr_redbilled_security_pcscforjava_PCSC_SCardReconnect 00028 * Java_fr_redbilled_security_pcscforjava_PCSC_SCardGetAttrib 00029 * Java_fr_redbilled_security_pcscforjava_PCSC_SCardSetAttrib 00030 * 00031 * UPDATE HISTORY 00032 *-------------------------------------------------------- 00033 *Version | Author | Date | 00034 *-------------------------------------------------------- 00035 * 1.0 ML 22/06/2011 00036 **********************************************************/ 00037 00038 /* Header for class fr_redbilled_security_pcscforjava_PCSC */ 00039 00040 #include "PCSC_Defines.h" 00041 00042 #ifndef _Included_fr_redbilled_security_pcscforjava_PCSC 00043 #define _Included_fr_redbilled_security_pcscforjava_PCSC 00044 #ifdef __cplusplus 00045 extern "C" { 00046 #endif 00047 00048 /* 00049 * Class: fr_redbilled_security_pcscforjava_PCSC 00050 * Method: SCardEstablishContext 00051 * Signature: (I)J 00052 */ 00053 JNIEXPORT jlong JNICALL Java_fr_redbilled_security_pcscforjava_PCSC_SCardEstablishContext 00054 (JNIEnv *, jclass, jint); 00055 00056 /* 00057 * Class: fr_redbilled_security_pcscforjava_PCSC 00058 * Method: SCardReleaseContext 00059 * Signature: (J)V 00060 */ 00061 JNIEXPORT void JNICALL Java_fr_redbilled_security_pcscforjava_PCSC_SCardReleaseContext 00062 (JNIEnv * env, jclass object, jlong lContextId); 00063 00064 /* 00065 * Class: fr_redbilled_security_pcscforjava_PCSC 00066 * Method: SCardCancel 00067 * Signature: (J)V 00068 */ 00069 JNIEXPORT void JNICALL Java_fr_redbilled_security_pcscforjava_PCSC_SCardCancel 00070 (JNIEnv * env, jclass object, jlong lContextId); 00071 00072 /* 00073 * Class: fr_redbilled_security_pcscforjava_PCSC 00074 * Method: SCardIsValidContext 00075 * Signature: (J)V 00076 */ 00077 JNIEXPORT void JNICALL Java_fr_redbilled_security_pcscforjava_PCSC_SCardIsValidContext 00078 (JNIEnv * env, jclass object, jlong lContextId); 00079 00080 /* 00081 * Class: fr_redbilled_security_pcscforjava_PCSC 00082 * Method: SCardListReaders 00083 * Signature: (J)[Ljava/lang/String; 00084 */ 00085 JNIEXPORT jobjectArray JNICALL Java_fr_redbilled_security_pcscforjava_PCSC_SCardListReaders 00086 (JNIEnv *, jclass, jlong); 00087 00088 /* 00089 * Class: fr_redbilled_security_pcscforjava_PCSC 00090 * Method: SCardConnect 00091 * Signature: (JLjava/lang/String;II)J 00092 */ 00093 JNIEXPORT jlong JNICALL Java_fr_redbilled_security_pcscforjava_PCSC_SCardConnect 00094 (JNIEnv *, jclass, jlong, jstring, jint, jint); 00095 00096 /* 00097 * Class: fr_redbilled_security_pcscforjava_PCSC 00098 * Method: SCardTransmit 00099 * Signature: (JI[BII)[B 00100 */ 00101 JNIEXPORT jbyteArray JNICALL Java_fr_redbilled_security_pcscforjava_PCSC_SCardTransmit 00102 (JNIEnv *, jclass, jlong, jint, jbyteArray, jint, jint); 00103 00104 /* 00105 * Class: fr_redbilled_security_pcscforjava_PCSC 00106 * Method: SCardStatus 00107 * Signature: (J[B[Ljava/lang/String;)[B 00108 */ 00109 JNIEXPORT jbyteArray JNICALL Java_fr_redbilled_security_pcscforjava_PCSC_SCardStatus 00110 (JNIEnv *, jclass, jlong, jbyteArray, jobjectArray); 00111 00112 /* 00113 * Class: fr_redbilled_security_pcscforjava_PCSC 00114 * Method: SCardDisconnect 00115 * Signature: (JI)V 00116 */ 00117 JNIEXPORT void JNICALL Java_fr_redbilled_security_pcscforjava_PCSC_SCardDisconnect 00118 (JNIEnv *, jclass, jlong, jint); 00119 00120 /* 00121 * Class: fr_redbilled_security_pcscforjava_PCSC 00122 * Method: SCardGetStatusChange 00123 * Signature: (JJ[I[Ljava/lang/String;)[I 00124 */ 00125 JNIEXPORT jintArray JNICALL Java_fr_redbilled_security_pcscforjava_PCSC_SCardGetStatusChange 00126 (JNIEnv *, jclass, jlong, jlong, jintArray, jobjectArray); 00127 00128 JNIEXPORT jboolean JNICALL Java_fr_redbilled_security_pcscforjava_PCSCPnPThread_SCardPlugAndPlay(JNIEnv *env, jclass object, jlong lContextId, jlong lTimeout); 00129 00130 JNIEXPORT jboolean JNICALL Java_fr_redbilled_security_pcscforjava_PCSCTerminals_SCardIsPlugAndPlaySupported(JNIEnv *env, jclass object, jlong lContextId); 00131 00132 /* 00133 * Class: fr_redbilled_security_pcscforjava_PCSC 00134 * Method: SCardGetStatusChange 00135 * Signature: (JJ[I[Ljava/lang/String;)[I 00136 */ 00137 /*JNIEXPORT jintArray JNICALL Java_fr_redbilled_security_pcscforjava_PCSC_SCardLocateCards 00138 (JNIEnv *, jclass, jlong, jlong, jintArray, jobjectArray); 00139 SCardLocateCardsByATR 00140 SCardGetCardTypeProviderName 00141 SCardGetProviderId 00142 SCardGetTransmitCount 00143 SCardListCards 00144 SCardListInterfaces 00145 SCardListReaderGroups 00146 SCardSetCardTypeProviderName 00147 00148 SCardAccessStartedEvent 00149 SCardAddReaderToGroup 00150 SCardForgetCardType 00151 SCardForgetReader 00152 SCardForgetReaderGroup 00153 SCardIntroduceCardType 00154 SCardIntroduceReader 00155 SCardIntroduceReaderGroup 00156 SCardReadCache 00157 SCardReleaseStartedEvent 00158 SCardRemoveReaderFromGroup 00159 SCardWriteCache 00160 SCardUIDlgSelectCard 00161 */ 00162 00163 /* 00164 * Class: fr_redbilled_security_pcscforjava_PCSC 00165 * Method: SCardBeginTransaction 00166 * Signature: (J)V 00167 */ 00168 JNIEXPORT void JNICALL Java_fr_redbilled_security_pcscforjava_PCSC_SCardBeginTransaction 00169 (JNIEnv *, jclass, jlong); 00170 00171 /* 00172 * Class: fr_redbilled_security_pcscforjava_PCSC 00173 * Method: SCardEndTransaction 00174 * Signature: (JI)V 00175 */ 00176 JNIEXPORT void JNICALL Java_fr_redbilled_security_pcscforjava_PCSC_SCardEndTransaction 00177 (JNIEnv *, jclass, jlong, jint); 00178 00179 /* 00180 * Class: fr_redbilled_security_pcscforjava_PCSC 00181 * Method: SCardControl 00182 * Signature: (JI[B)[B 00183 */ 00184 JNIEXPORT jbyteArray JNICALL Java_fr_redbilled_security_pcscforjava_PCSC_SCardControl 00185 (JNIEnv *, jclass, jlong, jint, jbyteArray); 00186 00187 /* 00188 * Class: fr_redbilled_security_pcscforjava_PCSC 00189 * Method: SCardReconnect 00190 * Signature: (JIII)[B 00191 */ 00192 JNIEXPORT jbyteArray JNICALL Java_fr_redbilled_security_pcscforjava_PCSC_SCardReconnect 00193 (JNIEnv *env, jclass object, jlong lCardHandle, jint iShareMode, jint iPreferredProtocols, jint iInitialization); 00194 00195 /* 00196 * Class: fr_redbilled_security_pcscforjava_PCSC 00197 * Method: SCardGetAttrib 00198 * Signature: (JI)[B 00199 */ 00200 JNIEXPORT jbyteArray JNICALL Java_fr_redbilled_security_pcscforjava_PCSC_SCardGetAttrib 00201 (JNIEnv *env, jclass object, jlong lCardHandle, jint iAttribute); 00202 00203 /* 00204 * Class: fr_redbilled_security_pcscforjava_PCSC 00205 * Method: SCardSetAttrib 00206 * Signature: (JI[B)V 00207 */ 00208 JNIEXPORT void JNICALL Java_fr_redbilled_security_pcscforjava_PCSC_SCardSetAttrib 00209 (JNIEnv *env, jclass object, jlong lCardHandle, jint iAttribute, jbyteArray pBAttributeCommand); 00210 00211 #ifdef __cplusplus 00212 } 00213 #endif 00214 #endif