/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 2.0.11
 *
 * 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.
 * ----------------------------------------------------------------------------- */

#define SWIGJAVA


#ifdef __cplusplus
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper {
  struct SwigMovePointer {
    T *ptr;
    SwigMovePointer(T *p) : ptr(p) { }
    ~SwigMovePointer() { delete ptr; }
    SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
  } pointer;
  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
public:
  SwigValueWrapper() : pointer(0) { }
  SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
  operator T&() const { return *pointer.ptr; }
  T *operator&() { return pointer.ptr; }
};

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 SWIG_MSC_UNSUPPRESS_4505
# if defined(_MSC_VER)
#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
# 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(__INTEL_COMPILER)
  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 = "pt/gov/cartaodecidadao";

			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_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_SOD_UNEXPECTED_VALUE:	
			case EIDMW_SOD_UNEXPECTED_ASN1_TAG:      			
			case EIDMW_SOD_UNEXPECTED_ALGO_OID:				
			case EIDMW_SOD_ERR_HASH_NO_MATCH_ID:				
			case EIDMW_SOD_ERR_HASH_NO_MATCH_ADDRESS:			
			case EIDMW_SOD_ERR_HASH_NO_MATCH_PICTURE:			
			case EIDMW_SOD_ERR_HASH_NO_MATCH_PUBLIC_KEY:		
			case EIDMW_SOD_ERR_VERIFY_SOD_SIGN:
				classDescription += "/PTEID_ExSOD";
				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;			
			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, long 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
	long 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("pt/gov/cartaodecidadao/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 *obj) { 
  if (obj) delete obj; 
}

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

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


#ifdef __cplusplus
extern "C" {
#endif

SWIGEXPORT jint JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_EIDMW_1ERR_1PINREF_1NOT_1FOUND_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int)(0xe1d0020B);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_EIDMW_1XERCES_1INIT_1ERROR_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int)(0xe1d00701);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_EIDMW_1SOD_1UNEXPECTED_1VALUE_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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_EIDMW_1SOD_1UNEXPECTED_1ASN1_1TAG_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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_EIDMW_1SOD_1UNEXPECTED_1ALGO_1OID_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int)(0xe1d00c03);
  jresult = (jint)result; 
  return jresult;
}


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


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


SWIGEXPORT jint JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1DOCTYPE_1ID_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  eIDMW::PTEID_DocumentType result;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_DocumentType)eIDMW::PTEID_DOCTYPE_ID;
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_new_1PTEID_1ExSOD(JNIEnv *jenv, jclass jcls, jint jarg1) {
  jlong jresult = 0 ;
  long arg1 ;
  eIDMW::PTEID_ExSOD *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = (long)jarg1; 
  result = (eIDMW::PTEID_ExSOD *)new eIDMW::PTEID_ExSOD(arg1);
  *(eIDMW::PTEID_ExSOD **)&jresult = result; 
  return jresult;
}


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


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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 jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1ROOT_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("ccpt");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1ROOT_1ELEMENT_1ATTR_1TIMESTAMP_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("timestamp");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1ROOT_1ELEMENT_1ATTR_1SERVERNAME_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("servername");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1ROOT_1ELEMENT_1ATTR_1SERVERADDRESS_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("serveraddress");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1ROOT_1ELEMENT_1ATTR_1TOKENID_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("tokenid");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1PHOTO_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("photo");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1BASIC_1INFO_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("basicInformation");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1NAME_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("name");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1GIVEN_1NAME_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("givenName");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1SURNAME_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("surname");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1NIC_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("nic");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1EXPIRY_1DATE_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("expiryDate");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1CIVIL_1INFO_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("CivilInformation");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1GENDER_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("sex");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1HEIGHT_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("height");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1NATIONALITY_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("nationality");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1DATE_1OF_1BIRTH_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("dateOfBirth");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1GIVEN_1NAME_1FATHER_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("givenNameFather");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1SURNAME_1FATHER_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("surnameFather");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1GIVEN_1NAME_1MOTHER_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("givenNameMother");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1SURNAME_1MOTHER_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("surnameMother");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1ACCIDENTAL_1INDICATIONS_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("notes");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1IDENTIFICATION_1NUMBERS_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("IdentificationNumbers");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1DOCUMENT_1NO_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("DocumentNo");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1TAX_1NO_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("TaxNo");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1SOCIAL_1SECURITY_1NO_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("SocialSecurityNo");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1HEALTH_1NO_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("HealthNo");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1MRZ1_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("mrz1");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1MRZ2_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("mrz2");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1MRZ3_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("mrz3");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1CARD_1VALUES_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("CardValues");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1CARD_1VERSION_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("cardVersion");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1CARD_1NUMBER_1PAN_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("cardNumberPAN");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1ISSUING_1DATE_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("issuingDate");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1ISSUING_1ENTITY_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("issuingEntity");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1DOCUMENT_1TYPE_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("documentType");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1LOCAL_1OF_1REQUEST_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("localOfRequest");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1VERSION_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("version");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1ADDRESS_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("Address");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1DISTRICT_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("district");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1MUNICIPALITY_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("municipality");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1CIVIL_1PARISH_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("civilParish");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1ABBR_1STREET_1TYPE_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("abrStreetType");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1STREET_1TYPE_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("streetType");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1STREET_1NAME_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("streetName");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1ABBR_1BUILDING_1TYPE_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("abrBuildingType");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1BUILDING_1TYPE_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("buildingType");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1DOOR_1NO_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("doorNo");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1FLOOR_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("floor");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1SIDE_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("side");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1PLACE_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("place");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1LOCALITY_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("locality");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1ZIP4_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("zip4");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1ZIP3_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("zip3");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1POSTAL_1LOCALITY_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("postalLocality");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1PERSONAL_1NOTES_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("userNotes");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1FOREIGN_1COUNTRY_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("foreignCountry");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1FOREIGN_1ADDRESS_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("foreignAddress");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1FOREIGN_1CITY_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("foreignCity");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1FOREIGN_1REGION_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("foreignRegion");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1FOREIGN_1LOCALITY_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("foreignLocality");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1FOREIGN_1POSTAL_1CODE_1ELEMENT_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("foreignPostalCode");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1ROOT_1S_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)("<ccpt ");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1ROOT_1E_1get(JNIEnv *jenv, jclass jcls) {
  jstring jresult = 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (char *)(">\n");
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jint JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_XML_1PHOTO_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  eIDMW::XMLUserData result;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::XMLUserData)eIDMW::XML_PHOTO;
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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;
  } 
  result = (eIDMW::PTEID_ByteArray *) &(arg1)->operator =((eIDMW::PTEID_ByteArray const &)*arg2);
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


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


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


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


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


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


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


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


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


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


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


