/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.35
 * 
 * This file is not intended to be easily readable and contains a number of 
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG 
 * interface file instead. 
 * ----------------------------------------------------------------------------- */


#ifdef __cplusplus
template<typename T> class SwigValueWrapper {
    T *tt;
public:
    SwigValueWrapper() : tt(0) { }
    SwigValueWrapper(const SwigValueWrapper<T>& rhs) : tt(new T(*rhs.tt)) { }
    SwigValueWrapper(const T& t) : tt(new T(t)) { }
    ~SwigValueWrapper() { delete tt; } 
    SwigValueWrapper& operator=(const T& t) { delete tt; tt = new T(t); return *this; }
    operator T&() const { return *tt; }
    T *operator&() { return tt; }
private:
    SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
};

template <typename T> T SwigValueInit() {
  return T();
}
#endif

/* -----------------------------------------------------------------------------
 *  This section contains generic SWIG labels for method/variable
 *  declarations/attributes, and other compiler dependent labels.
 * ----------------------------------------------------------------------------- */

/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
#  define SWIGTEMPLATEDISAMBIGUATOR template
# elif defined(__HP_aCC)
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
#  define SWIGTEMPLATEDISAMBIGUATOR template
# else
#  define SWIGTEMPLATEDISAMBIGUATOR
# endif
#endif

/* inline attribute */
#ifndef SWIGINLINE
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
#   define SWIGINLINE inline
# else
#   define SWIGINLINE
# endif
#endif

/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define SWIGUNUSED __attribute__ ((__unused__)) 
#   else
#     define SWIGUNUSED
#   endif
# elif defined(__ICC)
#   define SWIGUNUSED __attribute__ ((__unused__)) 
# else
#   define SWIGUNUSED 
# endif
#endif

#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
#   define SWIGUNUSEDPARM(p)
# else
#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
# endif
#endif

/* internal SWIG method */
#ifndef SWIGINTERN
# define SWIGINTERN static SWIGUNUSED
#endif

/* internal inline SWIG method */
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif

/* exporting methods */
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#  ifndef GCC_HASCLASSVISIBILITY
#    define GCC_HASCLASSVISIBILITY
#  endif
#endif

#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#     define SWIGEXPORT __attribute__ ((visibility("default")))
#   else
#     define SWIGEXPORT
#   endif
# endif
#endif

/* calling conventions for Windows */
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   define SWIGSTDCALL __stdcall
# else
#   define SWIGSTDCALL
# endif 
#endif

/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
#endif

/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
# define _SCL_SECURE_NO_DEPRECATE
#endif



/* Fix for jlong on some versions of gcc on Windows */
#if defined(__GNUC__) && !defined(__INTELC__)
  typedef long long __int64;
#endif

/* Fix for jlong on 64-bit x86 Solaris */
#if defined(__x86_64)
# ifdef _LP64
#   undef _LP64
# endif
#endif

#include <jni.h>
#include <stdlib.h>
#include <string.h>


/* Support for throwing Java exceptions */
typedef enum {
  SWIG_JavaOutOfMemoryError = 1, 
  SWIG_JavaIOException, 
  SWIG_JavaRuntimeException, 
  SWIG_JavaIndexOutOfBoundsException,
  SWIG_JavaArithmeticException,
  SWIG_JavaIllegalArgumentException,
  SWIG_JavaNullPointerException,
  SWIG_JavaDirectorPureVirtual,
  SWIG_JavaUnknownError
} SWIG_JavaExceptionCodes;

typedef struct {
  SWIG_JavaExceptionCodes code;
  const char *java_exception;
} SWIG_JavaExceptions_t;


static void SWIGUNUSED SWIG_JavaThrowException(JNIEnv *jenv, SWIG_JavaExceptionCodes code, const char *msg) {
  jclass excep;
  static const SWIG_JavaExceptions_t java_exceptions[] = {
    { SWIG_JavaOutOfMemoryError, "java/lang/OutOfMemoryError" },
    { SWIG_JavaIOException, "java/io/IOException" },
    { SWIG_JavaRuntimeException, "java/lang/RuntimeException" },
    { SWIG_JavaIndexOutOfBoundsException, "java/lang/IndexOutOfBoundsException" },
    { SWIG_JavaArithmeticException, "java/lang/ArithmeticException" },
    { SWIG_JavaIllegalArgumentException, "java/lang/IllegalArgumentException" },
    { SWIG_JavaNullPointerException, "java/lang/NullPointerException" },
    { SWIG_JavaDirectorPureVirtual, "java/lang/RuntimeException" },
    { SWIG_JavaUnknownError,  "java/lang/UnknownError" },
    { (SWIG_JavaExceptionCodes)0,  "java/lang/UnknownError" } };
  const SWIG_JavaExceptions_t *except_ptr = java_exceptions;

  while (except_ptr->code != code && except_ptr->code)
    except_ptr++;

  jenv->ExceptionClear();
  excep = jenv->FindClass(except_ptr->java_exception);
  if (excep)
    jenv->ThrowNew(excep, msg);
}


/* Contract support */

#define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_JavaThrowException(jenv, SWIG_JavaIllegalArgumentException, msg); return nullreturn; } else


#include "eidlib.h"
#include "eidlibException.h"


	#include "eidErrors.h"
	class CustomExceptionHelper 
	{
	public:
		static void throwJavaException( unsigned long err, JNIEnv* jenv ) 
		{ 
			jclass		clazz;
			jmethodID	methodID;
			std::string classDescription = "be/portugal/eid";

			switch(err)
			{
			case EIDMW_ERR_RELEASE_NEEDED:
				classDescription += "/PTEID_ExReleaseNeeded";
				break;			
			case EIDMW_ERR_DOCTYPE_UNKNOWN:
				classDescription += "/PTEID_ExDocTypeUnknown";
				break;			
			case EIDMW_ERR_FILETYPE_UNKNOWN:
				classDescription += "/PTEID_ExFileTypeUnknown";
				break;			
			case EIDMW_ERR_PARAM_RANGE:
				classDescription += "/PTEID_ExParamRange";
				break;
			case EIDMW_ERR_CMD_NOT_ALLOWED:
				classDescription += "/PTEID_ExCmdNotAllowed";
				break;
			case EIDMW_ERR_NOT_SUPPORTED:
				classDescription += "/PTEID_ExCmdNotSupported";
				break;
			case EIDMW_ERR_NO_CARD:
				classDescription += "/PTEID_ExNoCardPresent";
				break;
			case EIDMW_ERR_CARDTYPE_BAD:
				classDescription += "/PTEID_ExCardBadType";
				break;
			case EIDMW_ERR_CARDTYPE_UNKNOWN:
				classDescription += "/PTEID_ExCardTypeUnknown";
				break;
			case EIDMW_ERR_CERT_NOISSUER:
				classDescription += "/PTEID_ExCertNoIssuer";
				break;
			case EIDMW_ERR_CERT_NOCRL:
				classDescription += "/PTEID_ExCertNoCrl";
				break;
			case EIDMW_ERR_CERT_NOOCSP:
				classDescription += "/PTEID_ExCertNoOcsp";
				break;
			case EIDMW_ERR_CERT_NOROOT:
				classDescription += "/PTEID_ExCertNoRoot";
				break;
			case EIDMW_ERR_BAD_USAGE:
				classDescription += "/PTEID_ExBadUsage";
				break;
			case EIDMW_ERR_BAD_TRANSACTION:
				classDescription += "/PTEID_ExBadTransaction";
				break;
			case EIDMW_ERR_CARD_CHANGED:
				classDescription += "/PTEID_ExCardChanged";
				break;
			case EIDMW_ERR_READERSET_CHANGED:
				classDescription += "/PTEID_ExReaderSetChanged";
				break;
			case EIDMW_ERR_NO_READER:
				classDescription += "/PTEID_ExNoReader";
				break;
			case EIDMW_ERR_NOT_ALLOW_BY_USER:
				classDescription += "/PTEID_ExNotAllowByUser";
				break;
			case EIDMW_ERR_UNKNOWN:
				classDescription += "/PTEID_ExUnknown";
				break;
			case EIDMW_ERR_CARD:
			default:
				classDescription += "/PTEID_Exception";
				clazz = jenv->FindClass(classDescription.c_str());
				if (clazz)
				{
					methodID   = jenv->GetMethodID(clazz, "<init>", "(I)V"); 
					if(methodID)
					{
						jthrowable  exc   = static_cast<jthrowable>(jenv->NewObject(clazz, methodID, err));
						jint success = jenv->Throw(exc);
					}
				}
				return;
				break;
			}
			clazz = jenv->FindClass(classDescription.c_str());
			if (clazz)
			{
				methodID   = jenv->GetMethodID(clazz, "<init>", "()V"); 
				if(methodID)
				{
					jthrowable  exc   = static_cast<jthrowable>(jenv->NewObject(clazz, methodID));
					jint success = jenv->Throw(exc);
				}
			}
		}
	};


 
//------------------------------------------------------------
// Callback function declaration on the C++ side. This function will be passed
// to the setEventCallBack() of the DLL.
// As a result, this is the function that will be called by the eidlib as callback function
// when something happens with the card in the reader.
// This function will have in the 'pvRef'-parameter the index of the callback
// In Java, this index must be used as key in the map to find the object
// with the function to be executed.
//------------------------------------------------------------
class SetEventCallback_WrapperCppData
{
public:
	SetEventCallback_WrapperCppData()
	: m_jvm(0)
	, m_index(0)
	, m_handle(-1)
	{
	}
	SetEventCallback_WrapperCppData(JavaVM *jvm, int index)
	: m_jvm(jvm)
	, m_index(index)
	, m_handle(-1)
	{
	}
	JavaVM*		  m_jvm;		// JVM pointer storage, to be used at callback time to call the JAVA side
	int			  m_index;		// index of the callback at the JAVA side
	unsigned long m_handle;		// handle the SetEventCallback() will generate
};

#include <vector>
static std::vector<SetEventCallback_WrapperCppData*> WrapperCppDataContainer;

extern "C" SWIGEXPORT
//------------------------------------------------------------------
// C++ internal callback function
// In the C++ wrapper we create a callback function that the eidlib
// as callback.
// As soon as the eidlib dll calls this callback function we must call
// the Java side to 'pass' the callback
// - get the JVM pointer (was stored in the callback data)
// - from the JVM, recover the java environment
// - attach the environment to the current thread if necessary
// - get the callback function ID on the Java side
// - call the static function on the java side with the necessary data
//
//------------------------------------------------------------------
void SetEventCallback_WrapperCpp(long lRet, unsigned long ulState, void *pvRef)
{
	//------------------------------------------------------------------
	// The goal is now to call Java. In this way we patch the callback function
	// from C++ to Java
	//------------------------------------------------------------------
	SetEventCallback_WrapperCppData* callbackData = (SetEventCallback_WrapperCppData*)pvRef;	

	JNIEnv* env;
    JavaVM* jvm = callbackData->m_jvm;

	jint	res = jvm->GetEnv((void**)&env, JNI_VERSION_1_2);

	if ( res == JNI_EDETACHED )
	{
		JavaVMAttachArgs vm_att_args;
		
		vm_att_args.version = JNI_VERSION_1_2;
		vm_att_args.name	= NULL;
		vm_att_args.group	= NULL;
		
		res = jvm->AttachCurrentThread((void**)&env, &vm_att_args);
	}
	
	jclass		cls = env->FindClass("be/portugal/eid/PTEID_ReaderContext"); 
	jmethodID	mid = env->GetStaticMethodID(cls, "doJavaCallBack", "(IJJ)V"); 

	jvalue args[3];
	args[0].i = callbackData->m_index;
	args[1].j = lRet;
	args[2].j = ulState;

	env->CallStaticVoidMethodA(cls, mid, args);
	jvm->DetachCurrentThread();
}



static unsigned long *new_ulongp() { 
  return new unsigned long(); 
}

static unsigned long *copy_ulongp(unsigned long value) { 
  return new unsigned long(value); 
}

static void delete_ulongp(unsigned long *self) { 
  if (self) delete self; 
}

static void ulongp_assign(unsigned long *self, unsigned long value) {
  *self = value;
}

static unsigned long ulongp_value(unsigned long *self) {
  return *self;
}


