Portuguese eID Middleware SDK  Version: 3.12.0
eIDMW::PTEID_Pin Class Reference

#include <eidlib.h>

Public Member Functions

virtual PTEIDSDK_API ~PTEID_Pin ()
 
PTEIDSDK_API unsigned long getIndex ()
 
PTEIDSDK_API unsigned long getType ()
 
PTEIDSDK_API unsigned long getId ()
 
PTEIDSDK_API unsigned long getPinRef ()
 
PTEIDSDK_API PTEID_PinUsage getUsageCode ()
 
PTEIDSDK_API unsigned long getFlags ()
 
PTEIDSDK_API const char * getLabel ()
 
PTEIDSDK_API const char * getLabelById (unsigned long id)
 
PTEIDSDK_API long getTriesLeft ()
 
PTEIDSDK_API bool isVerified ()
 
PTEIDSDK_API bool verifyPin ()
 
PTEIDSDK_API bool verifyPin (const char *csPin, unsigned long &ulRemaining, bool bShowDlg=true, void *wndGeometry=0)
 
PTEIDSDK_API bool changePin ()
 
PTEIDSDK_API bool changePin (const char *csPin1, const char *csPin2, unsigned long &ulRemaining, const char *PinName, bool bShowDlg=true, void *wndGeometry=0)
 
- Public Member Functions inherited from eIDMW::PTEID_Object
virtual PTEIDSDK_API ~PTEID_Object ()=0
 
NOEXPORT_PTEIDSDK void Init (const SDK_Context *context, void *impl)
 
NOEXPORT_PTEIDSDK void Release ()
 

Static Public Attributes

static const unsigned long AUTH_PIN = 129
 
static const unsigned long SIGN_PIN = 130
 
static const unsigned long ADDR_PIN = 131
 

Friends

PTEID_PinPTEID_Pins::getPinByNumber (unsigned long ulIndex)
 
PTEID_PinPTEID_Pins::getPinByPinRef (unsigned long pinRef)
 

Additional Inherited Members

- Protected Member Functions inherited from eIDMW::PTEID_Object
 PTEID_Object (const SDK_Context *context, void *impl)
 
void addObject (PTEID_Object *impl)
 
void backupObject (unsigned long idx)
 
PTEID_ObjectgetObject (unsigned long idx)
 
PTEID_ObjectgetObject (void *impl)
 
void delObject (unsigned long idx)
 
void delObject (void *impl)
 
void checkContextStillOk () const
 
 PTEID_Object (const PTEID_Object &obj)
 
PTEID_Objectoperator= (const PTEID_Object &obj)
 
- Protected Attributes inherited from eIDMW::PTEID_Object
bool m_delimpl
 
void * m_impl
 
unsigned long m_ulIndexExtAdd
 
std::map< unsigned long, PTEID_Object * > m_objects
 
SDK_Context * m_context
 

Detailed Description

Class that represent one Pin.

Constructor & Destructor Documentation

◆ ~PTEID_Pin()

virtual PTEIDSDK_API eIDMW::PTEID_Pin::~PTEID_Pin ( )
virtual

Destructor

Member Function Documentation

◆ changePin() [1/2]

PTEIDSDK_API bool eIDMW::PTEID_Pin::changePin ( )

Ask the card to change the pin. A popup will ask for the codes

Returns
true if success and false if failed

◆ changePin() [2/2]

PTEIDSDK_API bool eIDMW::PTEID_Pin::changePin ( const char *  csPin1,
const char *  csPin2,
unsigned long &  ulRemaining,
const char *  PinName,
bool  bShowDlg = true,
void *  wndGeometry = 0 
)

Ask the card to change the pin.

if csPin1 or csPin2 are empty, a popup will ask for the codes.

Parameters
csPin1is the old pin code
csPin2is the new pin code
ulRemainingreturn the remaining tries (only when operation failed)
Returns
true if success and false if failed

◆ getFlags()

PTEIDSDK_API unsigned long eIDMW::PTEID_Pin::getFlags ( )

Get the flags of the pin

◆ getId()

PTEIDSDK_API unsigned long eIDMW::PTEID_Pin::getId ( )

Get the id of the pin

◆ getIndex()

PTEIDSDK_API unsigned long eIDMW::PTEID_Pin::getIndex ( )

Get the index of the pin

◆ getLabel()

PTEIDSDK_API const char* eIDMW::PTEID_Pin::getLabel ( )

Get the label of the pin

◆ getLabelById()

PTEIDSDK_API const char* eIDMW::PTEID_Pin::getLabelById ( unsigned long  id)

Get the label of the pin by Id

◆ getPinRef()

PTEIDSDK_API unsigned long eIDMW::PTEID_Pin::getPinRef ( )

Get the pinref value of the pin

◆ getTriesLeft()

PTEIDSDK_API long eIDMW::PTEID_Pin::getTriesLeft ( )

Return the remaining tries for entering the correct pin.

Returns
the number of remaining tries in the other case

◆ getType()

PTEIDSDK_API unsigned long eIDMW::PTEID_Pin::getType ( )

Get the type of the pin

◆ getUsageCode()

PTEIDSDK_API PTEID_PinUsage eIDMW::PTEID_Pin::getUsageCode ( )

Get the usage code of the pin

◆ isVerified()

PTEIDSDK_API bool eIDMW::PTEID_Pin::isVerified ( )

Check the current verification status of the PIN

Returns
true if the PIN has already been successfully presented during the current card session or false otherwise

◆ verifyPin() [1/2]

PTEIDSDK_API bool eIDMW::PTEID_Pin::verifyPin ( )

Ask the card to verify the pin. A popup will ask for the code.

Returns
true if success and false if failed

◆ verifyPin() [2/2]

PTEIDSDK_API bool eIDMW::PTEID_Pin::verifyPin ( const char *  csPin,
unsigned long &  ulRemaining,
bool  bShowDlg = true,
void *  wndGeometry = 0 
)

Ask the card to verify the pin.

Parameters
csPinis the pin code to verify (if csPin is empty, a popup will ask for the code)
ulRemainingreturn the remaining tries (only if verifying failed)
bShowDlgflag used to either show or not a dialog where the user inserts the pin (default=true)
wndGeometry(default=0)
Returns
true if success and false if failed

Friends And Related Function Documentation

◆ PTEID_Pins::getPinByNumber

PTEID_Pin& PTEID_Pins::getPinByNumber ( unsigned long  ulIndex)
friend

For internal use : This method must access protected constructor

◆ PTEID_Pins::getPinByPinRef

PTEID_Pin& PTEID_Pins::getPinByPinRef ( unsigned long  pinRef)
friend

For internal use : This method must access protected constructor

Member Data Documentation

◆ ADDR_PIN

const unsigned long eIDMW::PTEID_Pin::ADDR_PIN = 131
static

PIN reference value for the address PIN. It can be used as parameter for PTEID_Pins::getPinByPinRef()

◆ AUTH_PIN

const unsigned long eIDMW::PTEID_Pin::AUTH_PIN = 129
static

PIN reference value for the authentication PIN. It can be used as parameter for PTEID_Pins::getPinByPinRef()

◆ SIGN_PIN

const unsigned long eIDMW::PTEID_Pin::SIGN_PIN = 130
static

PIN reference value for the signature PIN. It can be used as parameter for PTEID_Pins::getPinByPinRef()