SWIGEXPORT jint JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1E_1BAD_1PARAM_1get(JNIEnv *jenv, jclass jcls) {
  jint jresult = 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  result = (int)(1);
  jresult = (jint)result; 
  return jresult;
}


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


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


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


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


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


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


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


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


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


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


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


SWIGEXPORT void JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1sodData_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)->sodData = *arg2;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1sodData_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)->sodData);
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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 void JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1persoData_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)->persoData = *arg2;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1persoData_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)->persoData);
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1trace_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)->trace = *arg2;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1RawData_1Eid_1trace_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)->trace);
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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 jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ReaderSet_1instance(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_ReaderSet *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  {
    try {
      result = (eIDMW::PTEID_ReaderSet *) &eIDMW::PTEID_ReaderSet::instance();
    }
    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_ReaderSet **)&jresult = result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_ReaderContext *) &(arg1)->getReader();
    }
    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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_ReaderContext *) &(arg1)->getReaderByName((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_ReaderContext **)&jresult = result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_ReaderContext *) &(arg1)->getReaderByNum(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_ReaderContext **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_ReaderContext *) &(arg1)->getReaderByCardSerialNumber((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_ReaderContext **)&jresult = result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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 void JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_Card *) &(arg1)->getCard();
    }
    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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_EIDCard *) &(arg1)->getEIDCard();
    }
    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_pt_gov_cartaodecidadao_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,(long 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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_XMLDoc *) &(arg1)->getDocument(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_XMLDoc **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_ByteArray *) &(arg1)->getRawData(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 = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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((const eIDMW::PTEID_ByteArray &)result); 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Card_1Sign_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jboolean jarg3) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Card *arg1 = (eIDMW::PTEID_Card *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = 0 ;
  bool arg3 ;
  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;
  } 
  arg3 = jarg3 ? true : false; 
  {
    try {
      result = (arg1)->Sign((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((const eIDMW::PTEID_ByteArray &)result); 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Card_1Sign_1_1SWIG_11(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)->Sign((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((const eIDMW::PTEID_ByteArray &)result); 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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((const eIDMW::PTEID_ByteArray &)result); 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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((const eIDMW::PTEID_ByteArray &)result); 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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((const eIDMW::PTEID_ByteArray &)result); 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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((const eIDMW::PTEID_ByteArray &)result); 
  if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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((const eIDMW::PTEID_ByteArray &)result); 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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((const eIDMW::PTEID_ByteArray &)result); 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_Pins *) &(arg1)->getPins();
    }
    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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_Certificates *) &(arg1)->getCertificates();
    }
    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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_ByteArray *) &(arg1)->getChallenge(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 = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_ByteArray *) &(arg1)->getChallenge();
    }
    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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_ByteArray *) &(arg1)->getChallengeResponse();
    }
    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_pt_gov_cartaodecidadao_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 jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_new_1PTEID_1PDFSignature_1_1SWIG_10(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  eIDMW::PTEID_PDFSignature *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  result = (eIDMW::PTEID_PDFSignature *)new eIDMW::PTEID_PDFSignature();
  *(eIDMW::PTEID_PDFSignature **)&jresult = result; 
  return jresult;
}


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


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


SWIGEXPORT void JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1PDFSignature_1addToBatchSigning(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  eIDMW::PTEID_PDFSignature *arg1 = (eIDMW::PTEID_PDFSignature *) 0 ;
  char *arg2 = (char *) 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_PDFSignature **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return ;
  }
  (arg1)->addToBatchSigning(arg2);
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
}


SWIGEXPORT jint JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1PDFSignature_1getPageCount(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jint jresult = 0 ;
  eIDMW::PTEID_PDFSignature *arg1 = (eIDMW::PTEID_PDFSignature *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_PDFSignature **)&jarg1; 
  result = (int)(arg1)->getPageCount();
  jresult = (jint)result; 
  return jresult;
}


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


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


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1PDFSignature_1getOccupiedSectors(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  jstring jresult = 0 ;
  eIDMW::PTEID_PDFSignature *arg1 = (eIDMW::PTEID_PDFSignature *) 0 ;
  int arg2 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_PDFSignature **)&jarg1; 
  arg2 = (int)jarg2; 
  result = (char *)(arg1)->getOccupiedSectors(arg2);
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT void JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1PDFSignature_1setCustomImage(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jlong jarg3) {
  eIDMW::PTEID_PDFSignature *arg1 = (eIDMW::PTEID_PDFSignature *) 0 ;
  unsigned char *arg2 = (unsigned char *) 0 ;
  unsigned long arg3 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_PDFSignature **)&jarg1; 
  arg2 = *(unsigned char **)&jarg2; 
  arg3 = (unsigned long)jarg3; 
  (arg1)->setCustomImage(arg2,arg3);
}