#ifdef __cplusplus
extern "C" {
#endif

SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1OK_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1PARAM_1BAD_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00100;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1PARAM_1RANGE_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00101;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1BAD_1PATH_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00102;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1ALGO_1BAD_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00103;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1PIN_1OPERATION_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00104;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1PIN_1FORMAT_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00105;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1BAD_1USAGE_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00106;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1CARD_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00200;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1NOT_1AUTHENTICATED_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00201;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1NOT_1SUPPORTED_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00202;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1PIN_1BAD_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00203;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1PIN_1BLOCKED_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00204;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1NO_1CARD_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00205;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1BAD_1P1P2_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00206;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1CMD_1NOT_1ALLOWED_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00207;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1FILE_1NOT_1FOUND_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00208;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1APPLET_1VERSION_1NOT_1FOUND_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00209;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1NOT_1ACTIVATED_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d0020A;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1CARD_1COMM_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00300;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1NO_1READER_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00301;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1PINPAD_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00302;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1CANT_1CONNECT_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00303;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1CARD_1RESET_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00304;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1CARD_1SHARING_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00305;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1NOT_1TRANSACTED_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00306;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1LIMIT_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00400;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1CHECK_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00401;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1PCSC_1LIB_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00402;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1ZLIB_1RESOLVE_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00403;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1UNKNOWN_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00404;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1PINPAD_1ERR_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00405;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1CANT_1LOAD_1LIB_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00406;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1MEMORY_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00407;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1DELETE_1CACHE_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00408;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1CONF_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00409;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1CACHE_1TAMPERED_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d0040A;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1SOCKET_1CREATE_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00500;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1SOCKET_1SEND_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00501;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1SOCKET_1RECV_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00502;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1SOCKET_1GETHOST_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00503;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1SOCKET_1CONNECT_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00504;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1SOCKET_1SOCKET_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00510;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1SOCKET_1BIND_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00511;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1SOCKET_1ACCEPT_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00512;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1PIN_1CANCEL_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00600;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1TIMEOUT_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00601;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1NEW_1PINS_1DIFFER_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00602;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1WRONG_1PIN_1FORMAT_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00603;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1WRONG_1ASN1_1FORMAT_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00700;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1FILE_1NOT_1OPENED_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00800;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1PERMISSION_1DENIED_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00801;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1INVALID_1PATH_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00802;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1TOO_1MANY_1OPENED_1FILES_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00803;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1DIR_1NOT_1OPENED_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00804;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1INTERRUPTION_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00805;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1OVERFLOW_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00806;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERROR_1IO_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00807;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1LOGGER_1APPLEAVING_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00900;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1DOCTYPE_1UNKNOWN_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00b00;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1CARDTYPE_1BAD_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00b01;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1CARDTYPE_1UNKNOWN_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00b02;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1CERT_1NOISSUER_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00b03;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1RELEASE_1NEEDED_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00b04;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1BAD_1TRANSACTION_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00b05;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1FILETYPE_1UNKNOWN_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00b06;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1CARD_1CHANGED_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00b07;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1READERSET_1CHANGED_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00b08;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1NOT_1ALLOW_1BY_1USER_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00b09;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1CERT_1NOCRL_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00b0A;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1CERT_1NOOCSP_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00b0B;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1CERT_1NOROOT_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00b0C;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1USER_1MUST_1ANSWER_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00b0D;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1SYSTEM_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00c01;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1SIGNAL_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int) 0xe1d00c02;
  
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1CARDTYPE_1UNKNOWN_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  eIDMW::PTEID_CardType result;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_CardType)eIDMW::PTEID_CARDTYPE_UNKNOWN;
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1DOCTYPE_1FULL_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  eIDMW::PTEID_DocumentType result;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_DocumentType)eIDMW::PTEID_DOCTYPE_FULL;
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RAWDATA_1ID_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  eIDMW::PTEID_RawDataType result;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_RawDataType)eIDMW::PTEID_RAWDATA_ID;
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1VALIDATION_1PROCESS_1NONE_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  eIDMW::PTEID_ValidationProcess result;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ValidationProcess)eIDMW::PTEID_VALIDATION_PROCESS_NONE;
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1VALIDATION_1LEVEL_1NONE_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  eIDMW::PTEID_ValidationLevel result;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ValidationLevel)eIDMW::PTEID_VALIDATION_LEVEL_NONE;
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1CERTIF_1STATUS_1UNKNOWN_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  eIDMW::PTEID_CertifStatus result;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_CertifStatus)eIDMW::PTEID_CERTIF_STATUS_UNKNOWN;
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1FILETYPE_1UNKNOWN_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  eIDMW::PTEID_FileType result;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_FileType)eIDMW::PTEID_FILETYPE_UNKNOWN;
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1Exception(JNIEnv *jenv, jclass jcls, jint jarg1) {
  jlong jresult = 0 ;
  long arg1 ;
  eIDMW::PTEID_Exception *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = (long)jarg1; 
  result = (eIDMW::PTEID_Exception *)new eIDMW::PTEID_Exception(arg1);
  *(eIDMW::PTEID_Exception **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1Exception(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_Exception *arg1 = (eIDMW::PTEID_Exception *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_Exception **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Exception_1GetError(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jint jresult = 0 ;
  eIDMW::PTEID_Exception *arg1 = (eIDMW::PTEID_Exception *) 0 ;
  long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Exception **)&jarg1; 
  result = (long)((eIDMW::PTEID_Exception const *)arg1)->GetError();
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ExReleaseNeeded(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ExReleaseNeeded *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ExReleaseNeeded *)new eIDMW::PTEID_ExReleaseNeeded();
  *(eIDMW::PTEID_ExReleaseNeeded **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ExReleaseNeeded(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ExReleaseNeeded *arg1 = (eIDMW::PTEID_ExReleaseNeeded *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ExReleaseNeeded **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ExUnknown(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ExUnknown *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ExUnknown *)new eIDMW::PTEID_ExUnknown();
  *(eIDMW::PTEID_ExUnknown **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ExUnknown(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ExUnknown *arg1 = (eIDMW::PTEID_ExUnknown *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ExUnknown **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ExDocTypeUnknown(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ExDocTypeUnknown *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ExDocTypeUnknown *)new eIDMW::PTEID_ExDocTypeUnknown();
  *(eIDMW::PTEID_ExDocTypeUnknown **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ExDocTypeUnknown(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ExDocTypeUnknown *arg1 = (eIDMW::PTEID_ExDocTypeUnknown *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ExDocTypeUnknown **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ExFileTypeUnknown(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ExFileTypeUnknown *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ExFileTypeUnknown *)new eIDMW::PTEID_ExFileTypeUnknown();
  *(eIDMW::PTEID_ExFileTypeUnknown **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ExFileTypeUnknown(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ExFileTypeUnknown *arg1 = (eIDMW::PTEID_ExFileTypeUnknown *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ExFileTypeUnknown **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ExParamRange(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ExParamRange *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ExParamRange *)new eIDMW::PTEID_ExParamRange();
  *(eIDMW::PTEID_ExParamRange **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ExParamRange(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ExParamRange *arg1 = (eIDMW::PTEID_ExParamRange *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ExParamRange **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ExCmdNotAllowed(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ExCmdNotAllowed *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ExCmdNotAllowed *)new eIDMW::PTEID_ExCmdNotAllowed();
  *(eIDMW::PTEID_ExCmdNotAllowed **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ExCmdNotAllowed(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ExCmdNotAllowed *arg1 = (eIDMW::PTEID_ExCmdNotAllowed *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ExCmdNotAllowed **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ExCmdNotSupported(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ExCmdNotSupported *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ExCmdNotSupported *)new eIDMW::PTEID_ExCmdNotSupported();
  *(eIDMW::PTEID_ExCmdNotSupported **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ExCmdNotSupported(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ExCmdNotSupported *arg1 = (eIDMW::PTEID_ExCmdNotSupported *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ExCmdNotSupported **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ExNoCardPresent(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ExNoCardPresent *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ExNoCardPresent *)new eIDMW::PTEID_ExNoCardPresent();
  *(eIDMW::PTEID_ExNoCardPresent **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ExNoCardPresent(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ExNoCardPresent *arg1 = (eIDMW::PTEID_ExNoCardPresent *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ExNoCardPresent **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ExCardBadType(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ExCardBadType *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ExCardBadType *)new eIDMW::PTEID_ExCardBadType();
  *(eIDMW::PTEID_ExCardBadType **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ExCardBadType(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ExCardBadType *arg1 = (eIDMW::PTEID_ExCardBadType *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ExCardBadType **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ExCardTypeUnknown(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ExCardTypeUnknown *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ExCardTypeUnknown *)new eIDMW::PTEID_ExCardTypeUnknown();
  *(eIDMW::PTEID_ExCardTypeUnknown **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ExCardTypeUnknown(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ExCardTypeUnknown *arg1 = (eIDMW::PTEID_ExCardTypeUnknown *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ExCardTypeUnknown **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ExCertNoIssuer(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ExCertNoIssuer *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ExCertNoIssuer *)new eIDMW::PTEID_ExCertNoIssuer();
  *(eIDMW::PTEID_ExCertNoIssuer **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ExCertNoIssuer(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ExCertNoIssuer *arg1 = (eIDMW::PTEID_ExCertNoIssuer *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ExCertNoIssuer **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ExCertNoCrl(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ExCertNoCrl *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ExCertNoCrl *)new eIDMW::PTEID_ExCertNoCrl();
  *(eIDMW::PTEID_ExCertNoCrl **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ExCertNoCrl(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ExCertNoCrl *arg1 = (eIDMW::PTEID_ExCertNoCrl *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ExCertNoCrl **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ExCertNoOcsp(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ExCertNoOcsp *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ExCertNoOcsp *)new eIDMW::PTEID_ExCertNoOcsp();
  *(eIDMW::PTEID_ExCertNoOcsp **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ExCertNoOcsp(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ExCertNoOcsp *arg1 = (eIDMW::PTEID_ExCertNoOcsp *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ExCertNoOcsp **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ExCertNoRoot(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ExCertNoRoot *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ExCertNoRoot *)new eIDMW::PTEID_ExCertNoRoot();
  *(eIDMW::PTEID_ExCertNoRoot **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ExCertNoRoot(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ExCertNoRoot *arg1 = (eIDMW::PTEID_ExCertNoRoot *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ExCertNoRoot **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ExBadUsage(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ExBadUsage *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ExBadUsage *)new eIDMW::PTEID_ExBadUsage();
  *(eIDMW::PTEID_ExBadUsage **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ExBadUsage(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ExBadUsage *arg1 = (eIDMW::PTEID_ExBadUsage *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ExBadUsage **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ExBadTransaction(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ExBadTransaction *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ExBadTransaction *)new eIDMW::PTEID_ExBadTransaction();
  *(eIDMW::PTEID_ExBadTransaction **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ExBadTransaction(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ExBadTransaction *arg1 = (eIDMW::PTEID_ExBadTransaction *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ExBadTransaction **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ExCardChanged(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ExCardChanged *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ExCardChanged *)new eIDMW::PTEID_ExCardChanged();
  *(eIDMW::PTEID_ExCardChanged **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ExCardChanged(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ExCardChanged *arg1 = (eIDMW::PTEID_ExCardChanged *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ExCardChanged **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ExReaderSetChanged(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ExReaderSetChanged *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ExReaderSetChanged *)new eIDMW::PTEID_ExReaderSetChanged();
  *(eIDMW::PTEID_ExReaderSetChanged **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ExReaderSetChanged(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ExReaderSetChanged *arg1 = (eIDMW::PTEID_ExReaderSetChanged *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ExReaderSetChanged **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ExNoReader(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ExNoReader *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ExNoReader *)new eIDMW::PTEID_ExNoReader();
  *(eIDMW::PTEID_ExNoReader **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ExNoReader(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ExNoReader *arg1 = (eIDMW::PTEID_ExNoReader *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ExNoReader **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ExNotAllowByUser(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ExNotAllowByUser *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ExNotAllowByUser *)new eIDMW::PTEID_ExNotAllowByUser();
  *(eIDMW::PTEID_ExNotAllowByUser **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ExNotAllowByUser(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ExNotAllowByUser *arg1 = (eIDMW::PTEID_ExNotAllowByUser *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ExNotAllowByUser **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ExUserMustAnswer(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ExUserMustAnswer *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ExUserMustAnswer *)new eIDMW::PTEID_ExUserMustAnswer();
  *(eIDMW::PTEID_ExUserMustAnswer **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ExUserMustAnswer(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ExUserMustAnswer *arg1 = (eIDMW::PTEID_ExUserMustAnswer *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ExUserMustAnswer **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1ulongp(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  unsigned long *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (unsigned long *)new_ulongp();
  *(unsigned long **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_copy_1ulongp(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jlong jresult = 0 ;
  unsigned long arg1 ;
  unsigned long *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = (unsigned long)jarg1; 
  result = (unsigned long *)copy_ulongp(arg1);
  *(unsigned long **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1ulongp(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  unsigned long *arg1 = (unsigned long *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(unsigned long **)&jarg1; 
  delete_ulongp(arg1);
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_ulongp_1assign(JNIEnv *jenv, jclass jcls, jlong jarg1, jlong jarg2) {
  unsigned long *arg1 = (unsigned long *) 0 ;
  unsigned long arg2 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(unsigned long **)&jarg1; 
  arg2 = (unsigned long)jarg2; 
  ulongp_assign(arg1,arg2);
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_ulongp_1value(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  jlong jresult = 0 ;
  unsigned long *arg1 = (unsigned long *) 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(unsigned long **)&jarg1; 
  result = (unsigned long)ulongp_value(arg1);
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1Object(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_Object *arg1 = (eIDMW::PTEID_Object *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_Object **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ByteArray_1_1SWIG_10(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_ByteArray *)new eIDMW::PTEID_ByteArray();
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ByteArray_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ByteArray *arg1 = 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ByteArray **)&jarg1;
  if(!arg1) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray const & reference is null");
    return 0;
  } 
  result = (eIDMW::PTEID_ByteArray *)new eIDMW::PTEID_ByteArray((eIDMW::PTEID_ByteArray const &)*arg1);
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ByteArray_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jbyteArray jarg1, jlong jarg2) {
  jlong jresult = 0 ;
  unsigned char *arg1 = (unsigned char *) 0 ;
  unsigned long arg2 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  {
    jint size = jenv->GetArrayLength(jarg1);
    arg1 = (unsigned char*) jenv->GetByteArrayElements(jarg1,0);
  }
  arg2 = (unsigned long)jarg2; 
  result = (eIDMW::PTEID_ByteArray *)new eIDMW::PTEID_ByteArray((unsigned char const *)arg1,arg2);
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ByteArray(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ByteArray *arg1 = (eIDMW::PTEID_ByteArray *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ByteArray **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ByteArray_1Append_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jbyteArray jarg2, jlong jarg3) {
  eIDMW::PTEID_ByteArray *arg1 = (eIDMW::PTEID_ByteArray *) 0 ;
  unsigned char *arg2 = (unsigned char *) 0 ;
  unsigned long arg3 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ByteArray **)&jarg1; 
  {
    jint size = jenv->GetArrayLength(jarg2);
    arg2 = (unsigned char*) jenv->GetByteArrayElements(jarg2,0);
  }
  arg3 = (unsigned long)jarg3; 
  (arg1)->Append((unsigned char const *)arg2,arg3);
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ByteArray_1Append_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  eIDMW::PTEID_ByteArray *arg1 = (eIDMW::PTEID_ByteArray *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_ByteArray **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2;
  if(!arg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray const & reference is null");
    return ;
  } 
  (arg1)->Append((eIDMW::PTEID_ByteArray const &)*arg2);
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ByteArray_1Clear(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  eIDMW::PTEID_ByteArray *arg1 = (eIDMW::PTEID_ByteArray *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ByteArray **)&jarg1; 
  (arg1)->Clear();
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ByteArray_1Equals(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_ByteArray *arg1 = (eIDMW::PTEID_ByteArray *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_ByteArray **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2;
  if(!arg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray const & reference is null");
    return 0;
  } 
  result = (bool)((eIDMW::PTEID_ByteArray const *)arg1)->Equals((eIDMW::PTEID_ByteArray const &)*arg2);
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ByteArray_1Size(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ByteArray *arg1 = (eIDMW::PTEID_ByteArray *) 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ByteArray **)&jarg1; 
  result = (unsigned long)((eIDMW::PTEID_ByteArray const *)arg1)->Size();
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jbyteArray JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ByteArray_1GetBytes(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jbyteArray jresult = 0 ;
  eIDMW::PTEID_ByteArray *arg1 = (eIDMW::PTEID_ByteArray *) 0 ;
  unsigned char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ByteArray **)&jarg1; 
  result = (unsigned char *)((eIDMW::PTEID_ByteArray const *)arg1)->GetBytes();
  {
    jresult = jenv->NewByteArray(arg1->Size());
    jenv->SetByteArrayRegion(jresult,0,arg1->Size(),(const jbyte*) result);
  }
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ByteArray_1writeToFile(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_ByteArray *arg1 = (eIDMW::PTEID_ByteArray *) 0 ;
  char *arg2 = (char *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ByteArray **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  result = (bool)(arg1)->writeToFile((char const *)arg2);
  jresult = (jboolean)result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ByteArray_1assign(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ByteArray *arg1 = (eIDMW::PTEID_ByteArray *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_ByteArray **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2;
  if(!arg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray const & reference is null");
    return 0;
  } 
  {
    eIDMW::PTEID_ByteArray &_result_ref = (arg1)->operator =((eIDMW::PTEID_ByteArray const &)*arg2);
    result = (eIDMW::PTEID_ByteArray *) &_result_ref;
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1idData_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  eIDMW::PTEID_RawData_Eid *arg1 = (eIDMW::PTEID_RawData_Eid *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = (eIDMW::PTEID_ByteArray *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_RawData_Eid **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2; 
  if (arg1) (arg1)->idData = *arg2;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1idData_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_RawData_Eid *arg1 = (eIDMW::PTEID_RawData_Eid *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_RawData_Eid **)&jarg1; 
  result = (eIDMW::PTEID_ByteArray *)& ((arg1)->idData);
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1idSigData_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  eIDMW::PTEID_RawData_Eid *arg1 = (eIDMW::PTEID_RawData_Eid *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = (eIDMW::PTEID_ByteArray *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_RawData_Eid **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2; 
  if (arg1) (arg1)->idSigData = *arg2;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1idSigData_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_RawData_Eid *arg1 = (eIDMW::PTEID_RawData_Eid *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_RawData_Eid **)&jarg1; 
  result = (eIDMW::PTEID_ByteArray *)& ((arg1)->idSigData);
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1addrData_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  eIDMW::PTEID_RawData_Eid *arg1 = (eIDMW::PTEID_RawData_Eid *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = (eIDMW::PTEID_ByteArray *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_RawData_Eid **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2; 
  if (arg1) (arg1)->addrData = *arg2;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1addrData_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_RawData_Eid *arg1 = (eIDMW::PTEID_RawData_Eid *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_RawData_Eid **)&jarg1; 
  result = (eIDMW::PTEID_ByteArray *)& ((arg1)->addrData);
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1addrSigData_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  eIDMW::PTEID_RawData_Eid *arg1 = (eIDMW::PTEID_RawData_Eid *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = (eIDMW::PTEID_ByteArray *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_RawData_Eid **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2; 
  if (arg1) (arg1)->addrSigData = *arg2;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1addrSigData_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_RawData_Eid *arg1 = (eIDMW::PTEID_RawData_Eid *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_RawData_Eid **)&jarg1; 
  result = (eIDMW::PTEID_ByteArray *)& ((arg1)->addrSigData);
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1pictureData_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  eIDMW::PTEID_RawData_Eid *arg1 = (eIDMW::PTEID_RawData_Eid *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = (eIDMW::PTEID_ByteArray *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_RawData_Eid **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2; 
  if (arg1) (arg1)->pictureData = *arg2;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1pictureData_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_RawData_Eid *arg1 = (eIDMW::PTEID_RawData_Eid *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_RawData_Eid **)&jarg1; 
  result = (eIDMW::PTEID_ByteArray *)& ((arg1)->pictureData);
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1cardData_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  eIDMW::PTEID_RawData_Eid *arg1 = (eIDMW::PTEID_RawData_Eid *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = (eIDMW::PTEID_ByteArray *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_RawData_Eid **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2; 
  if (arg1) (arg1)->cardData = *arg2;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1cardData_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_RawData_Eid *arg1 = (eIDMW::PTEID_RawData_Eid *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_RawData_Eid **)&jarg1; 
  result = (eIDMW::PTEID_ByteArray *)& ((arg1)->cardData);
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1tokenInfo_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  eIDMW::PTEID_RawData_Eid *arg1 = (eIDMW::PTEID_RawData_Eid *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = (eIDMW::PTEID_ByteArray *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_RawData_Eid **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2; 
  if (arg1) (arg1)->tokenInfo = *arg2;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1tokenInfo_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_RawData_Eid *arg1 = (eIDMW::PTEID_RawData_Eid *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_RawData_Eid **)&jarg1; 
  result = (eIDMW::PTEID_ByteArray *)& ((arg1)->tokenInfo);
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1certRN_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  eIDMW::PTEID_RawData_Eid *arg1 = (eIDMW::PTEID_RawData_Eid *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = (eIDMW::PTEID_ByteArray *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_RawData_Eid **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2; 
  if (arg1) (arg1)->certRN = *arg2;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1certRN_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_RawData_Eid *arg1 = (eIDMW::PTEID_RawData_Eid *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_RawData_Eid **)&jarg1; 
  result = (eIDMW::PTEID_ByteArray *)& ((arg1)->certRN);
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1challenge_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  eIDMW::PTEID_RawData_Eid *arg1 = (eIDMW::PTEID_RawData_Eid *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = (eIDMW::PTEID_ByteArray *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_RawData_Eid **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2; 
  if (arg1) (arg1)->challenge = *arg2;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1challenge_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_RawData_Eid *arg1 = (eIDMW::PTEID_RawData_Eid *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_RawData_Eid **)&jarg1; 
  result = (eIDMW::PTEID_ByteArray *)& ((arg1)->challenge);
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1response_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  eIDMW::PTEID_RawData_Eid *arg1 = (eIDMW::PTEID_RawData_Eid *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = (eIDMW::PTEID_ByteArray *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_RawData_Eid **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2; 
  if (arg1) (arg1)->response = *arg2;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1response_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_RawData_Eid *arg1 = (eIDMW::PTEID_RawData_Eid *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_RawData_Eid **)&jarg1; 
  result = (eIDMW::PTEID_ByteArray *)& ((arg1)->response);
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1RawData_1Eid(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_RawData_Eid *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_RawData_Eid *)new eIDMW::PTEID_RawData_Eid();
  *(eIDMW::PTEID_RawData_Eid **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1RawData_1Eid(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_RawData_Eid *arg1 = (eIDMW::PTEID_RawData_Eid *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_RawData_Eid **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Sis_1idData_1set(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  eIDMW::PTEID_RawData_Sis *arg1 = (eIDMW::PTEID_RawData_Sis *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = (eIDMW::PTEID_ByteArray *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_RawData_Sis **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2; 
  if (arg1) (arg1)->idData = *arg2;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Sis_1idData_1get(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_RawData_Sis *arg1 = (eIDMW::PTEID_RawData_Sis *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_RawData_Sis **)&jarg1; 
  result = (eIDMW::PTEID_ByteArray *)& ((arg1)->idData);
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1RawData_1Sis(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_RawData_Sis *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_RawData_Sis *)new eIDMW::PTEID_RawData_Sis();
  *(eIDMW::PTEID_RawData_Sis **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1RawData_1Sis(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_RawData_Sis *arg1 = (eIDMW::PTEID_RawData_Sis *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_RawData_Sis **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderSet_1instance(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ReaderSet *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  {
    eIDMW::PTEID_ReaderSet &_result_ref = eIDMW::PTEID_ReaderSet::instance();
    result = (eIDMW::PTEID_ReaderSet *) &_result_ref;
  }
  *(eIDMW::PTEID_ReaderSet **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderSet_1initSDK_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jboolean jarg1) {
  bool arg1 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = jarg1 ? true : false; 
  {
    try {
      eIDMW::PTEID_ReaderSet::initSDK(arg1);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return ;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return ;
    }
  }
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderSet_1initSDK_1_1SWIG_11(JNIEnv *jenv, jclass jcls) {
  (void)jenv;
  (void)jcls;
  {
    try {
      eIDMW::PTEID_ReaderSet::initSDK();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return ;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return ;
    }
  }
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderSet_1releaseSDK(JNIEnv *jenv, jclass jcls) {
  (void)jenv;
  (void)jcls;
  {
    try {
      eIDMW::PTEID_ReaderSet::releaseSDK();
      while(WrapperCppDataContainer.size()>0)
      {
        delete WrapperCppDataContainer.back();
        WrapperCppDataContainer.pop_back();
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return ;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return ;
    }
  }
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ReaderSet(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ReaderSet *arg1 = (eIDMW::PTEID_ReaderSet *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ReaderSet **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderSet_1releaseReaders_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
  eIDMW::PTEID_ReaderSet *arg1 = (eIDMW::PTEID_ReaderSet *) 0 ;
  bool arg2 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderSet **)&jarg1; 
  arg2 = jarg2 ? true : false; 
  {
    try {
      (arg1)->releaseReaders(arg2);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return ;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return ;
    }
  }
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderSet_1releaseReaders_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  eIDMW::PTEID_ReaderSet *arg1 = (eIDMW::PTEID_ReaderSet *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderSet **)&jarg1; 
  {
    try {
      (arg1)->releaseReaders();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return ;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return ;
    }
  }
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderSet_1isReadersChanged(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_ReaderSet *arg1 = (eIDMW::PTEID_ReaderSet *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderSet **)&jarg1; 
  {
    try {
      result = (bool)((eIDMW::PTEID_ReaderSet const *)arg1)->isReadersChanged();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT jobjectArray JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderSet_1readerList_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
  jobjectArray jresult = 0 ;
  eIDMW::PTEID_ReaderSet *arg1 = (eIDMW::PTEID_ReaderSet *) 0 ;
  bool arg2 ;
  char **result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderSet **)&jarg1; 
  arg2 = jarg2 ? true : false; 
  {
    try {
      result = (char **)(arg1)->readerList(arg2);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  {
    int i;
    int len=0;
    jstring temp_string;
    const jclass clazz = jenv->FindClass("java/lang/String");
    
    //------------------------------------------
    // Count the nr of elements returned from C++. This is allowed her since
    // the last element is assumed to be NULL.
    //------------------------------------------
    while (result[len]) 
    {
      len++;    
    }
    
    //------------------------------------------
    // create a java array of strings
    //------------------------------------------
    jresult = jenv->NewObjectArray(len, clazz, NULL);
    /* exception checking omitted */
    
    //------------------------------------------
    // for each element returned from C++
    //------------------------------------------
    for (i=0; i<len; i++) 
    {
      temp_string = jenv->NewStringUTF(*result++);
      jenv->SetObjectArrayElement(jresult, i, temp_string);
      jenv->DeleteLocalRef(temp_string);
    }
  }
  return jresult;
}


SWIGEXPORT jobjectArray JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderSet_1readerList_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jobjectArray jresult = 0 ;
  eIDMW::PTEID_ReaderSet *arg1 = (eIDMW::PTEID_ReaderSet *) 0 ;
  char **result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderSet **)&jarg1; 
  {
    try {
      result = (char **)(arg1)->readerList();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  {
    int i;
    int len=0;
    jstring temp_string;
    const jclass clazz = jenv->FindClass("java/lang/String");
    
    //------------------------------------------
    // Count the nr of elements returned from C++. This is allowed her since
    // the last element is assumed to be NULL.
    //------------------------------------------
    while (result[len]) 
    {
      len++;    
    }
    
    //------------------------------------------
    // create a java array of strings
    //------------------------------------------
    jresult = jenv->NewObjectArray(len, clazz, NULL);
    /* exception checking omitted */
    
    //------------------------------------------
    // for each element returned from C++
    //------------------------------------------
    for (i=0; i<len; i++) 
    {
      temp_string = jenv->NewStringUTF(*result++);
      jenv->SetObjectArrayElement(jresult, i, temp_string);
      jenv->DeleteLocalRef(temp_string);
    }
  }
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderSet_1getReader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ReaderSet *arg1 = (eIDMW::PTEID_ReaderSet *) 0 ;
  eIDMW::PTEID_ReaderContext *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderSet **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_ReaderContext &_result_ref = (arg1)->getReader();
        result = (eIDMW::PTEID_ReaderContext *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ReaderContext **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderSet_1getReaderByName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ReaderSet *arg1 = (eIDMW::PTEID_ReaderSet *) 0 ;
  char *arg2 = (char *) 0 ;
  eIDMW::PTEID_ReaderContext *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderSet **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  {
    try {
      {
        eIDMW::PTEID_ReaderContext &_result_ref = (arg1)->getReaderByName((char const *)arg2);
        result = (eIDMW::PTEID_ReaderContext *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ReaderContext **)&jresult = result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderSet_1readerCount_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ReaderSet *arg1 = (eIDMW::PTEID_ReaderSet *) 0 ;
  bool arg2 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderSet **)&jarg1; 
  arg2 = jarg2 ? true : false; 
  {
    try {
      result = (unsigned long)(arg1)->readerCount(arg2);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderSet_1readerCount_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ReaderSet *arg1 = (eIDMW::PTEID_ReaderSet *) 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderSet **)&jarg1; 
  {
    try {
      result = (unsigned long)(arg1)->readerCount();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderSet_1getReaderName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
  jstring jresult = 0 ;
  eIDMW::PTEID_ReaderSet *arg1 = (eIDMW::PTEID_ReaderSet *) 0 ;
  unsigned long arg2 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderSet **)&jarg1; 
  arg2 = (unsigned long)jarg2; 
  {
    try {
      result = (char *)(arg1)->getReaderName(arg2);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderSet_1getReaderByNum(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ReaderSet *arg1 = (eIDMW::PTEID_ReaderSet *) 0 ;
  unsigned long arg2 ;
  eIDMW::PTEID_ReaderContext *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderSet **)&jarg1; 
  arg2 = (unsigned long)jarg2; 
  {
    try {
      {
        eIDMW::PTEID_ReaderContext &_result_ref = (arg1)->getReaderByNum(arg2);
        result = (eIDMW::PTEID_ReaderContext *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ReaderContext **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderSet_1getReaderByCardSerialNumber(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ReaderSet *arg1 = (eIDMW::PTEID_ReaderSet *) 0 ;
  char *arg2 = (char *) 0 ;
  eIDMW::PTEID_ReaderContext *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderSet **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  {
    try {
      {
        eIDMW::PTEID_ReaderContext &_result_ref = (arg1)->getReaderByCardSerialNumber((char const *)arg2);
        result = (eIDMW::PTEID_ReaderContext *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ReaderContext **)&jresult = result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderSet_1flushCache(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_ReaderSet *arg1 = (eIDMW::PTEID_ReaderSet *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderSet **)&jarg1; 
  {
    try {
      result = (bool)(arg1)->flushCache();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ReaderContext_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jint jarg1, jstring jarg2) {
  jlong jresult = 0 ;
  eIDMW::PTEID_FileType arg1 ;
  char *arg2 = (char *) 0 ;
  eIDMW::PTEID_ReaderContext *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = (eIDMW::PTEID_FileType)jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  result = (eIDMW::PTEID_ReaderContext *)new eIDMW::PTEID_ReaderContext(arg1,(char const *)arg2);
  *(eIDMW::PTEID_ReaderContext **)&jresult = result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ReaderContext_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jint jarg1, jlong jarg2, jobject jarg2_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_FileType arg1 ;
  eIDMW::PTEID_ByteArray *arg2 = 0 ;
  eIDMW::PTEID_ReaderContext *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg2_;
  arg1 = (eIDMW::PTEID_FileType)jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2;
  if(!arg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray const & reference is null");
    return 0;
  } 
  result = (eIDMW::PTEID_ReaderContext *)new eIDMW::PTEID_ReaderContext(arg1,(eIDMW::PTEID_ByteArray const &)*arg2);
  *(eIDMW::PTEID_ReaderContext **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ReaderContext_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_RawData_Eid *arg1 = 0 ;
  eIDMW::PTEID_ReaderContext *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_RawData_Eid **)&jarg1;
  if(!arg1) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_RawData_Eid const & reference is null");
    return 0;
  } 
  result = (eIDMW::PTEID_ReaderContext *)new eIDMW::PTEID_ReaderContext((eIDMW::PTEID_RawData_Eid const &)*arg1);
  *(eIDMW::PTEID_ReaderContext **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1ReaderContext_1_1SWIG_13(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_RawData_Sis *arg1 = 0 ;
  eIDMW::PTEID_ReaderContext *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_RawData_Sis **)&jarg1;
  if(!arg1) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_RawData_Sis const & reference is null");
    return 0;
  } 
  result = (eIDMW::PTEID_ReaderContext *)new eIDMW::PTEID_ReaderContext((eIDMW::PTEID_RawData_Sis const &)*arg1);
  *(eIDMW::PTEID_ReaderContext **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ReaderContext(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ReaderContext *arg1 = (eIDMW::PTEID_ReaderContext *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ReaderContext **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderContext_1getName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_ReaderContext *arg1 = (eIDMW::PTEID_ReaderContext *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderContext **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getName();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderContext_1isCardPresent(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_ReaderContext *arg1 = (eIDMW::PTEID_ReaderContext *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderContext **)&jarg1; 
  {
    try {
      result = (bool)(arg1)->isCardPresent();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderContext_1releaseCard_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
  eIDMW::PTEID_ReaderContext *arg1 = (eIDMW::PTEID_ReaderContext *) 0 ;
  bool arg2 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderContext **)&jarg1; 
  arg2 = jarg2 ? true : false; 
  {
    try {
      (arg1)->releaseCard(arg2);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return ;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return ;
    }
  }
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderContext_1releaseCard_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  eIDMW::PTEID_ReaderContext *arg1 = (eIDMW::PTEID_ReaderContext *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderContext **)&jarg1; 
  {
    try {
      (arg1)->releaseCard();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return ;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return ;
    }
  }
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderContext_1isCardChanged(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_ReaderContext *arg1 = (eIDMW::PTEID_ReaderContext *) 0 ;
  unsigned long *arg2 = 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderContext **)&jarg1; 
  arg2 = *(unsigned long **)&jarg2;
  if(!arg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "unsigned long & reference is null");
    return 0;
  } 
  {
    try {
      result = (bool)(arg1)->isCardChanged(*arg2);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderContext_1getCardType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jint jresult = 0 ;
  eIDMW::PTEID_ReaderContext *arg1 = (eIDMW::PTEID_ReaderContext *) 0 ;
  eIDMW::PTEID_CardType result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderContext **)&jarg1; 
  {
    try {
      result = (eIDMW::PTEID_CardType)(arg1)->getCardType();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderContext_1getCard(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ReaderContext *arg1 = (eIDMW::PTEID_ReaderContext *) 0 ;
  eIDMW::PTEID_Card *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderContext **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_Card &_result_ref = (arg1)->getCard();
        result = (eIDMW::PTEID_Card *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_Card **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderContext_1getEIDCard(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ReaderContext *arg1 = (eIDMW::PTEID_ReaderContext *) 0 ;
  eIDMW::PTEID_EIDCard *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderContext **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_EIDCard &_result_ref = (arg1)->getEIDCard();
        result = (eIDMW::PTEID_EIDCard *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_EIDCard **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderContext_1getKidsCard(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ReaderContext *arg1 = (eIDMW::PTEID_ReaderContext *) 0 ;
  eIDMW::PTEID_KidsCard *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderContext **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_KidsCard &_result_ref = (arg1)->getKidsCard();
        result = (eIDMW::PTEID_KidsCard *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_KidsCard **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderContext_1getForeignerCard(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ReaderContext *arg1 = (eIDMW::PTEID_ReaderContext *) 0 ;
  eIDMW::PTEID_ForeignerCard *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderContext **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_ForeignerCard &_result_ref = (arg1)->getForeignerCard();
        result = (eIDMW::PTEID_ForeignerCard *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ForeignerCard **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderContext_1getSISCard(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ReaderContext *arg1 = (eIDMW::PTEID_ReaderContext *) 0 ;
  eIDMW::PTEID_SISCard *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderContext **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_SISCard &_result_ref = (arg1)->getSISCard();
        result = (eIDMW::PTEID_SISCard *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_SISCard **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderContext_1SetEventCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jlong jarg3) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ReaderContext *arg1 = (eIDMW::PTEID_ReaderContext *) 0 ;
  void (*arg2)(long,unsigned long,void *) = (void (*)(long,unsigned long,void *)) 0 ;
  void *arg3 = (void *) 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderContext **)&jarg1; 
  
  arg3 = *(void **)&jarg3; 
  {
    try 
    {
      JavaVM *jvm;
      jenv->GetJavaVM(&jvm);		// recover the JVM pointer
      
      SetEventCallback_WrapperCppData* callbackData = new SetEventCallback_WrapperCppData(jvm,(int)arg3);
      WrapperCppDataContainer.push_back(callbackData);
      
      //------------------------------------------------------		
      // set the C++ callback function with the callbackData.
      //------------------------------------------------------		
      result = (unsigned long)(arg1)->SetEventCallback(&SetEventCallback_WrapperCpp,(void*)callbackData);
      callbackData->m_handle = result;	// keep the handle. it is used to find the correct object for the delete (see: StopEventCallback)
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderContext_1StopEventCallback(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
  eIDMW::PTEID_ReaderContext *arg1 = (eIDMW::PTEID_ReaderContext *) 0 ;
  unsigned long arg2 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderContext **)&jarg1; 
  arg2 = (unsigned long)jarg2; 
  {
    try 
    {
      (arg1)->StopEventCallback(arg2);	// call the eidlib method to stop the event with this handle
      for(size_t idx = 0
        ;idx < WrapperCppDataContainer.size()
        ;idx++
        )
      {
        //----------------------------------------------------------
        // if this is the allocated data for this handle, remove it
        //----------------------------------------------------------
        if( WrapperCppDataContainer[idx]->m_handle == arg2 )
        {
          delete WrapperCppDataContainer[idx];
          WrapperCppDataContainer.erase(WrapperCppDataContainer.begin()+idx);
          break;
        }
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return ;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return ;
    }
  }
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderContext_1BeginTransaction(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  eIDMW::PTEID_ReaderContext *arg1 = (eIDMW::PTEID_ReaderContext *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderContext **)&jarg1; 
  {
    try {
      (arg1)->BeginTransaction();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return ;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return ;
    }
  }
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderContext_1EndTransaction(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  eIDMW::PTEID_ReaderContext *arg1 = (eIDMW::PTEID_ReaderContext *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderContext **)&jarg1; 
  {
    try {
      (arg1)->EndTransaction();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return ;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return ;
    }
  }
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1ReaderContext_1isVirtualReader(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_ReaderContext *arg1 = (eIDMW::PTEID_ReaderContext *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_ReaderContext **)&jarg1; 
  {
    try {
      result = (bool)(arg1)->isVirtualReader();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1Card(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_Card *arg1 = (eIDMW::PTEID_Card *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_Card **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Card_1getType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jint jresult = 0 ;
  eIDMW::PTEID_Card *arg1 = (eIDMW::PTEID_Card *) 0 ;
  eIDMW::PTEID_CardType result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Card **)&jarg1; 
  {
    try {
      result = (eIDMW::PTEID_CardType)(arg1)->getType();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Card_1getDocument(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Card *arg1 = (eIDMW::PTEID_Card *) 0 ;
  eIDMW::PTEID_DocumentType arg2 ;
  eIDMW::PTEID_XMLDoc *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Card **)&jarg1; 
  arg2 = (eIDMW::PTEID_DocumentType)jarg2; 
  {
    try {
      {
        eIDMW::PTEID_XMLDoc &_result_ref = (arg1)->getDocument(arg2);
        result = (eIDMW::PTEID_XMLDoc *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_XMLDoc **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Card_1getRawData(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Card *arg1 = (eIDMW::PTEID_Card *) 0 ;
  eIDMW::PTEID_RawDataType arg2 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Card **)&jarg1; 
  arg2 = (eIDMW::PTEID_RawDataType)jarg2; 
  {
    try {
      {
        eIDMW::PTEID_ByteArray const &_result_ref = (arg1)->getRawData(arg2);
        result = (eIDMW::PTEID_ByteArray *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Card_1sendAPDU(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Card *arg1 = (eIDMW::PTEID_Card *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = 0 ;
  eIDMW::PTEID_ByteArray result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_Card **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2;
  if(!arg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray const & reference is null");
    return 0;
  } 
  {
    try {
      result = (arg1)->sendAPDU((eIDMW::PTEID_ByteArray const &)*arg2);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = new eIDMW::PTEID_ByteArray((eIDMW::PTEID_ByteArray &)result); 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Card_1readFile_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jlong jarg4) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Card *arg1 = (eIDMW::PTEID_Card *) 0 ;
  char *arg2 = (char *) 0 ;
  unsigned long arg3 ;
  unsigned long arg4 ;
  eIDMW::PTEID_ByteArray result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Card **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  arg3 = (unsigned long)jarg3; 
  arg4 = (unsigned long)jarg4; 
  {
    try {
      result = (arg1)->readFile((char const *)arg2,arg3,arg4);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = new eIDMW::PTEID_ByteArray((eIDMW::PTEID_ByteArray &)result); 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Card_1readFile_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Card *arg1 = (eIDMW::PTEID_Card *) 0 ;
  char *arg2 = (char *) 0 ;
  unsigned long arg3 ;
  eIDMW::PTEID_ByteArray result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Card **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  arg3 = (unsigned long)jarg3; 
  {
    try {
      result = (arg1)->readFile((char const *)arg2,arg3);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = new eIDMW::PTEID_ByteArray((eIDMW::PTEID_ByteArray &)result); 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Card_1readFile_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Card *arg1 = (eIDMW::PTEID_Card *) 0 ;
  char *arg2 = (char *) 0 ;
  eIDMW::PTEID_ByteArray result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Card **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  {
    try {
      result = (arg1)->readFile((char const *)arg2);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = new eIDMW::PTEID_ByteArray((eIDMW::PTEID_ByteArray &)result); 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Card_1writeFile_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jobject jarg3_, jlong jarg4) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_Card *arg1 = (eIDMW::PTEID_Card *) 0 ;
  char *arg2 = (char *) 0 ;
  eIDMW::PTEID_ByteArray *arg3 = 0 ;
  unsigned long arg4 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg3_;
  arg1 = *(eIDMW::PTEID_Card **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  arg3 = *(eIDMW::PTEID_ByteArray **)&jarg3;
  if(!arg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray const & reference is null");
    return 0;
  } 
  arg4 = (unsigned long)jarg4; 
  {
    try {
      result = (bool)(arg1)->writeFile((char const *)arg2,(eIDMW::PTEID_ByteArray const &)*arg3,arg4);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jboolean)result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Card_1writeFile_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jobject jarg3_) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_Card *arg1 = (eIDMW::PTEID_Card *) 0 ;
  char *arg2 = (char *) 0 ;
  eIDMW::PTEID_ByteArray *arg3 = 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg3_;
  arg1 = *(eIDMW::PTEID_Card **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  arg3 = *(eIDMW::PTEID_ByteArray **)&jarg3;
  if(!arg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray const & reference is null");
    return 0;
  } 
  {
    try {
      result = (bool)(arg1)->writeFile((char const *)arg2,(eIDMW::PTEID_ByteArray const &)*arg3);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jboolean)result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1MemoryCard(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_MemoryCard *arg1 = (eIDMW::PTEID_MemoryCard *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_MemoryCard **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1SmartCard(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_SmartCard *arg1 = (eIDMW::PTEID_SmartCard *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_SmartCard **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SmartCard_1selectApplication(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  eIDMW::PTEID_SmartCard *arg1 = (eIDMW::PTEID_SmartCard *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_SmartCard **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2;
  if(!arg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray const & reference is null");
    return ;
  } 
  {
    try {
      (arg1)->selectApplication((eIDMW::PTEID_ByteArray const &)*arg2);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return ;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return ;
    }
  }
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SmartCard_1sendAPDU_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_, jstring jarg4) {
  jlong jresult = 0 ;
  eIDMW::PTEID_SmartCard *arg1 = (eIDMW::PTEID_SmartCard *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = 0 ;
  eIDMW::PTEID_Pin *arg3 = (eIDMW::PTEID_Pin *) 0 ;
  char *arg4 = (char *) 0 ;
  eIDMW::PTEID_ByteArray result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  (void)jarg3_;
  arg1 = *(eIDMW::PTEID_SmartCard **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2;
  if(!arg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray const & reference is null");
    return 0;
  } 
  arg3 = *(eIDMW::PTEID_Pin **)&jarg3; 
  arg4 = 0;
  if (jarg4) {
    arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
    if (!arg4) return 0;
  }
  {
    try {
      result = (arg1)->sendAPDU((eIDMW::PTEID_ByteArray const &)*arg2,arg3,(char const *)arg4);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = new eIDMW::PTEID_ByteArray((eIDMW::PTEID_ByteArray &)result); 
  if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SmartCard_1sendAPDU_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_SmartCard *arg1 = (eIDMW::PTEID_SmartCard *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = 0 ;
  eIDMW::PTEID_Pin *arg3 = (eIDMW::PTEID_Pin *) 0 ;
  eIDMW::PTEID_ByteArray result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  (void)jarg3_;
  arg1 = *(eIDMW::PTEID_SmartCard **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2;
  if(!arg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray const & reference is null");
    return 0;
  } 
  arg3 = *(eIDMW::PTEID_Pin **)&jarg3; 
  {
    try {
      result = (arg1)->sendAPDU((eIDMW::PTEID_ByteArray const &)*arg2,arg3);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = new eIDMW::PTEID_ByteArray((eIDMW::PTEID_ByteArray &)result); 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SmartCard_1sendAPDU_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_SmartCard *arg1 = (eIDMW::PTEID_SmartCard *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = 0 ;
  eIDMW::PTEID_ByteArray result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_SmartCard **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2;
  if(!arg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray const & reference is null");
    return 0;
  } 
  {
    try {
      result = (arg1)->sendAPDU((eIDMW::PTEID_ByteArray const &)*arg2);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = new eIDMW::PTEID_ByteArray((eIDMW::PTEID_ByteArray &)result); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SmartCard_1readFile_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jobject jarg3_, jlong jarg4, jobject jarg4_, jstring jarg5) {
  jint jresult = 0 ;
  eIDMW::PTEID_SmartCard *arg1 = (eIDMW::PTEID_SmartCard *) 0 ;
  char *arg2 = (char *) 0 ;
  eIDMW::PTEID_ByteArray *arg3 = 0 ;
  eIDMW::PTEID_Pin *arg4 = (eIDMW::PTEID_Pin *) 0 ;
  char *arg5 = (char *) 0 ;
  long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg3_;
  (void)jarg4_;
  arg1 = *(eIDMW::PTEID_SmartCard **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  arg3 = *(eIDMW::PTEID_ByteArray **)&jarg3;
  if(!arg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray & reference is null");
    return 0;
  } 
  arg4 = *(eIDMW::PTEID_Pin **)&jarg4; 
  arg5 = 0;
  if (jarg5) {
    arg5 = (char *)jenv->GetStringUTFChars(jarg5, 0);
    if (!arg5) return 0;
  }
  {
    try {
      result = (long)(arg1)->readFile((char const *)arg2,*arg3,arg4,(char const *)arg5);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jint)result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  if (arg5) jenv->ReleaseStringUTFChars(jarg5, (const char *)arg5);
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SmartCard_1readFile_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jobject jarg3_, jlong jarg4, jobject jarg4_) {
  jint jresult = 0 ;
  eIDMW::PTEID_SmartCard *arg1 = (eIDMW::PTEID_SmartCard *) 0 ;
  char *arg2 = (char *) 0 ;
  eIDMW::PTEID_ByteArray *arg3 = 0 ;
  eIDMW::PTEID_Pin *arg4 = (eIDMW::PTEID_Pin *) 0 ;
  long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg3_;
  (void)jarg4_;
  arg1 = *(eIDMW::PTEID_SmartCard **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  arg3 = *(eIDMW::PTEID_ByteArray **)&jarg3;
  if(!arg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray & reference is null");
    return 0;
  } 
  arg4 = *(eIDMW::PTEID_Pin **)&jarg4; 
  {
    try {
      result = (long)(arg1)->readFile((char const *)arg2,*arg3,arg4);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jint)result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SmartCard_1readFile_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jobject jarg3_) {
  jint jresult = 0 ;
  eIDMW::PTEID_SmartCard *arg1 = (eIDMW::PTEID_SmartCard *) 0 ;
  char *arg2 = (char *) 0 ;
  eIDMW::PTEID_ByteArray *arg3 = 0 ;
  long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg3_;
  arg1 = *(eIDMW::PTEID_SmartCard **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  arg3 = *(eIDMW::PTEID_ByteArray **)&jarg3;
  if(!arg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray & reference is null");
    return 0;
  } 
  {
    try {
      result = (long)(arg1)->readFile((char const *)arg2,*arg3);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jint)result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SmartCard_1writeFile_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jobject jarg3_, jlong jarg4, jobject jarg4_, jstring jarg5) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_SmartCard *arg1 = (eIDMW::PTEID_SmartCard *) 0 ;
  char *arg2 = (char *) 0 ;
  eIDMW::PTEID_ByteArray *arg3 = 0 ;
  eIDMW::PTEID_Pin *arg4 = (eIDMW::PTEID_Pin *) 0 ;
  char *arg5 = (char *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg3_;
  (void)jarg4_;
  arg1 = *(eIDMW::PTEID_SmartCard **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  arg3 = *(eIDMW::PTEID_ByteArray **)&jarg3;
  if(!arg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray const & reference is null");
    return 0;
  } 
  arg4 = *(eIDMW::PTEID_Pin **)&jarg4; 
  arg5 = 0;
  if (jarg5) {
    arg5 = (char *)jenv->GetStringUTFChars(jarg5, 0);
    if (!arg5) return 0;
  }
  {
    try {
      result = (bool)(arg1)->writeFile((char const *)arg2,(eIDMW::PTEID_ByteArray const &)*arg3,arg4,(char const *)arg5);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jboolean)result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  if (arg5) jenv->ReleaseStringUTFChars(jarg5, (const char *)arg5);
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SmartCard_1writeFile_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jobject jarg3_, jlong jarg4, jobject jarg4_) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_SmartCard *arg1 = (eIDMW::PTEID_SmartCard *) 0 ;
  char *arg2 = (char *) 0 ;
  eIDMW::PTEID_ByteArray *arg3 = 0 ;
  eIDMW::PTEID_Pin *arg4 = (eIDMW::PTEID_Pin *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg3_;
  (void)jarg4_;
  arg1 = *(eIDMW::PTEID_SmartCard **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  arg3 = *(eIDMW::PTEID_ByteArray **)&jarg3;
  if(!arg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray const & reference is null");
    return 0;
  } 
  arg4 = *(eIDMW::PTEID_Pin **)&jarg4; 
  {
    try {
      result = (bool)(arg1)->writeFile((char const *)arg2,(eIDMW::PTEID_ByteArray const &)*arg3,arg4);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jboolean)result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SmartCard_1writeFile_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jobject jarg3_) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_SmartCard *arg1 = (eIDMW::PTEID_SmartCard *) 0 ;
  char *arg2 = (char *) 0 ;
  eIDMW::PTEID_ByteArray *arg3 = 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg3_;
  arg1 = *(eIDMW::PTEID_SmartCard **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  arg3 = *(eIDMW::PTEID_ByteArray **)&jarg3;
  if(!arg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray const & reference is null");
    return 0;
  } 
  {
    try {
      result = (bool)(arg1)->writeFile((char const *)arg2,(eIDMW::PTEID_ByteArray const &)*arg3);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jboolean)result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SmartCard_1pinCount(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_SmartCard *arg1 = (eIDMW::PTEID_SmartCard *) 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SmartCard **)&jarg1; 
  {
    try {
      result = (unsigned long)(arg1)->pinCount();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SmartCard_1getPins(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_SmartCard *arg1 = (eIDMW::PTEID_SmartCard *) 0 ;
  eIDMW::PTEID_Pins *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SmartCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_Pins &_result_ref = (arg1)->getPins();
        result = (eIDMW::PTEID_Pins *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_Pins **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SmartCard_1certificateCount(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_SmartCard *arg1 = (eIDMW::PTEID_SmartCard *) 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SmartCard **)&jarg1; 
  {
    try {
      result = (unsigned long)(arg1)->certificateCount();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SmartCard_1getCertificates(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_SmartCard *arg1 = (eIDMW::PTEID_SmartCard *) 0 ;
  eIDMW::PTEID_Certificates *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SmartCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_Certificates &_result_ref = (arg1)->getCertificates();
        result = (eIDMW::PTEID_Certificates *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_Certificates **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SmartCard_1getChallenge_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
  jlong jresult = 0 ;
  eIDMW::PTEID_SmartCard *arg1 = (eIDMW::PTEID_SmartCard *) 0 ;
  bool arg2 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SmartCard **)&jarg1; 
  arg2 = jarg2 ? true : false; 
  {
    try {
      {
        eIDMW::PTEID_ByteArray const &_result_ref = (arg1)->getChallenge(arg2);
        result = (eIDMW::PTEID_ByteArray *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SmartCard_1getChallenge_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_SmartCard *arg1 = (eIDMW::PTEID_SmartCard *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SmartCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_ByteArray const &_result_ref = (arg1)->getChallenge();
        result = (eIDMW::PTEID_ByteArray *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SmartCard_1getChallengeResponse(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_SmartCard *arg1 = (eIDMW::PTEID_SmartCard *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SmartCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_ByteArray const &_result_ref = (arg1)->getChallengeResponse();
        result = (eIDMW::PTEID_ByteArray *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SmartCard_1verifyChallengeResponse(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_SmartCard *arg1 = (eIDMW::PTEID_SmartCard *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = 0 ;
  eIDMW::PTEID_ByteArray *arg3 = 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  (void)jarg3_;
  arg1 = *(eIDMW::PTEID_SmartCard **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2;
  if(!arg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray const & reference is null");
    return 0;
  } 
  arg3 = *(eIDMW::PTEID_ByteArray **)&jarg3;
  if(!arg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray const & reference is null");
    return 0;
  } 
  {
    try {
      result = (bool)((eIDMW::PTEID_SmartCard const *)arg1)->verifyChallengeResponse((eIDMW::PTEID_ByteArray const &)*arg2,(eIDMW::PTEID_ByteArray const &)*arg3);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1SISCard(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_SISCard *arg1 = (eIDMW::PTEID_SISCard *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_SISCard **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SISCard_1getDocument(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  jlong jresult = 0 ;
  eIDMW::PTEID_SISCard *arg1 = (eIDMW::PTEID_SISCard *) 0 ;
  eIDMW::PTEID_DocumentType arg2 ;
  eIDMW::PTEID_XMLDoc *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SISCard **)&jarg1; 
  arg2 = (eIDMW::PTEID_DocumentType)jarg2; 
  {
    try {
      {
        eIDMW::PTEID_XMLDoc &_result_ref = (arg1)->getDocument(arg2);
        result = (eIDMW::PTEID_XMLDoc *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_XMLDoc **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SISCard_1getFullDoc(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_SISCard *arg1 = (eIDMW::PTEID_SISCard *) 0 ;
  eIDMW::PTEID_SisFullDoc *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SISCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_SisFullDoc &_result_ref = (arg1)->getFullDoc();
        result = (eIDMW::PTEID_SisFullDoc *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_SisFullDoc **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SISCard_1getID(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_SISCard *arg1 = (eIDMW::PTEID_SISCard *) 0 ;
  eIDMW::PTEID_SisId *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SISCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_SisId &_result_ref = (arg1)->getID();
        result = (eIDMW::PTEID_SisId *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_SisId **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SISCard_1getRawData(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  jlong jresult = 0 ;
  eIDMW::PTEID_SISCard *arg1 = (eIDMW::PTEID_SISCard *) 0 ;
  eIDMW::PTEID_RawDataType arg2 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SISCard **)&jarg1; 
  arg2 = (eIDMW::PTEID_RawDataType)jarg2; 
  {
    try {
      {
        eIDMW::PTEID_ByteArray const &_result_ref = (arg1)->getRawData(arg2);
        result = (eIDMW::PTEID_ByteArray *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SISCard_1getRawData_1Id(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_SISCard *arg1 = (eIDMW::PTEID_SISCard *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SISCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_ByteArray const &_result_ref = (arg1)->getRawData_Id();
        result = (eIDMW::PTEID_ByteArray *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1EIDCard(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1isApplicationAllowed(JNIEnv *jenv, jclass jcls) {
  jboolean jresult = 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  {
    try {
      result = (bool)eIDMW::PTEID_EIDCard::isApplicationAllowed();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1isTestCard(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      result = (bool)(arg1)->isTestCard();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getAllowTestCard(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      result = (bool)(arg1)->getAllowTestCard();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1setAllowTestCard(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  bool arg2 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  arg2 = jarg2 ? true : false; 
  {
    try {
      (arg1)->setAllowTestCard(arg2);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return ;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return ;
    }
  }
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getDataStatus(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jint jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_CertifStatus result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      result = (eIDMW::PTEID_CertifStatus)(arg1)->getDataStatus();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getDocument(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_DocumentType arg2 ;
  eIDMW::PTEID_XMLDoc *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  arg2 = (eIDMW::PTEID_DocumentType)jarg2; 
  {
    try {
      {
        eIDMW::PTEID_XMLDoc &_result_ref = (arg1)->getDocument(arg2);
        result = (eIDMW::PTEID_XMLDoc *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_XMLDoc **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getFullDoc(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_EIdFullDoc *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_EIdFullDoc &_result_ref = (arg1)->getFullDoc();
        result = (eIDMW::PTEID_EIdFullDoc *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_EIdFullDoc **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getID(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_EId *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_EId &_result_ref = (arg1)->getID();
        result = (eIDMW::PTEID_EId *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_EId **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getPicture(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_Picture *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_Picture &_result_ref = (arg1)->getPicture();
        result = (eIDMW::PTEID_Picture *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_Picture **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getVersionInfo(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_CardVersionInfo *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_CardVersionInfo &_result_ref = (arg1)->getVersionInfo();
        result = (eIDMW::PTEID_CardVersionInfo *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_CardVersionInfo **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getCert(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_CertifType arg2 ;
  eIDMW::PTEID_Certificate *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  arg2 = (eIDMW::PTEID_CertifType)jarg2; 
  {
    try {
      {
        eIDMW::PTEID_Certificate &_result_ref = (arg1)->getCert(arg2);
        result = (eIDMW::PTEID_Certificate *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getRrn(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_Certificate *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    eIDMW::PTEID_Certificate &_result_ref = (arg1)->getRrn();
    result = (eIDMW::PTEID_Certificate *) &_result_ref;
  }
  *(eIDMW::PTEID_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getRoot(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_Certificate *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_Certificate &_result_ref = (arg1)->getRoot();
        result = (eIDMW::PTEID_Certificate *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getCA(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_Certificate *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_Certificate &_result_ref = (arg1)->getCA();
        result = (eIDMW::PTEID_Certificate *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getSignature(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_Certificate *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_Certificate &_result_ref = (arg1)->getSignature();
        result = (eIDMW::PTEID_Certificate *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getAuthentication(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_Certificate *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_Certificate &_result_ref = (arg1)->getAuthentication();
        result = (eIDMW::PTEID_Certificate *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getRawData(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_RawDataType arg2 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  arg2 = (eIDMW::PTEID_RawDataType)jarg2; 
  {
    try {
      {
        eIDMW::PTEID_ByteArray const &_result_ref = (arg1)->getRawData(arg2);
        result = (eIDMW::PTEID_ByteArray *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getRawData_1Id(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_ByteArray const &_result_ref = (arg1)->getRawData_Id();
        result = (eIDMW::PTEID_ByteArray *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getRawData_1IdSig(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_ByteArray const &_result_ref = (arg1)->getRawData_IdSig();
        result = (eIDMW::PTEID_ByteArray *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getRawData_1Addr(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_ByteArray const &_result_ref = (arg1)->getRawData_Addr();
        result = (eIDMW::PTEID_ByteArray *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getRawData_1AddrSig(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_ByteArray const &_result_ref = (arg1)->getRawData_AddrSig();
        result = (eIDMW::PTEID_ByteArray *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getRawData_1Picture(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_ByteArray const &_result_ref = (arg1)->getRawData_Picture();
        result = (eIDMW::PTEID_ByteArray *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getRawData_1CardInfo(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_ByteArray const &_result_ref = (arg1)->getRawData_CardInfo();
        result = (eIDMW::PTEID_ByteArray *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getRawData_1TokenInfo(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_ByteArray const &_result_ref = (arg1)->getRawData_TokenInfo();
        result = (eIDMW::PTEID_ByteArray *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getRawData_1CertRRN(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_ByteArray const &_result_ref = (arg1)->getRawData_CertRRN();
        result = (eIDMW::PTEID_ByteArray *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getRawData_1Challenge(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_ByteArray const &_result_ref = (arg1)->getRawData_Challenge();
        result = (eIDMW::PTEID_ByteArray *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getRawData_1Response(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_ByteArray const &_result_ref = (arg1)->getRawData_Response();
        result = (eIDMW::PTEID_ByteArray *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1KidsCard(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_KidsCard *arg1 = (eIDMW::PTEID_KidsCard *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_KidsCard **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1ForeignerCard(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_ForeignerCard *arg1 = (eIDMW::PTEID_ForeignerCard *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_ForeignerCard **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1XMLDoc(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_XMLDoc *arg1 = (eIDMW::PTEID_XMLDoc *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_XMLDoc **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1XMLDoc_1isAllowed(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_XMLDoc *arg1 = (eIDMW::PTEID_XMLDoc *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_XMLDoc **)&jarg1; 
  result = (bool)(arg1)->isAllowed();
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1XMLDoc_1getXML(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_XMLDoc *arg1 = (eIDMW::PTEID_XMLDoc *) 0 ;
  eIDMW::PTEID_ByteArray result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_XMLDoc **)&jarg1; 
  {
    try {
      result = (arg1)->getXML();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = new eIDMW::PTEID_ByteArray((eIDMW::PTEID_ByteArray &)result); 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1XMLDoc_1getCSV(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_XMLDoc *arg1 = (eIDMW::PTEID_XMLDoc *) 0 ;
  eIDMW::PTEID_ByteArray result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_XMLDoc **)&jarg1; 
  {
    try {
      result = (arg1)->getCSV();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = new eIDMW::PTEID_ByteArray((eIDMW::PTEID_ByteArray &)result); 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1XMLDoc_1getTLV(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_XMLDoc *arg1 = (eIDMW::PTEID_XMLDoc *) 0 ;
  eIDMW::PTEID_ByteArray result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_XMLDoc **)&jarg1; 
  {
    try {
      result = (arg1)->getTLV();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = new eIDMW::PTEID_ByteArray((eIDMW::PTEID_ByteArray &)result); 
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1XMLDoc_1writeXmlToFile(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_XMLDoc *arg1 = (eIDMW::PTEID_XMLDoc *) 0 ;
  char *arg2 = (char *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_XMLDoc **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  {
    try {
      result = (bool)(arg1)->writeXmlToFile((char const *)arg2);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jboolean)result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1XMLDoc_1writeCsvToFile(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_XMLDoc *arg1 = (eIDMW::PTEID_XMLDoc *) 0 ;
  char *arg2 = (char *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_XMLDoc **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  {
    try {
      result = (bool)(arg1)->writeCsvToFile((char const *)arg2);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jboolean)result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1XMLDoc_1writeTlvToFile(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_XMLDoc *arg1 = (eIDMW::PTEID_XMLDoc *) 0 ;
  char *arg2 = (char *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_XMLDoc **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  {
    try {
      result = (bool)(arg1)->writeTlvToFile((char const *)arg2);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jboolean)result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1Biometric(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_Biometric *arg1 = (eIDMW::PTEID_Biometric *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_Biometric **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1Crypto(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_Crypto *arg1 = (eIDMW::PTEID_Crypto *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_Crypto **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1CardVersionInfo(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_CardVersionInfo *arg1 = (eIDMW::PTEID_CardVersionInfo *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_CardVersionInfo **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1CardVersionInfo_1getSerialNumber(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_CardVersionInfo *arg1 = (eIDMW::PTEID_CardVersionInfo *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_CardVersionInfo **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getSerialNumber();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1CardVersionInfo_1getComponentCode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_CardVersionInfo *arg1 = (eIDMW::PTEID_CardVersionInfo *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_CardVersionInfo **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getComponentCode();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1CardVersionInfo_1getOsNumber(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_CardVersionInfo *arg1 = (eIDMW::PTEID_CardVersionInfo *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_CardVersionInfo **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getOsNumber();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1CardVersionInfo_1getOsVersion(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_CardVersionInfo *arg1 = (eIDMW::PTEID_CardVersionInfo *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_CardVersionInfo **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getOsVersion();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1CardVersionInfo_1getSoftmaskNumber(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_CardVersionInfo *arg1 = (eIDMW::PTEID_CardVersionInfo *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_CardVersionInfo **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getSoftmaskNumber();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1CardVersionInfo_1getSoftmaskVersion(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_CardVersionInfo *arg1 = (eIDMW::PTEID_CardVersionInfo *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_CardVersionInfo **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getSoftmaskVersion();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1CardVersionInfo_1getAppletVersion(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_CardVersionInfo *arg1 = (eIDMW::PTEID_CardVersionInfo *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_CardVersionInfo **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getAppletVersion();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1CardVersionInfo_1getGlobalOsVersion(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_CardVersionInfo *arg1 = (eIDMW::PTEID_CardVersionInfo *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_CardVersionInfo **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getGlobalOsVersion();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1CardVersionInfo_1getAppletInterfaceVersion(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_CardVersionInfo *arg1 = (eIDMW::PTEID_CardVersionInfo *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_CardVersionInfo **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getAppletInterfaceVersion();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1CardVersionInfo_1getPKCS1Support(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_CardVersionInfo *arg1 = (eIDMW::PTEID_CardVersionInfo *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_CardVersionInfo **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getPKCS1Support();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1CardVersionInfo_1getKeyExchangeVersion(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_CardVersionInfo *arg1 = (eIDMW::PTEID_CardVersionInfo *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_CardVersionInfo **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getKeyExchangeVersion();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1CardVersionInfo_1getAppletLifeCycle(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_CardVersionInfo *arg1 = (eIDMW::PTEID_CardVersionInfo *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_CardVersionInfo **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getAppletLifeCycle();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1CardVersionInfo_1getGraphicalPersonalisation(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_CardVersionInfo *arg1 = (eIDMW::PTEID_CardVersionInfo *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_CardVersionInfo **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getGraphicalPersonalisation();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1CardVersionInfo_1getElectricalPersonalisation(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_CardVersionInfo *arg1 = (eIDMW::PTEID_CardVersionInfo *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_CardVersionInfo **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getElectricalPersonalisation();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1CardVersionInfo_1getElectricalPersonalisationInterface(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_CardVersionInfo *arg1 = (eIDMW::PTEID_CardVersionInfo *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_CardVersionInfo **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getElectricalPersonalisationInterface();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1CardVersionInfo_1getSignature(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_CardVersionInfo *arg1 = (eIDMW::PTEID_CardVersionInfo *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_CardVersionInfo **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_ByteArray const &_result_ref = (arg1)->getSignature();
        result = (eIDMW::PTEID_ByteArray *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1Picture(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_Picture *arg1 = (eIDMW::PTEID_Picture *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_Picture **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Picture_1getData(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Picture *arg1 = (eIDMW::PTEID_Picture *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Picture **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_ByteArray const &_result_ref = (arg1)->getData();
        result = (eIDMW::PTEID_ByteArray *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Picture_1getHash(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Picture *arg1 = (eIDMW::PTEID_Picture *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Picture **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_ByteArray const &_result_ref = (arg1)->getHash();
        result = (eIDMW::PTEID_ByteArray *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1SisId(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_SisId *arg1 = (eIDMW::PTEID_SisId *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_SisId **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SisId_1getName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_SisId *arg1 = (eIDMW::PTEID_SisId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SisId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getName();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SisId_1getSurname(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_SisId *arg1 = (eIDMW::PTEID_SisId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SisId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getSurname();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SisId_1getInitials(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_SisId *arg1 = (eIDMW::PTEID_SisId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SisId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getInitials();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SisId_1getGender(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_SisId *arg1 = (eIDMW::PTEID_SisId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SisId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getGender();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SisId_1getDateOfBirth(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_SisId *arg1 = (eIDMW::PTEID_SisId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SisId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getDateOfBirth();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SisId_1getSocialSecurityNumber(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_SisId *arg1 = (eIDMW::PTEID_SisId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SisId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getSocialSecurityNumber();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SisId_1getLogicalNumber(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_SisId *arg1 = (eIDMW::PTEID_SisId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SisId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getLogicalNumber();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SisId_1getDateOfIssue(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_SisId *arg1 = (eIDMW::PTEID_SisId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SisId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getDateOfIssue();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SisId_1getValidityBeginDate(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_SisId *arg1 = (eIDMW::PTEID_SisId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SisId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getValidityBeginDate();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1SisId_1getValidityEndDate(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_SisId *arg1 = (eIDMW::PTEID_SisId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SisId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getValidityEndDate();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1EId(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getDocumentVersion(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getDocumentVersion();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getDocumentType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getDocumentType();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getFirstName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getFirstName();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getFirstName1(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  result = (char *)(arg1)->getFirstName1();
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getFirstName2(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  result = (char *)(arg1)->getFirstName2();
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getSurname(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getSurname();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getGender(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getGender();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getDateOfBirth(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getDateOfBirth();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getLocationOfBirth(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getLocationOfBirth();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getNobility(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getNobility();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getNationality(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getNationality();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getNationalNumber(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getNationalNumber();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getDuplicata(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getDuplicata();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getSpecialOrganization(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getSpecialOrganization();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getMemberOfFamily(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getMemberOfFamily();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getLogicalNumber(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getLogicalNumber();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getChipNumber(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getChipNumber();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getValidityBeginDate(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getValidityBeginDate();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getValidityEndDate(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getValidityEndDate();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getIssuingMunicipality(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getIssuingMunicipality();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getAddressVersion(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getAddressVersion();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getStreet(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getStreet();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getZipCode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getZipCode();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getMunicipality(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getMunicipality();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getCountry(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getCountry();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1EId_1getSpecialStatus(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getSpecialStatus();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1SisFullDoc(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_SisFullDoc *arg1 = (eIDMW::PTEID_SisFullDoc *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_SisFullDoc **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1EIdFullDoc(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_EIdFullDoc *arg1 = (eIDMW::PTEID_EIdFullDoc *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_EIdFullDoc **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1Pins(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_Pins *arg1 = (eIDMW::PTEID_Pins *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_Pins **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Pins_1count(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Pins *arg1 = (eIDMW::PTEID_Pins *) 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Pins **)&jarg1; 
  {
    try {
      result = (unsigned long)(arg1)->count();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Pins_1getPinByNumber(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Pins *arg1 = (eIDMW::PTEID_Pins *) 0 ;
  unsigned long arg2 ;
  eIDMW::PTEID_Pin *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Pins **)&jarg1; 
  arg2 = (unsigned long)jarg2; 
  {
    try {
      {
        eIDMW::PTEID_Pin &_result_ref = (arg1)->getPinByNumber(arg2);
        result = (eIDMW::PTEID_Pin *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_Pin **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1Pin(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_Pin *arg1 = (eIDMW::PTEID_Pin *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_Pin **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Pin_1getIndex(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Pin *arg1 = (eIDMW::PTEID_Pin *) 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Pin **)&jarg1; 
  {
    try {
      result = (unsigned long)(arg1)->getIndex();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Pin_1getType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Pin *arg1 = (eIDMW::PTEID_Pin *) 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Pin **)&jarg1; 
  {
    try {
      result = (unsigned long)(arg1)->getType();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Pin_1getId(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Pin *arg1 = (eIDMW::PTEID_Pin *) 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Pin **)&jarg1; 
  {
    try {
      result = (unsigned long)(arg1)->getId();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Pin_1getUsageCode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jint jresult = 0 ;
  eIDMW::PTEID_Pin *arg1 = (eIDMW::PTEID_Pin *) 0 ;
  eIDMW::PTEID_PinUsage result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Pin **)&jarg1; 
  {
    try {
      result = (eIDMW::PTEID_PinUsage)(arg1)->getUsageCode();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Pin_1getFlags(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Pin *arg1 = (eIDMW::PTEID_Pin *) 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Pin **)&jarg1; 
  {
    try {
      result = (unsigned long)(arg1)->getFlags();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Pin_1getLabel(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Pin *arg1 = (eIDMW::PTEID_Pin *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Pin **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getLabel();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Pin_1getSignature(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Pin *arg1 = (eIDMW::PTEID_Pin *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Pin **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_ByteArray const &_result_ref = (arg1)->getSignature();
        result = (eIDMW::PTEID_ByteArray *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Pin_1getTriesLeft(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jint jresult = 0 ;
  eIDMW::PTEID_Pin *arg1 = (eIDMW::PTEID_Pin *) 0 ;
  long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Pin **)&jarg1; 
  {
    try {
      result = (long)(arg1)->getTriesLeft();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Pin_1verifyPin(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_Pin *arg1 = (eIDMW::PTEID_Pin *) 0 ;
  char *arg2 = (char *) 0 ;
  unsigned long *arg3 = 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Pin **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  arg3 = *(unsigned long **)&jarg3;
  if(!arg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "unsigned long & reference is null");
    return 0;
  } 
  {
    try {
      result = (bool)(arg1)->verifyPin((char const *)arg2,*arg3);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jboolean)result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Pin_1changePin(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jlong jarg4) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_Pin *arg1 = (eIDMW::PTEID_Pin *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  unsigned long *arg4 = 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Pin **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  arg3 = 0;
  if (jarg3) {
    arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    if (!arg3) return 0;
  }
  arg4 = *(unsigned long **)&jarg4;
  if(!arg4) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "unsigned long & reference is null");
    return 0;
  } 
  {
    try {
      result = (bool)(arg1)->changePin((char const *)arg2,(char const *)arg3,*arg4);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jboolean)result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1Crl(JNIEnv *jenv, jclass jcls, jstring jarg1) {
  jlong jresult = 0 ;
  char *arg1 = (char *) 0 ;
  eIDMW::PTEID_Crl *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
    if (!arg1) return 0;
  }
  result = (eIDMW::PTEID_Crl *)new eIDMW::PTEID_Crl((char const *)arg1);
  *(eIDMW::PTEID_Crl **)&jresult = result; 
  if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1Crl(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_Crl *arg1 = (eIDMW::PTEID_Crl *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_Crl **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Crl_1getUri(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Crl *arg1 = (eIDMW::PTEID_Crl *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Crl **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getUri();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Crl_1getIssuerName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Crl *arg1 = (eIDMW::PTEID_Crl *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Crl **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getIssuerName();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Crl_1getIssuer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Crl *arg1 = (eIDMW::PTEID_Crl *) 0 ;
  eIDMW::PTEID_Certificate *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Crl **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_Certificate &_result_ref = (arg1)->getIssuer();
        result = (eIDMW::PTEID_Certificate *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Crl_1getData_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jboolean jarg3) {
  jint jresult = 0 ;
  eIDMW::PTEID_Crl *arg1 = (eIDMW::PTEID_Crl *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = 0 ;
  bool arg3 ;
  eIDMW::PTEID_CrlStatus result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_Crl **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2;
  if(!arg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray & reference is null");
    return 0;
  } 
  arg3 = jarg3 ? true : false; 
  {
    try {
      result = (eIDMW::PTEID_CrlStatus)(arg1)->getData(*arg2,arg3);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Crl_1getData_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  jint jresult = 0 ;
  eIDMW::PTEID_Crl *arg1 = (eIDMW::PTEID_Crl *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = 0 ;
  eIDMW::PTEID_CrlStatus result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_Crl **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2;
  if(!arg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray & reference is null");
    return 0;
  } 
  {
    try {
      result = (eIDMW::PTEID_CrlStatus)(arg1)->getData(*arg2);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1OcspResponse(JNIEnv *jenv, jclass jcls, jstring jarg1, jint jarg2, jlong jarg3, jobject jarg3_, jlong jarg4, jobject jarg4_, jlong jarg5, jobject jarg5_) {
  jlong jresult = 0 ;
  char *arg1 = (char *) 0 ;
  eIDMW::PTEID_HashAlgo arg2 ;
  eIDMW::PTEID_ByteArray *arg3 = 0 ;
  eIDMW::PTEID_ByteArray *arg4 = 0 ;
  eIDMW::PTEID_ByteArray *arg5 = 0 ;
  eIDMW::PTEID_OcspResponse *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg3_;
  (void)jarg4_;
  (void)jarg5_;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
    if (!arg1) return 0;
  }
  arg2 = (eIDMW::PTEID_HashAlgo)jarg2; 
  arg3 = *(eIDMW::PTEID_ByteArray **)&jarg3;
  if(!arg3) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray const & reference is null");
    return 0;
  } 
  arg4 = *(eIDMW::PTEID_ByteArray **)&jarg4;
  if(!arg4) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray const & reference is null");
    return 0;
  } 
  arg5 = *(eIDMW::PTEID_ByteArray **)&jarg5;
  if(!arg5) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray const & reference is null");
    return 0;
  } 
  result = (eIDMW::PTEID_OcspResponse *)new eIDMW::PTEID_OcspResponse((char const *)arg1,arg2,(eIDMW::PTEID_ByteArray const &)*arg3,(eIDMW::PTEID_ByteArray const &)*arg4,(eIDMW::PTEID_ByteArray const &)*arg5);
  *(eIDMW::PTEID_OcspResponse **)&jresult = result; 
  if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1OcspResponse(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_OcspResponse *arg1 = (eIDMW::PTEID_OcspResponse *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_OcspResponse **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1OcspResponse_1getUri(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_OcspResponse *arg1 = (eIDMW::PTEID_OcspResponse *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_OcspResponse **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getUri();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1OcspResponse_1getResponse(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  jint jresult = 0 ;
  eIDMW::PTEID_OcspResponse *arg1 = (eIDMW::PTEID_OcspResponse *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = 0 ;
  eIDMW::PTEID_CertifStatus result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_OcspResponse **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2;
  if(!arg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray & reference is null");
    return 0;
  } 
  {
    try {
      result = (eIDMW::PTEID_CertifStatus)(arg1)->getResponse(*arg2);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1Certificates(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Certificates *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_Certificates *)new eIDMW::PTEID_Certificates();
  *(eIDMW::PTEID_Certificates **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1Certificates(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_Certificates *arg1 = (eIDMW::PTEID_Certificates *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_Certificates **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificates_1countFromCard(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Certificates *arg1 = (eIDMW::PTEID_Certificates *) 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificates **)&jarg1; 
  {
    try {
      result = (unsigned long)(arg1)->countFromCard();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificates_1countAll(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Certificates *arg1 = (eIDMW::PTEID_Certificates *) 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificates **)&jarg1; 
  {
    try {
      result = (unsigned long)(arg1)->countAll();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificates_1getCertFromCard(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Certificates *arg1 = (eIDMW::PTEID_Certificates *) 0 ;
  unsigned long arg2 ;
  eIDMW::PTEID_Certificate *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificates **)&jarg1; 
  arg2 = (unsigned long)jarg2; 
  {
    try {
      {
        eIDMW::PTEID_Certificate &_result_ref = (arg1)->getCertFromCard(arg2);
        result = (eIDMW::PTEID_Certificate *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificates_1getCert_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Certificates *arg1 = (eIDMW::PTEID_Certificates *) 0 ;
  unsigned long arg2 ;
  eIDMW::PTEID_Certificate *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificates **)&jarg1; 
  arg2 = (unsigned long)jarg2; 
  {
    try {
      {
        eIDMW::PTEID_Certificate &_result_ref = (arg1)->getCert(arg2);
        result = (eIDMW::PTEID_Certificate *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificates_1getCert_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Certificates *arg1 = (eIDMW::PTEID_Certificates *) 0 ;
  eIDMW::PTEID_CertifType arg2 ;
  eIDMW::PTEID_Certificate *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificates **)&jarg1; 
  arg2 = (eIDMW::PTEID_CertifType)jarg2; 
  {
    try {
      {
        eIDMW::PTEID_Certificate &_result_ref = (arg1)->getCert(arg2);
        result = (eIDMW::PTEID_Certificate *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificates_1getRrn(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Certificates *arg1 = (eIDMW::PTEID_Certificates *) 0 ;
  eIDMW::PTEID_Certificate *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificates **)&jarg1; 
  {
    eIDMW::PTEID_Certificate &_result_ref = (arg1)->getRrn();
    result = (eIDMW::PTEID_Certificate *) &_result_ref;
  }
  *(eIDMW::PTEID_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificates_1getRoot(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Certificates *arg1 = (eIDMW::PTEID_Certificates *) 0 ;
  eIDMW::PTEID_Certificate *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificates **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_Certificate &_result_ref = (arg1)->getRoot();
        result = (eIDMW::PTEID_Certificate *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificates_1getCA(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Certificates *arg1 = (eIDMW::PTEID_Certificates *) 0 ;
  eIDMW::PTEID_Certificate *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificates **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_Certificate &_result_ref = (arg1)->getCA();
        result = (eIDMW::PTEID_Certificate *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificates_1getSignature(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Certificates *arg1 = (eIDMW::PTEID_Certificates *) 0 ;
  eIDMW::PTEID_Certificate *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificates **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_Certificate &_result_ref = (arg1)->getSignature();
        result = (eIDMW::PTEID_Certificate *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificates_1getAuthentication(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Certificates *arg1 = (eIDMW::PTEID_Certificates *) 0 ;
  eIDMW::PTEID_Certificate *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificates **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_Certificate &_result_ref = (arg1)->getAuthentication();
        result = (eIDMW::PTEID_Certificate *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificates_1addCertificate(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Certificates *arg1 = (eIDMW::PTEID_Certificates *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = 0 ;
  eIDMW::PTEID_Certificate *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_Certificates **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2;
  if(!arg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray & reference is null");
    return 0;
  } 
  {
    try {
      {
        eIDMW::PTEID_Certificate &_result_ref = (arg1)->addCertificate(*arg2);
        result = (eIDMW::PTEID_Certificate *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1Certificate(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1getLabel(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getLabel();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1getID(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  {
    try {
      result = (unsigned long)(arg1)->getID();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1getStatus_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jint jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  eIDMW::PTEID_CertifStatus result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  {
    try {
      result = (eIDMW::PTEID_CertifStatus)(arg1)->getStatus();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1getStatus_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2, jint jarg3) {
  jint jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  eIDMW::PTEID_ValidationLevel arg2 ;
  eIDMW::PTEID_ValidationLevel arg3 ;
  eIDMW::PTEID_CertifStatus result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  arg2 = (eIDMW::PTEID_ValidationLevel)jarg2; 
  arg3 = (eIDMW::PTEID_ValidationLevel)jarg3; 
  {
    try {
      result = (eIDMW::PTEID_CertifStatus)(arg1)->getStatus(arg2,arg3);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1getType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jint jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  eIDMW::PTEID_CertifType result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  {
    try {
      result = (eIDMW::PTEID_CertifType)(arg1)->getType();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1getCertData(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_ByteArray const &_result_ref = (arg1)->getCertData();
        result = (eIDMW::PTEID_ByteArray *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1getFormattedData(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_) {
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  arg2 = *(eIDMW::PTEID_ByteArray **)&jarg2;
  if(!arg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_ByteArray & reference is null");
    return ;
  } 
  (arg1)->getFormattedData(*arg2);
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1getSerialNumber(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getSerialNumber();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1getOwnerName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getOwnerName();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1getIssuerName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getIssuerName();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1getValidityBegin(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getValidityBegin();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1getValidityEnd(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getValidityEnd();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1getKeyLength(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  {
    try {
      result = (unsigned long)(arg1)->getKeyLength();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1isRoot(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  {
    try {
      result = (bool)(arg1)->isRoot();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1isTest(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  result = (bool)(arg1)->isTest();
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1isFromPteidValidChain(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  {
    try {
      result = (bool)(arg1)->isFromPteidValidChain();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1isFromCard(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  {
    try {
      result = (bool)(arg1)->isFromCard();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jboolean)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1getIssuer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  eIDMW::PTEID_Certificate *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_Certificate &_result_ref = (arg1)->getIssuer();
        result = (eIDMW::PTEID_Certificate *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1countChildren(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  {
    try {
      result = (unsigned long)(arg1)->countChildren();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1getChildren(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  unsigned long arg2 ;
  eIDMW::PTEID_Certificate *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  arg2 = (unsigned long)jarg2; 
  {
    try {
      {
        eIDMW::PTEID_Certificate &_result_ref = (arg1)->getChildren(arg2);
        result = (eIDMW::PTEID_Certificate *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1getCRL(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  eIDMW::PTEID_Crl *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_Crl &_result_ref = (arg1)->getCRL();
        result = (eIDMW::PTEID_Crl *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_Crl **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1getOcspResponse(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  eIDMW::PTEID_OcspResponse *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  {
    try {
      {
        eIDMW::PTEID_OcspResponse &_result_ref = (arg1)->getOcspResponse();
        result = (eIDMW::PTEID_OcspResponse *) &_result_ref;
      }
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  *(eIDMW::PTEID_OcspResponse **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1verifyCRL_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jboolean jarg2) {
  jint jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  bool arg2 ;
  eIDMW::PTEID_CertifStatus result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  arg2 = jarg2 ? true : false; 
  {
    try {
      result = (eIDMW::PTEID_CertifStatus)(arg1)->verifyCRL(arg2);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1verifyCRL_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jint jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  eIDMW::PTEID_CertifStatus result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  {
    try {
      result = (eIDMW::PTEID_CertifStatus)(arg1)->verifyCRL();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1verifyOCSP(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jint jresult = 0 ;
  eIDMW::PTEID_Certificate *arg1 = (eIDMW::PTEID_Certificate *) 0 ;
  eIDMW::PTEID_CertifStatus result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificate **)&jarg1; 
  {
    try {
      result = (eIDMW::PTEID_CertifStatus)(arg1)->verifyOCSP();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1Config_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jint jarg1) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Param arg1 ;
  eIDMW::PTEID_Config *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = (eIDMW::PTEID_Param)jarg1; 
  result = (eIDMW::PTEID_Config *)new eIDMW::PTEID_Config(arg1);
  *(eIDMW::PTEID_Config **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1Config_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jstring jarg3) {
  jlong jresult = 0 ;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  eIDMW::PTEID_Config *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
    if (!arg1) return 0;
  }
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  arg3 = 0;
  if (jarg3) {
    arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    if (!arg3) return 0;
  }
  result = (eIDMW::PTEID_Config *)new eIDMW::PTEID_Config((char const *)arg1,(char const *)arg2,(char const *)arg3);
  *(eIDMW::PTEID_Config **)&jresult = result; 
  if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_new_1PTEID_1Config_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jint jarg3) {
  jlong jresult = 0 ;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  long arg3 ;
  eIDMW::PTEID_Config *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
    if (!arg1) return 0;
  }
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  arg3 = (long)jarg3; 
  result = (eIDMW::PTEID_Config *)new eIDMW::PTEID_Config((char const *)arg1,(char const *)arg2,arg3);
  *(eIDMW::PTEID_Config **)&jresult = result; 
  if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_delete_1PTEID_1Config(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_Config *arg1 = (eIDMW::PTEID_Config *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_Config **)&jarg1; 
  delete arg1;
  
}


SWIGEXPORT jstring JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Config_1getString(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Config *arg1 = (eIDMW::PTEID_Config *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Config **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getString();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  if(result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jint JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Config_1getLong(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jint jresult = 0 ;
  eIDMW::PTEID_Config *arg1 = (eIDMW::PTEID_Config *) 0 ;
  long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Config **)&jarg1; 
  {
    try {
      result = (long)(arg1)->getLong();
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return 0;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return 0;
    }
  }
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Config_1setString(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  eIDMW::PTEID_Config *arg1 = (eIDMW::PTEID_Config *) 0 ;
  char *arg2 = (char *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Config **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return ;
  }
  {
    try {
      (arg1)->setString((char const *)arg2);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return ;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return ;
    }
  }
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1Config_1setLong(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  eIDMW::PTEID_Config *arg1 = (eIDMW::PTEID_Config *) 0 ;
  long arg2 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Config **)&jarg1; 
  arg2 = (long)jarg2; 
  {
    try {
      (arg1)->setLong(arg2);
    }
    catch (eIDMW::PTEID_Exception& e) 
    {
      long err = e.GetError();
      CustomExceptionHelper::throwJavaException(err,jenv);
      return ;
    }
    catch (std::exception& e)
    {
      std::string err = e.what();
      jclass clazz = jenv->FindClass("java/lang/Exception");
      jenv->ThrowNew(clazz, err.c_str());
      return ;
    }
  }
}


SWIGEXPORT void JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_PTEID_1LOG(JNIEnv *jenv, jclass jcls, jint jarg1, jstring jarg2, jstring jarg3) {
  eIDMW::PTEID_LogLevel arg1 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  void *arg4 = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = (eIDMW::PTEID_LogLevel)jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return ;
  }
  arg3 = 0;
  if (jarg3) {
    arg3 = (char *)jenv->GetStringUTFChars(jarg3, 0);
    if (!arg3) return ;
  }
  eIDMW::PTEID_LOG(arg1,(char const *)arg2,(char const *)arg3,arg4);
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
}


SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ExReleaseNeededUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Exception **)&baseptr = *(eIDMW::PTEID_ExReleaseNeeded **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ExUnknownUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Exception **)&baseptr = *(eIDMW::PTEID_ExUnknown **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ExDocTypeUnknownUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Exception **)&baseptr = *(eIDMW::PTEID_ExDocTypeUnknown **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ExFileTypeUnknownUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Exception **)&baseptr = *(eIDMW::PTEID_ExFileTypeUnknown **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ExParamRangeUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Exception **)&baseptr = *(eIDMW::PTEID_ExParamRange **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ExCmdNotAllowedUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Exception **)&baseptr = *(eIDMW::PTEID_ExCmdNotAllowed **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ExCmdNotSupportedUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Exception **)&baseptr = *(eIDMW::PTEID_ExCmdNotSupported **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ExNoCardPresentUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Exception **)&baseptr = *(eIDMW::PTEID_ExNoCardPresent **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ExCardBadTypeUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Exception **)&baseptr = *(eIDMW::PTEID_ExCardBadType **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ExCardTypeUnknownUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Exception **)&baseptr = *(eIDMW::PTEID_ExCardTypeUnknown **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ExCertNoIssuerUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Exception **)&baseptr = *(eIDMW::PTEID_ExCertNoIssuer **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ExCertNoCrlUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Exception **)&baseptr = *(eIDMW::PTEID_ExCertNoCrl **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ExCertNoOcspUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Exception **)&baseptr = *(eIDMW::PTEID_ExCertNoOcsp **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ExCertNoRootUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Exception **)&baseptr = *(eIDMW::PTEID_ExCertNoRoot **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ExBadUsageUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Exception **)&baseptr = *(eIDMW::PTEID_ExBadUsage **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ExBadTransactionUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Exception **)&baseptr = *(eIDMW::PTEID_ExBadTransaction **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ExCardChangedUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Exception **)&baseptr = *(eIDMW::PTEID_ExCardChanged **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ExReaderSetChangedUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Exception **)&baseptr = *(eIDMW::PTEID_ExReaderSetChanged **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ExNoReaderUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Exception **)&baseptr = *(eIDMW::PTEID_ExNoReader **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ExNotAllowByUserUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Exception **)&baseptr = *(eIDMW::PTEID_ExNotAllowByUser **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ExUserMustAnswerUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Exception **)&baseptr = *(eIDMW::PTEID_ExUserMustAnswer **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ByteArrayUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Object **)&baseptr = *(eIDMW::PTEID_ByteArray **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ReaderSetUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Object **)&baseptr = *(eIDMW::PTEID_ReaderSet **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ReaderContextUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Object **)&baseptr = *(eIDMW::PTEID_ReaderContext **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1CardUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Object **)&baseptr = *(eIDMW::PTEID_Card **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1MemoryCardUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Card **)&baseptr = *(eIDMW::PTEID_MemoryCard **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1SmartCardUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Card **)&baseptr = *(eIDMW::PTEID_SmartCard **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1SISCardUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_MemoryCard **)&baseptr = *(eIDMW::PTEID_SISCard **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1EIDCardUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_SmartCard **)&baseptr = *(eIDMW::PTEID_EIDCard **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1KidsCardUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_EIDCard **)&baseptr = *(eIDMW::PTEID_KidsCard **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ForeignerCardUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_EIDCard **)&baseptr = *(eIDMW::PTEID_ForeignerCard **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1XMLDocUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Object **)&baseptr = *(eIDMW::PTEID_XMLDoc **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1BiometricUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_XMLDoc **)&baseptr = *(eIDMW::PTEID_Biometric **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1CryptoUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_XMLDoc **)&baseptr = *(eIDMW::PTEID_Crypto **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1CardVersionInfoUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_XMLDoc **)&baseptr = *(eIDMW::PTEID_CardVersionInfo **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1PictureUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Biometric **)&baseptr = *(eIDMW::PTEID_Picture **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1SisIdUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_XMLDoc **)&baseptr = *(eIDMW::PTEID_SisId **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1EIdUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_XMLDoc **)&baseptr = *(eIDMW::PTEID_EId **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1SisFullDocUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_XMLDoc **)&baseptr = *(eIDMW::PTEID_SisFullDoc **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1EIdFullDocUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_XMLDoc **)&baseptr = *(eIDMW::PTEID_EIdFullDoc **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1PinsUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Crypto **)&baseptr = *(eIDMW::PTEID_Pins **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1PinUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Crypto **)&baseptr = *(eIDMW::PTEID_Pin **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1CrlUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Object **)&baseptr = *(eIDMW::PTEID_Crl **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1OcspResponseUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Object **)&baseptr = *(eIDMW::PTEID_OcspResponse **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1CertificatesUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Crypto **)&baseptr = *(eIDMW::PTEID_Certificates **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1CertificateUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Crypto **)&baseptr = *(eIDMW::PTEID_Certificate **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_be_portugal_eid_pteidlibJava_1WrapperJNI_SWIGPTEID_1ConfigUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Object **)&baseptr = *(eIDMW::PTEID_Config **)&jarg1;
    return baseptr;
}

#ifdef __cplusplus
}
#endif