SWIGEXPORT void JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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 jlong JNICALL Java_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_XMLDoc *) &(arg1)->getDocument(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_XMLDoc **)&jresult = result; 
  return jresult;
}


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


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_EId *) &(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;
    }
  }
  *(eIDMW::PTEID_EId **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getAddr(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_Address *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      result = (eIDMW::PTEID_Address *) &(arg1)->getAddr();
    }
    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_Address **)&jresult = result; 
  return jresult;
}


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


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_CardVersionInfo *) &(arg1)->getVersionInfo();
    }
    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 jboolean JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1writePersonalNotes_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_, jstring jarg4) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = 0 ;
  eIDMW::PTEID_Pin *arg3 = (eIDMW::PTEID_Pin *) 0 ;
  char *arg4 = (char *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  (void)jarg3_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&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;
  }
  result = (bool)(arg1)->writePersonalNotes((eIDMW::PTEID_ByteArray const &)*arg2,arg3,(char const *)arg4);
  jresult = (jboolean)result; 
  if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1writePersonalNotes_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jlong jarg3, jobject jarg3_) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_ByteArray *arg2 = 0 ;
  eIDMW::PTEID_Pin *arg3 = (eIDMW::PTEID_Pin *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  (void)jarg3_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&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; 
  result = (bool)(arg1)->writePersonalNotes((eIDMW::PTEID_ByteArray const &)*arg2,arg3);
  jresult = (jboolean)result; 
  return jresult;
}


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


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1readPersonalNotes(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->readPersonalNotes();
    }
    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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_Certificate *) &(arg1)->getCert(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_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_Certificate *) &(arg1)->getRoot();
    }
    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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_Certificate *) &(arg1)->getCA();
    }
    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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_Certificate *) &(arg1)->getSignature();
    }
    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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_Certificate *) &(arg1)->getAuthentication();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getRootCAPubKey(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_PublicKey *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    try {
      result = (eIDMW::PTEID_PublicKey *) &(arg1)->getRootCAPubKey();
    }
    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_PublicKey **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1isActive(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)->isActive();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1doSODCheck(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)->doSODCheck(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 jboolean JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1Activate(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jobject jarg3_) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  char *arg2 = (char *) 0 ;
  eIDMW::PTEID_ByteArray *arg3 = 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg3_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&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;
  } 
  result = (bool)(arg1)->Activate((char const *)arg2,*arg3);
  jresult = (jboolean)result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1SignXades(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2, jlong jarg3, jstring jarg4) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  char **arg2 = (char **) 0 ;
  unsigned int arg3 ;
  char *arg4 = (char *) 0 ;
  jint size2 ;
  eIDMW::PTEID_ByteArray result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    int i = 0;
    size2 = jenv->GetArrayLength(jarg2);
    arg2 = (char **) malloc((size2+1)*sizeof(char *));
    /* make a copy of each string */
    for (i = 0; i<size2; i++) {
      jstring j_string = (jstring)jenv->GetObjectArrayElement(jarg2, i);
      const char * c_string = jenv->GetStringUTFChars( j_string, 0);
      arg2[i] = (char*) malloc((strlen(c_string)+1)*sizeof(char));
      strcpy(arg2[i], c_string);
      jenv->ReleaseStringUTFChars(j_string, c_string);
      jenv->DeleteLocalRef(j_string);
    }
    arg2[i] = 0;
    
  }
  arg3 = (unsigned int)jarg3; 
  arg4 = 0;
  if (jarg4) {
    arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
    if (!arg4) return 0;
  }
  {
    try {
      result = (arg1)->SignXades((char const *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((const eIDMW::PTEID_ByteArray &)result); 
  if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1SignXadesT(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2, jlong jarg3, jstring jarg4) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  char **arg2 = (char **) 0 ;
  unsigned int arg3 ;
  char *arg4 = (char *) 0 ;
  jint size2 ;
  eIDMW::PTEID_ByteArray result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    int i = 0;
    size2 = jenv->GetArrayLength(jarg2);
    arg2 = (char **) malloc((size2+1)*sizeof(char *));
    /* make a copy of each string */
    for (i = 0; i<size2; i++) {
      jstring j_string = (jstring)jenv->GetObjectArrayElement(jarg2, i);
      const char * c_string = jenv->GetStringUTFChars( j_string, 0);
      arg2[i] = (char*) malloc((strlen(c_string)+1)*sizeof(char));
      strcpy(arg2[i], c_string);
      jenv->ReleaseStringUTFChars(j_string, c_string);
      jenv->DeleteLocalRef(j_string);
    }
    arg2[i] = 0;
    
  }
  arg3 = (unsigned int)jarg3; 
  arg4 = 0;
  if (jarg4) {
    arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
    if (!arg4) return 0;
  }
  {
    try {
      result = (arg1)->SignXadesT((char const *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((const eIDMW::PTEID_ByteArray &)result); 
  if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1SignXadesA(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2, jlong jarg3, jstring jarg4) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  char **arg2 = (char **) 0 ;
  unsigned int arg3 ;
  char *arg4 = (char *) 0 ;
  jint size2 ;
  eIDMW::PTEID_ByteArray result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    int i = 0;
    size2 = jenv->GetArrayLength(jarg2);
    arg2 = (char **) malloc((size2+1)*sizeof(char *));
    /* make a copy of each string */
    for (i = 0; i<size2; i++) {
      jstring j_string = (jstring)jenv->GetObjectArrayElement(jarg2, i);
      const char * c_string = jenv->GetStringUTFChars( j_string, 0);
      arg2[i] = (char*) malloc((strlen(c_string)+1)*sizeof(char));
      strcpy(arg2[i], c_string);
      jenv->ReleaseStringUTFChars(j_string, c_string);
      jenv->DeleteLocalRef(j_string);
    }
    arg2[i] = 0;
    
  }
  arg3 = (unsigned int)jarg3; 
  arg4 = 0;
  if (jarg4) {
    arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
    if (!arg4) return 0;
  }
  result = (arg1)->SignXadesA((char const *const *)arg2,arg3,(char const *)arg4);
  *(eIDMW::PTEID_ByteArray **)&jresult = new eIDMW::PTEID_ByteArray((const eIDMW::PTEID_ByteArray &)result); 
  if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
  return jresult;
}


SWIGEXPORT void JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1SignXadesIndividual(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2, jlong jarg3, jstring jarg4) {
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  char **arg2 = (char **) 0 ;
  unsigned int arg3 ;
  char *arg4 = (char *) 0 ;
  jint size2 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    int i = 0;
    size2 = jenv->GetArrayLength(jarg2);
    arg2 = (char **) malloc((size2+1)*sizeof(char *));
    /* make a copy of each string */
    for (i = 0; i<size2; i++) {
      jstring j_string = (jstring)jenv->GetObjectArrayElement(jarg2, i);
      const char * c_string = jenv->GetStringUTFChars( j_string, 0);
      arg2[i] = (char*) malloc((strlen(c_string)+1)*sizeof(char));
      strcpy(arg2[i], c_string);
      jenv->ReleaseStringUTFChars(j_string, c_string);
      jenv->DeleteLocalRef(j_string);
    }
    arg2[i] = 0;
    
  }
  arg3 = (unsigned int)jarg3; 
  arg4 = 0;
  if (jarg4) {
    arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
    if (!arg4) return ;
  }
  {
    try {
      (arg1)->SignXadesIndividual((char const *const *)arg2,arg3,(char const *)arg4);
    }
    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 (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
}


SWIGEXPORT void JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1SignXadesTIndividual(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2, jlong jarg3, jstring jarg4) {
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  char **arg2 = (char **) 0 ;
  unsigned int arg3 ;
  char *arg4 = (char *) 0 ;
  jint size2 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    int i = 0;
    size2 = jenv->GetArrayLength(jarg2);
    arg2 = (char **) malloc((size2+1)*sizeof(char *));
    /* make a copy of each string */
    for (i = 0; i<size2; i++) {
      jstring j_string = (jstring)jenv->GetObjectArrayElement(jarg2, i);
      const char * c_string = jenv->GetStringUTFChars( j_string, 0);
      arg2[i] = (char*) malloc((strlen(c_string)+1)*sizeof(char));
      strcpy(arg2[i], c_string);
      jenv->ReleaseStringUTFChars(j_string, c_string);
      jenv->DeleteLocalRef(j_string);
    }
    arg2[i] = 0;
    
  }
  arg3 = (unsigned int)jarg3; 
  arg4 = 0;
  if (jarg4) {
    arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
    if (!arg4) return ;
  }
  {
    try {
      (arg1)->SignXadesTIndividual((char const *const *)arg2,arg3,(char const *)arg4);
    }
    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 (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
}


SWIGEXPORT void JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1SignXadesAIndividual(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jobjectArray jarg2, jlong jarg3, jstring jarg4) {
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  char **arg2 = (char **) 0 ;
  unsigned int arg3 ;
  char *arg4 = (char *) 0 ;
  jint size2 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  {
    int i = 0;
    size2 = jenv->GetArrayLength(jarg2);
    arg2 = (char **) malloc((size2+1)*sizeof(char *));
    /* make a copy of each string */
    for (i = 0; i<size2; i++) {
      jstring j_string = (jstring)jenv->GetObjectArrayElement(jarg2, i);
      const char * c_string = jenv->GetStringUTFChars( j_string, 0);
      arg2[i] = (char*) malloc((strlen(c_string)+1)*sizeof(char));
      strcpy(arg2[i], c_string);
      jenv->ReleaseStringUTFChars(j_string, c_string);
      jenv->DeleteLocalRef(j_string);
    }
    arg2[i] = 0;
    
  }
  arg3 = (unsigned int)jarg3; 
  arg4 = 0;
  if (jarg4) {
    arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
    if (!arg4) return ;
  }
  (arg1)->SignXadesAIndividual((char const *const *)arg2,arg3,(char const *)arg4);
  if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
}


SWIGEXPORT jint JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1SignPDF_1_1SWIG_10(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jint jarg3, jint jarg4, jstring jarg5, jstring jarg6, jstring jarg7) {
  jint jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_PDFSignature *arg2 = 0 ;
  int arg3 ;
  int arg4 ;
  char *arg5 = (char *) 0 ;
  char *arg6 = (char *) 0 ;
  char *arg7 = (char *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  arg2 = *(eIDMW::PTEID_PDFSignature **)&jarg2;
  if (!arg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_PDFSignature & reference is null");
    return 0;
  } 
  arg3 = (int)jarg3; 
  arg4 = (int)jarg4; 
  arg5 = 0;
  if (jarg5) {
    arg5 = (char *)jenv->GetStringUTFChars(jarg5, 0);
    if (!arg5) return 0;
  }
  arg6 = 0;
  if (jarg6) {
    arg6 = (char *)jenv->GetStringUTFChars(jarg6, 0);
    if (!arg6) return 0;
  }
  arg7 = 0;
  if (jarg7) {
    arg7 = (char *)jenv->GetStringUTFChars(jarg7, 0);
    if (!arg7) return 0;
  }
  {
    try {
      result = (int)(arg1)->SignPDF(*arg2,arg3,arg4,(char const *)arg5,(char const *)arg6,(char const *)arg7);
    }
    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 (arg5) jenv->ReleaseStringUTFChars(jarg5, (const char *)arg5);
  if (arg6) jenv->ReleaseStringUTFChars(jarg6, (const char *)arg6);
  if (arg7) jenv->ReleaseStringUTFChars(jarg7, (const char *)arg7);
  return jresult;
}


SWIGEXPORT jint JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1SignPDF_1_1SWIG_11(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jlong jarg2, jobject jarg2_, jint jarg3, jdouble jarg4, jdouble jarg5, jstring jarg6, jstring jarg7, jstring jarg8) {
  jint jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  eIDMW::PTEID_PDFSignature *arg2 = 0 ;
  int arg3 ;
  double arg4 ;
  double arg5 ;
  char *arg6 = (char *) 0 ;
  char *arg7 = (char *) 0 ;
  char *arg8 = (char *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  (void)jarg2_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  arg2 = *(eIDMW::PTEID_PDFSignature **)&jarg2;
  if (!arg2) {
    SWIG_JavaThrowException(jenv, SWIG_JavaNullPointerException, "eIDMW::PTEID_PDFSignature & reference is null");
    return 0;
  } 
  arg3 = (int)jarg3; 
  arg4 = (double)jarg4; 
  arg5 = (double)jarg5; 
  arg6 = 0;
  if (jarg6) {
    arg6 = (char *)jenv->GetStringUTFChars(jarg6, 0);
    if (!arg6) return 0;
  }
  arg7 = 0;
  if (jarg7) {
    arg7 = (char *)jenv->GetStringUTFChars(jarg7, 0);
    if (!arg7) return 0;
  }
  arg8 = 0;
  if (jarg8) {
    arg8 = (char *)jenv->GetStringUTFChars(jarg8, 0);
    if (!arg8) return 0;
  }
  {
    try {
      result = (int)(arg1)->SignPDF(*arg2,arg3,arg4,arg5,(char const *)arg6,(char const *)arg7,(char const *)arg8);
    }
    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 (arg6) jenv->ReleaseStringUTFChars(jarg6, (const char *)arg6);
  if (arg7) jenv->ReleaseStringUTFChars(jarg7, (const char *)arg7);
  if (arg8) jenv->ReleaseStringUTFChars(jarg8, (const char *)arg8);
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1ChangeCapPin(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  char *arg2 = (char *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&jarg1; 
  arg2 = 0;
  if (jarg2) {
    arg2 = (char *)jenv->GetStringUTFChars(jarg2, 0);
    if (!arg2) return 0;
  }
  {
    try {
      result = (bool)(arg1)->ChangeCapPin((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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1ChangeAddress(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jlong jarg4, jlong jarg5) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  eIDMW::PTEID_EIDCard::t_address_change_callback arg4 = (eIDMW::PTEID_EIDCard::t_address_change_callback) 0 ;
  void *arg5 = (void *) 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&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 = *(eIDMW::PTEID_EIDCard::t_address_change_callback *)&jarg4; 
  arg5 = *(void **)&jarg5; 
  result = (bool)(arg1)->ChangeAddress(arg2,arg3,arg4,arg5);
  jresult = (jboolean)result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  if (arg3) jenv->ReleaseStringUTFChars(jarg3, (const char *)arg3);
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1ChangeCapPinCompLayer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jlong jarg4) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_EIDCard *arg1 = (eIDMW::PTEID_EIDCard *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  unsigned long *arg4 = 0 ;
  bool result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EIDCard **)&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)->ChangeCapPinCompLayer((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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_ByteArray *) &(arg1)->getRawData(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 = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_ByteArray *) &(arg1)->getRawData_Id();
    }
    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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_ByteArray *) &(arg1)->getRawData_IdSig();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getRawData_1Trace(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 {
      result = (eIDMW::PTEID_ByteArray *) &(arg1)->getRawData_Trace();
    }
    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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_ByteArray *) &(arg1)->getRawData_Addr();
    }
    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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_ByteArray *) &(arg1)->getRawData_AddrSig();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getRawData_1Sod(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; 
  result = (eIDMW::PTEID_ByteArray *) &(arg1)->getRawData_Sod();
  *(eIDMW::PTEID_ByteArray **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_ByteArray *) &(arg1)->getRawData_CardInfo();
    }
    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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_ByteArray *) &(arg1)->getRawData_TokenInfo();
    }
    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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_ByteArray *) &(arg1)->getRawData_Challenge();
    }
    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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_ByteArray *) &(arg1)->getRawData_Response();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1getRawData_1PersoData(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 {
      result = (eIDMW::PTEID_ByteArray *) &(arg1)->getRawData_PersoData();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_new_1PTEID_1SigVerifier(JNIEnv *jenv, jclass jcls, jstring jarg1) {
  jlong jresult = 0 ;
  char *arg1 = (char *) 0 ;
  eIDMW::PTEID_SigVerifier *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = 0;
  if (jarg1) {
    arg1 = (char *)jenv->GetStringUTFChars(jarg1, 0);
    if (!arg1) return 0;
  }
  result = (eIDMW::PTEID_SigVerifier *)new eIDMW::PTEID_SigVerifier((char const *)arg1);
  *(eIDMW::PTEID_SigVerifier **)&jresult = result; 
  if (arg1) jenv->ReleaseStringUTFChars(jarg1, (const char *)arg1);
  return jresult;
}


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


SWIGEXPORT jint JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1SigVerifier_1Verify(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jint jresult = 0 ;
  eIDMW::PTEID_SigVerifier *arg1 = (eIDMW::PTEID_SigVerifier *) 0 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SigVerifier **)&jarg1; 
  result = (int)(arg1)->Verify();
  jresult = (jint)result; 
  return jresult;
}


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


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


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1SigVerifier_1GetUnixTimestamp(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_SigVerifier *arg1 = (eIDMW::PTEID_SigVerifier *) 0 ;
  long long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_SigVerifier **)&jarg1; 
  result = (long long)(arg1)->GetUnixTimestamp();
  jresult = (jlong)result; 
  return jresult;
}


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


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_new_1PTEID_1XmlUserRequestedInfo_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_XmlUserRequestedInfo *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_XmlUserRequestedInfo *)new eIDMW::PTEID_XmlUserRequestedInfo((char const *)arg1,(char const *)arg2,(char const *)arg3);
  *(eIDMW::PTEID_XmlUserRequestedInfo **)&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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_new_1PTEID_1XmlUserRequestedInfo_1_1SWIG_12(JNIEnv *jenv, jclass jcls, jstring jarg1, jstring jarg2, jstring jarg3, jstring jarg4) {
  jlong jresult = 0 ;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  eIDMW::PTEID_XmlUserRequestedInfo *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;
  }
  arg4 = 0;
  if (jarg4) {
    arg4 = (char *)jenv->GetStringUTFChars(jarg4, 0);
    if (!arg4) return 0;
  }
  result = (eIDMW::PTEID_XmlUserRequestedInfo *)new eIDMW::PTEID_XmlUserRequestedInfo((char const *)arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
  *(eIDMW::PTEID_XmlUserRequestedInfo **)&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);
  if (arg4) jenv->ReleaseStringUTFChars(jarg4, (const char *)arg4);
  return jresult;
}


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


SWIGEXPORT void JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1XmlUserRequestedInfo_1add(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  eIDMW::PTEID_XmlUserRequestedInfo *arg1 = (eIDMW::PTEID_XmlUserRequestedInfo *) 0 ;
  eIDMW::XMLUserData arg2 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_XmlUserRequestedInfo **)&jarg1; 
  arg2 = (eIDMW::XMLUserData)jarg2; 
  (arg1)->add(arg2);
}


SWIGEXPORT void JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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((const eIDMW::PTEID_ByteArray &)result); 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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((const eIDMW::PTEID_ByteArray &)result); 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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((const eIDMW::PTEID_ByteArray &)result); 
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1CardVersionInfo_1getTokenLabel(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; 
  result = (char *)(arg1)->getTokenLabel();
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_ByteArray *) &(arg1)->getSignature();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_delete_1PTEID_1Sod(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_Sod *arg1 = (eIDMW::PTEID_Sod *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_Sod **)&jarg1; 
  delete arg1;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Sod_1getData(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Sod *arg1 = (eIDMW::PTEID_Sod *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Sod **)&jarg1; 
  {
    try {
      result = (eIDMW::PTEID_ByteArray *) &(arg1)->getData();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Sod_1getHash(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Sod *arg1 = (eIDMW::PTEID_Sod *) 0 ;
  eIDMW::PTEID_ByteArray *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Sod **)&jarg1; 
  {
    try {
      result = (eIDMW::PTEID_ByteArray *) &(arg1)->getHash();
    }
    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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1getGivenName(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)->getGivenName();
    }
    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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1getDocumentPAN(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)->getDocumentPAN();
    }
    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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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 jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1getHeight(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)->getHeight();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1getDocumentNumber(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)->getDocumentNumber();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1getCivilianIdNumber(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)->getCivilianIdNumber();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1getTaxNo(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)->getTaxNo();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1getSocialSecurityNumber(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)->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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1getHealthNumber(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)->getHealthNumber();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1getIssuingEntity(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)->getIssuingEntity();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1getLocalofRequest(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)->getLocalofRequest();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1getGivenNameFather(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)->getGivenNameFather();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1getSurnameFather(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)->getSurnameFather();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1getGivenNameMother(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)->getGivenNameMother();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1getSurnameMother(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)->getSurnameMother();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1getParents(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)->getParents();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1getPhotoObj(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  eIDMW::PTEID_Photo *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (eIDMW::PTEID_Photo *) &(arg1)->getPhotoObj();
    }
    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_Photo **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1getCardAuthKeyObj(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jlong jresult = 0 ;
  eIDMW::PTEID_EId *arg1 = (eIDMW::PTEID_EId *) 0 ;
  eIDMW::PTEID_PublicKey *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_EId **)&jarg1; 
  {
    try {
      result = (eIDMW::PTEID_PublicKey *) &(arg1)->getCardAuthKeyObj();
    }
    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_PublicKey **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1getValidation(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)->getValidation();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1getMRZ1(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)->getMRZ1();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1getMRZ2(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)->getMRZ2();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1getMRZ3(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)->getMRZ3();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1getAccidentalIndications(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)->getAccidentalIndications();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_delete_1PTEID_1Address(JNIEnv *jenv, jclass jcls, jlong jarg1) {
  eIDMW::PTEID_Address *arg1 = (eIDMW::PTEID_Address *) 0 ;
  
  (void)jenv;
  (void)jcls;
  arg1 = *(eIDMW::PTEID_Address **)&jarg1; 
  delete arg1;
}


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


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


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Address_1getDistrict(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Address *arg1 = (eIDMW::PTEID_Address *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Address **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getDistrict();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Address_1getDistrictCode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Address *arg1 = (eIDMW::PTEID_Address *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Address **)&jarg1; 
  result = (char *)(arg1)->getDistrictCode();
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Address_1getMunicipality(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Address *arg1 = (eIDMW::PTEID_Address *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Address **)&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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Address_1getMunicipalityCode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Address *arg1 = (eIDMW::PTEID_Address *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Address **)&jarg1; 
  result = (char *)(arg1)->getMunicipalityCode();
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Address_1getCivilParish(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Address *arg1 = (eIDMW::PTEID_Address *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Address **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getCivilParish();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Address_1getCivilParishCode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Address *arg1 = (eIDMW::PTEID_Address *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Address **)&jarg1; 
  result = (char *)(arg1)->getCivilParishCode();
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Address_1getAbbrStreetType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Address *arg1 = (eIDMW::PTEID_Address *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Address **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getAbbrStreetType();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Address_1getStreetType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Address *arg1 = (eIDMW::PTEID_Address *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Address **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getStreetType();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Address_1getStreetName(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Address *arg1 = (eIDMW::PTEID_Address *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Address **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getStreetName();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Address_1getAbbrBuildingType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Address *arg1 = (eIDMW::PTEID_Address *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Address **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getAbbrBuildingType();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Address_1getBuildingType(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Address *arg1 = (eIDMW::PTEID_Address *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Address **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getBuildingType();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Address_1getDoorNo(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Address *arg1 = (eIDMW::PTEID_Address *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Address **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getDoorNo();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Address_1getFloor(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Address *arg1 = (eIDMW::PTEID_Address *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Address **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getFloor();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Address_1getSide(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Address *arg1 = (eIDMW::PTEID_Address *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Address **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getSide();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Address_1getLocality(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Address *arg1 = (eIDMW::PTEID_Address *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Address **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getLocality();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Address_1getPlace(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Address *arg1 = (eIDMW::PTEID_Address *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Address **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getPlace();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Address_1getZip4(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Address *arg1 = (eIDMW::PTEID_Address *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Address **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getZip4();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Address_1getZip3(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Address *arg1 = (eIDMW::PTEID_Address *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Address **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getZip3();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Address_1getPostalLocality(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Address *arg1 = (eIDMW::PTEID_Address *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Address **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getPostalLocality();
    }
    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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Address_1getGeneratedAddressCode(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Address *arg1 = (eIDMW::PTEID_Address *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Address **)&jarg1; 
  result = (char *)(arg1)->getGeneratedAddressCode();
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


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


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


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


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


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


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


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


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1CCXML_1Doc_1getCCXML(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_) {
  jstring jresult = 0 ;
  eIDMW::PTEID_CCXML_Doc *arg1 = (eIDMW::PTEID_CCXML_Doc *) 0 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_CCXML_Doc **)&jarg1; 
  {
    try {
      result = (char *)(arg1)->getCCXML();
    }
    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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_Pin *) &(arg1)->getPinByNumber(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_Pin **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Pins_1getPinByPinRef(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 {
      result = (eIDMW::PTEID_Pin *) &(arg1)->getPinByPinRef(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_Pin **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Pin_1AUTH_1PIN_1get(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  result = (unsigned long)eIDMW::PTEID_Pin::AUTH_PIN;
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Pin_1SIGN_1PIN_1get(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  result = (unsigned long)eIDMW::PTEID_Pin::SIGN_PIN;
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Pin_1ADDR_1PIN_1get(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  result = (unsigned long)eIDMW::PTEID_Pin::ADDR_PIN;
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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 jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Pin_1getPinRef(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)->getPinRef();
    }
    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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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 jboolean JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Pin_1unlockPin(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)->unlockPin((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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_ByteArray *) &(arg1)->getSignature();
    }
    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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Pin_1verifyPin(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jlong jarg3, jboolean jarg4) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_Pin *arg1 = (eIDMW::PTEID_Pin *) 0 ;
  char *arg2 = (char *) 0 ;
  unsigned long *arg3 = 0 ;
  bool arg4 ;
  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;
  } 
  arg4 = jarg4 ? true : false; 
  {
    try {
      result = (bool)(arg1)->verifyPin((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 = (jboolean)result; 
  if (arg2) jenv->ReleaseStringUTFChars(jarg2, (const char *)arg2);
  return jresult;
}


SWIGEXPORT jboolean JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Pin_1changePin(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jstring jarg2, jstring jarg3, jlong jarg4, jstring jarg5, jboolean jarg6) {
  jboolean jresult = 0 ;
  eIDMW::PTEID_Pin *arg1 = (eIDMW::PTEID_Pin *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  unsigned long *arg4 = 0 ;
  char *arg5 = (char *) 0 ;
  bool arg6 ;
  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;
  } 
  arg5 = 0;
  if (jarg5) {
    arg5 = (char *)jenv->GetStringUTFChars(jarg5, 0);
    if (!arg5) return 0;
  }
  arg6 = jarg6 ? true : false; 
  {
    try {
      result = (bool)(arg1)->changePin((char const *)arg2,(char const *)arg3,*arg4,(char const *)arg5,arg6);
    }
    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);
  if (arg5) jenv->ReleaseStringUTFChars(jarg5, (const char *)arg5);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_Certificate *) &(arg1)->getCertFromCard(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_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_Certificate *) &(arg1)->getCert(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_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Certificates_1getExternalCertData(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Certificates *arg1 = (eIDMW::PTEID_Certificates *) 0 ;
  int arg2 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificates **)&jarg1; 
  arg2 = (int)jarg2; 
  result = (char *)(arg1)->getExternalCertData(arg2);
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jint JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Certificates_1getExternalCertDataSize(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  jint jresult = 0 ;
  eIDMW::PTEID_Certificates *arg1 = (eIDMW::PTEID_Certificates *) 0 ;
  int arg2 ;
  int result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificates **)&jarg1; 
  arg2 = (int)jarg2; 
  result = (int)(arg1)->getExternalCertDataSize(arg2);
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Certificates_1getExternalCertSubject(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Certificates *arg1 = (eIDMW::PTEID_Certificates *) 0 ;
  int arg2 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificates **)&jarg1; 
  arg2 = (int)jarg2; 
  result = (char *)(arg1)->getExternalCertSubject(arg2);
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Certificates_1getExternalCertIssuer(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Certificates *arg1 = (eIDMW::PTEID_Certificates *) 0 ;
  int arg2 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificates **)&jarg1; 
  arg2 = (int)jarg2; 
  result = (char *)(arg1)->getExternalCertIssuer(arg2);
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Certificates_1getExternalCertNotBefore(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Certificates *arg1 = (eIDMW::PTEID_Certificates *) 0 ;
  int arg2 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificates **)&jarg1; 
  arg2 = (int)jarg2; 
  result = (char *)(arg1)->getExternalCertNotBefore(arg2);
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jstring JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Certificates_1getExternalCertNotAfter(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  jstring jresult = 0 ;
  eIDMW::PTEID_Certificates *arg1 = (eIDMW::PTEID_Certificates *) 0 ;
  int arg2 ;
  char *result = 0 ;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificates **)&jarg1; 
  arg2 = (int)jarg2; 
  result = (char *)(arg1)->getExternalCertNotAfter(arg2);
  if (result) jresult = jenv->NewStringUTF((const char *)result);
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Certificates_1getExternalCertKeylenght(JNIEnv *jenv, jclass jcls, jlong jarg1, jobject jarg1_, jint jarg2) {
  jlong jresult = 0 ;
  eIDMW::PTEID_Certificates *arg1 = (eIDMW::PTEID_Certificates *) 0 ;
  int arg2 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  (void)jarg1_;
  arg1 = *(eIDMW::PTEID_Certificates **)&jarg1; 
  arg2 = (int)jarg2; 
  result = (unsigned long)(arg1)->getExternalCertKeylenght(arg2);
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_Certificate *) &(arg1)->getCert(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_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_Certificate *) &(arg1)->getRoot();
    }
    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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_Certificate *) &(arg1)->getCA();
    }
    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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_Certificate *) &(arg1)->getSignature();
    }
    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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_Certificate *) &(arg1)->getAuthentication();
    }
    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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_Certificate *) &(arg1)->addCertificate(*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_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1CITIZEN_1AUTH_1get(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  result = (unsigned long)eIDMW::PTEID_Certificate::CITIZEN_AUTH;
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1CITIZEN_1SIGN_1get(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  result = (unsigned long)eIDMW::PTEID_Certificate::CITIZEN_SIGN;
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1SUB_1CA_1SIGN_1get(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  result = (unsigned long)eIDMW::PTEID_Certificate::SUB_CA_SIGN;
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1SUB_1CA_1AUTH_1get(JNIEnv *jenv, jclass jcls) {
  jlong jresult = 0 ;
  unsigned long result;
  
  (void)jenv;
  (void)jcls;
  result = (unsigned long)eIDMW::PTEID_Certificate::SUB_CA_AUTH;
  jresult = (jlong)result; 
  return jresult;
}


SWIGEXPORT void JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1getStatus(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; 
  result = (eIDMW::PTEID_CertifStatus)(arg1)->getStatus();
  jresult = (jint)result; 
  return jresult;
}


SWIGEXPORT jint JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_ByteArray *) &(arg1)->getCertData();
    }
    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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_Certificate *) &(arg1)->getIssuer();
    }
    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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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 {
      result = (eIDMW::PTEID_Certificate *) &(arg1)->getChildren(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_Certificate **)&jresult = result; 
  return jresult;
}


SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ExReleaseNeeded_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ExUnknown_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ExDocTypeUnknown_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ExFileTypeUnknown_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ExParamRange_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ExCmdNotAllowed_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ExCmdNotSupported_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ExNoCardPresent_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ExCardBadType_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ExCardTypeUnknown_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ExCertNoIssuer_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ExCertNoRoot_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ExBadUsage_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ExBadTransaction_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ExCardChanged_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ExReaderSetChanged_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ExNoReader_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ExNotAllowByUser_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ExUserMustAnswer_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ExSOD_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Exception **)&baseptr = *(eIDMW::PTEID_ExSOD **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ByteArray_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Photo_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Object **)&baseptr = *(eIDMW::PTEID_Photo **)&jarg1;
    return baseptr;
}

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

SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ReaderSet_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1ReaderContext_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Card_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1MemoryCard_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1SmartCard_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EIDCard_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1XmlUserRequestedInfo_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Object **)&baseptr = *(eIDMW::PTEID_XmlUserRequestedInfo **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1XMLDoc_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Biometric_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Crypto_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1CardVersionInfo_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Sod_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_Biometric **)&baseptr = *(eIDMW::PTEID_Sod **)&jarg1;
    return baseptr;
}

SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1EId_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Address_1SWIGUpcast(JNIEnv *jenv, jclass jcls, jlong jarg1) {
    jlong baseptr = 0;
    (void)jenv;
    (void)jcls;
    *(eIDMW::PTEID_XMLDoc **)&baseptr = *(eIDMW::PTEID_Address **)&jarg1;
    return baseptr;
}

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

SWIGEXPORT jlong JNICALL Java_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Pins_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Pin_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Certificates_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Certificate_1SWIGUpcast(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_pt_gov_cartaodecidadao_pteidlibJava_1WrapperJNI_PTEID_1Config_1SWIGUpcast(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

