AppCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
EM::TicketIssueLogic::ECardBusinessLogic Class Reference

#include <ECardBusinessLogic.h>

Public Member Functions

 ~ECardBusinessLogic ()
 
 DEPRECATED (static bool GetValidCustomerProfileIndex(unsigned char &profileIndex, const unsigned short cardType, EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff))
 
 DEPRECATED (static bool GetCustomerProfileName(EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, std::string &customerProfile))
 
 ~ECardBusinessLogic ()
 
 DEPRECATED (static bool GetValidCustomerProfileIndex(unsigned char &profileIndex, const unsigned short cardType, EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff))
 
 DEPRECATED (static bool GetCustomerProfileName(EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, std::string &customerProfile))
 

Static Public Member Functions

static
EIssueLogicDefines::ReturnValues 
GetDepartmentNumberFromCard (unsigned long &departmentNumber)
 Function gets department number from card (or from purse) More...
 
static bool IsCustomerProfileValidByTariff (unsigned char profileIndex, const unsigned short cardType, EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff)
 Checks if customer profile on specified index can use specified tariff. More...
 
static
EIssueLogicDefines::ReturnValues 
CheckCardNetworkWithTariffNetwork (EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *ticketTariff, bool &machingNetwork)
 check if the network on card is the same for selling tariff More...
 
static bool GetDiscountTypeByCardType (unsigned short cardType, EM::CardFacade::ECardFacadeDefines::CardTypeStandard standard, bool timeTicket, unsigned char &discountType)
 
static bool GetDiscountTypeByCardType (unsigned char cardTypeID, bool timeTicket, unsigned char &discountType)
 
static bool GetCustomerProfileName (unsigned char customerProfileIndex, std::string &customerProfile)
 Get name of card type (text representation of card type) More...
 
static bool GetNameAndSurname (std::string &name, std::string &surname, std::string &codecName, bool &showingEnabled)
 
static bool GetBornNumber (unsigned short &year, unsigned short &month, unsigned short &day, bool &showingEnabled)
 
static
EIssueLogicDefines::ReturnValues 
GetCardTypeID (unsigned char &cardTypeID, unsigned char validCustomerProfileIndex)
 Get card type ID by card type and card standard from card facade. More...
 
static
EIssueLogicDefines::ReturnValues 
GetCardType (unsigned short &cardType, const unsigned char validCustomerProfileIndex)
 GetCardType - method returns card type (NOT card type ID) at desired customer profile index. More...
 
static bool GetWalletBalanceText (std::string &walletBalance)
 Get balance of electronic wallet on card in form of "amount currency". More...
 
static bool IsHomeCompanyCard (bool &isHomeCompanyCard)
 IsHomeCompanyCard. More...
 
static
EIssueLogicDefines::ReturnValues 
IsAllowedCompanyCard (bool &isAllowedCompanyCard)
 IsAllowedCompanyCard. More...
 
static
EIssueLogicDefines::ReturnValues 
IsSupportedLineTripProtectNumberOnCard (bool &isSupportedFlagsOnCard)
 IsSupportedLineTripProtectNumberOnCard - Function checks feature on card. More...
 
static
EIssueLogicDefines::ReturnValues 
GetCardNetworkID (unsigned long &cardNetworkID)
 GetCardNetworkID - gains network ID from country code and netwrok on card. More...
 
static
EIssueLogicDefines::ReturnValues 
IsSupportedProfileValidityStartOnCard (bool &isSupportedProfileValidityStart)
 IsSupportedProfileValidityStartOnCard. More...
 
static
EIssueLogicDefines::ReturnValues 
GetCustomerProfileValidity (unsigned long &customerProfileValidityStart, unsigned long &customerProfileValidityEnd, const unsigned char customerProfileIndex)
 Wrapper for customer profile validity on card. More...
 
static bool IsCityCard ()
 Checks city code flag on card( SCS strcuture EAppIssuer::Get/Set IssuerType, ECardDataFacadeCommon::GetAppIssuerType ). Currently is supported only code 0x40. More...
 
static
EIssueLogicDefines::ReturnValues 
GetTariffFromCard (CardFacade::ECardFacadeDefines::CardFacadeType facadeType, unsigned char ticketIndex, bool timeTicket, unsigned long itsNumber, Strojcek::VstupneUdaje::TarifnySystem::ETarifa *&tariff)
 GetTariffFromCard - Get tariff from card by ticketIndex. More...
 
static
EIssueLogicDefines::ReturnValues 
GetOneWayTicketPriceListRowFromCard (unsigned char ticketIndex, unsigned long itsNumber, Strojcek::VstupneUdaje::TarifnySystem::ETarifnePasmo *&priceListRow)
 GetOneWayTicketPriceListRowFromCard - Get priceListRow from card with OneWayTicket. More...
 
static
EIssueLogicDefines::ReturnValues 
IsAllowedCardTypeForCardActivation (bool &isAllowedCardTypeForCardActivation)
 IsAllowedCardTypeForCardActivation. More...
 
static
EIssueLogicDefines::ReturnValues 
IsAnyCustomerProfileValid (unsigned char &firstValidCustomerProfile, unsigned long timeToCompareProfileValidityTo=0)
 IsAnyCustomerProfileValid - loops all customer profiles on card and checks their time validity. More...
 
static
EIssueLogicDefines::ReturnValues 
IsCustomerProfileValidByDate (unsigned char customerProfileIndex, unsigned long timeToCompareProfileValidityTo=0)
 IsCustomerProfileValidByDate - checks time validity of a customer profile on given index. More...
 
static
EIssueLogicDefines::ReturnValues 
EvaluateCardTypeForInvalidCustomerProfile (unsigned short &cardType)
 EvaluateCardTypeForInvalidCustomerProfile - evaluates tariff system settings for invalid customer profiles. More...
 
static
EIssueLogicDefines::ReturnValues 
IsAnyValidFareProviderForCurrentCompanyNumber ()
 IsAnyValidFareProviderForCurrentCompanyNumber - checks if there are valid commonData and if all virtual card slots are used. More...
 
static
EIssueLogicDefines::ReturnValues 
GetNIDFromTimeTicket (const unsigned char timeTicketIndex, unsigned long &timeTicketNID)
 GetNIDFromTimeTicket - check if time ticket supports network id (NID), then calculate NID from country code and network code. More...
 
static
EIssueLogicDefines::ReturnValues 
GetNIDFromOneWayTicket (const unsigned char oneWayTicketIndex, unsigned long &oneWayTicketNID)
 GetNIDFromOneWayTicket - calculates network ID from country code and network code. More...
 
static
EIssueLogicDefines::ReturnValues 
GetUTNFromTimeTicket (const unsigned char timeTicketIndex, long &urbanTransportNumber)
 GetUTNFromTimeTicket - check if time ticket supports urban transport number (UTN), return UTN if yes. More...
 
static
EIssueLogicDefines::ReturnValues 
CheckCardWalletISOPayUnitCodeValidity (bool &walletPayUnitValidity)
 CheckCardWalletISOPayUnitCodeValidity - check if card has wallet with valid ISO pay unit code. More...
 
static
EIssueLogicDefines::ReturnValues 
GetCappingInformation (unsigned short ids, Strojcek::VstupneUdaje::CappingInformationData &cappingInformationData)
 GetCappingInformation - gains capping information data from tariff system and from card data structures. More...
 
static
EIssueLogicDefines::ReturnValues 
GetDepartmentNumberFromCard (unsigned long &departmentNumber)
 Function gets department number from card (or from purse) More...
 
static bool IsCustomerProfileValidByTariff (unsigned char profileIndex, const unsigned short cardType, EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff)
 Checks if customer profile on specified index can use specified tariff. More...
 
static
EIssueLogicDefines::ReturnValues 
CheckCardNetworkWithTariffNetwork (EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *ticketTariff, bool &machingNetwork)
 check if the network on card is the same for selling tariff More...
 
static bool GetDiscountTypeByCardType (unsigned short cardType, EM::CardFacade::ECardFacadeDefines::CardTypeStandard standard, bool timeTicket, unsigned char &discountType)
 
static bool GetDiscountTypeByCardType (unsigned char cardTypeID, bool timeTicket, unsigned char &discountType)
 
static bool GetCustomerProfileName (unsigned char customerProfileIndex, std::string &customerProfile)
 Get name of card type (text representation of card type) More...
 
static bool GetNameAndSurname (std::string &name, std::string &surname, std::string &codecName, bool &showingEnabled)
 
static bool GetBornNumber (unsigned short &year, unsigned short &month, unsigned short &day, bool &showingEnabled)
 
static
EIssueLogicDefines::ReturnValues 
GetCardTypeID (unsigned char &cardTypeID, unsigned char validCustomerProfileIndex)
 Get card type ID by card type and card standard from card facade. More...
 
static
EIssueLogicDefines::ReturnValues 
GetCardType (unsigned short &cardType, const unsigned char validCustomerProfileIndex)
 GetCardType - method returns card type (NOT card type ID) at desired customer profile index. More...
 
static bool GetWalletBalanceText (std::string &walletBalance)
 Get balance of electronic wallet on card in form of "amount currency". More...
 
static bool IsHomeCompanyCard (bool &isHomeCompanyCard)
 IsHomeCompanyCard. More...
 
static
EIssueLogicDefines::ReturnValues 
IsAllowedCompanyCard (bool &isAllowedCompanyCard)
 IsAllowedCompanyCard. More...
 
static
EIssueLogicDefines::ReturnValues 
IsSupportedLineTripProtectNumberOnCard (bool &isSupportedFlagsOnCard)
 IsSupportedLineTripProtectNumberOnCard - Function checks feature on card. More...
 
static
EIssueLogicDefines::ReturnValues 
GetCardNetworkID (unsigned long &cardNetworkID)
 GetCardNetworkID - gains network ID from country code and netwrok on card. More...
 
static
EIssueLogicDefines::ReturnValues 
IsSupportedProfileValidityStartOnCard (bool &isSupportedProfileValidityStart)
 IsSupportedProfileValidityStartOnCard. More...
 
static
EIssueLogicDefines::ReturnValues 
GetCustomerProfileValidity (unsigned long &customerProfileValidityStart, unsigned long &customerProfileValidityEnd, const unsigned char customerProfileIndex)
 Wrapper for customer profile validity on card. More...
 
static bool IsCityCard ()
 Checks city code flag on card( SCS strcuture EAppIssuer::Get/Set IssuerType, ECardDataFacadeCommon::GetAppIssuerType ). Currently is supported only code 0x40. More...
 
static
EIssueLogicDefines::ReturnValues 
GetTariffFromCard (CardFacade::ECardFacadeDefines::CardFacadeType facadeType, unsigned char ticketIndex, bool timeTicket, unsigned long itsNumber, Strojcek::VstupneUdaje::TarifnySystem::ETarifa *&tariff)
 GetTariffFromCard - Get tariff from card by ticketIndex. More...
 
static
EIssueLogicDefines::ReturnValues 
GetOneWayTicketPriceListRowFromCard (unsigned char ticketIndex, unsigned long itsNumber, Strojcek::VstupneUdaje::TarifnySystem::ETarifnePasmo *&priceListRow)
 GetOneWayTicketPriceListRowFromCard - Get priceListRow from card with OneWayTicket. More...
 
static
EIssueLogicDefines::ReturnValues 
IsAllowedCardTypeForCardActivation (bool &isAllowedCardTypeForCardActivation)
 IsAllowedCardTypeForCardActivation. More...
 
static
EIssueLogicDefines::ReturnValues 
IsAnyCustomerProfileValid (unsigned char &firstValidCustomerProfile, unsigned long timeToCompareProfileValidityTo=0)
 IsAnyCustomerProfileValid - loops all customer profiles on card and checks their time validity. More...
 
static
EIssueLogicDefines::ReturnValues 
IsCustomerProfileValidByDate (unsigned char customerProfileIndex, unsigned long timeToCompareProfileValidityTo=0)
 IsCustomerProfileValidByDate - checks time validity of a customer profile on given index. More...
 
static
EIssueLogicDefines::ReturnValues 
EvaluateCardTypeForInvalidCustomerProfile (unsigned short &cardType)
 EvaluateCardTypeForInvalidCustomerProfile - evaluates tariff system settings for invalid customer profiles. More...
 
static
EIssueLogicDefines::ReturnValues 
IsAnyValidFareProviderForCurrentCompanyNumber ()
 IsAnyValidFareProviderForCurrentCompanyNumber - checks if there are valid commonData and if all virtual card slots are used. More...
 
static
EIssueLogicDefines::ReturnValues 
GetNIDFromTimeTicket (const unsigned char timeTicketIndex, unsigned long &timeTicketNID)
 GetNIDFromTimeTicket - check if time ticket supports network id (NID), then calculate NID from country code and network code. More...
 
static
EIssueLogicDefines::ReturnValues 
GetNIDFromOneWayTicket (const unsigned char oneWayTicketIndex, unsigned long &oneWayTicketNID)
 GetNIDFromOneWayTicket - calculates network ID from country code and network code. More...
 
static
EIssueLogicDefines::ReturnValues 
GetUTNFromTimeTicket (const unsigned char timeTicketIndex, long &urbanTransportNumber)
 GetUTNFromTimeTicket - check if time ticket supports urban transport number (UTN), return UTN if yes. More...
 
static
EIssueLogicDefines::ReturnValues 
CheckCardWalletISOPayUnitCodeValidity (bool &walletPayUnitValidity)
 CheckCardWalletISOPayUnitCodeValidity - check if card has wallet with valid ISO pay unit code. More...
 
static
EIssueLogicDefines::ReturnValues 
GetCappingInformation (unsigned short ids, Strojcek::VstupneUdaje::CappingInformationData &cappingInformationData)
 GetCappingInformation - gains capping information data from tariff system and from card data structures. More...
 

Constructor & Destructor Documentation

ECardBusinessLogic::~ECardBusinessLogic ( )
EM::TicketIssueLogic::ECardBusinessLogic::~ECardBusinessLogic ( )

Member Function Documentation

static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::CheckCardNetworkWithTariffNetwork ( EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *  ticketTariff,
bool &  machingNetwork 
)
static

check if the network on card is the same for selling tariff

Parameters
issuedTicket- ticket to check
machingNetworkset to true if network are same or check is not required
Returns
Ok -all ok

Here is the caller graph for this function:

static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::CheckCardNetworkWithTariffNetwork ( EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *  ticketTariff,
bool &  machingNetwork 
)
static

check if the network on card is the same for selling tariff

Parameters
issuedTicket- ticket to check
machingNetworkset to true if network are same or check is not required
Returns
Ok -all ok
EIssueLogicDefines::ReturnValues ECardBusinessLogic::CheckCardWalletISOPayUnitCodeValidity ( bool &  walletPayUnitValidity)
static

CheckCardWalletISOPayUnitCodeValidity - check if card has wallet with valid ISO pay unit code.

Parameters
walletPayUnitValidity- output parameter which tells about ISO pay unit validity. True = wallet ISO pay unit is valid, false = wallet ISO pay unit is invalid.
Returns
EIssueLogicDefines::Ok when ISO pay unit validity check was performed successfully
EIssueLogicDefines::BadCommonCardData when reading card publisher number failed

Here is the call graph for this function:

static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::CheckCardWalletISOPayUnitCodeValidity ( bool &  walletPayUnitValidity)
static

CheckCardWalletISOPayUnitCodeValidity - check if card has wallet with valid ISO pay unit code.

Parameters
walletPayUnitValidity- output parameter which tells about ISO pay unit validity. True = wallet ISO pay unit is valid, false = wallet ISO pay unit is invalid.
Returns
EIssueLogicDefines::Ok when ISO pay unit validity check was performed successfully
EIssueLogicDefines::BadCommonCardData when reading card publisher number failed
EM::TicketIssueLogic::ECardBusinessLogic::DEPRECATED ( static bool   GetValidCustomerProfileIndexunsigned char &profileIndex, const unsigned short cardType, EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff)
EM::TicketIssueLogic::ECardBusinessLogic::DEPRECATED ( static bool   GetValidCustomerProfileIndexunsigned char &profileIndex, const unsigned short cardType, EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff)
EM::TicketIssueLogic::ECardBusinessLogic::DEPRECATED ( static bool   GetCustomerProfileNameEM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, std::string &customerProfile)

DEPRECATED - Use GetCustomerProfileName( unsigned char customerProfileIndex, std::string &customerProfile ) CustomerProfileIndex should be obtained from IsAnyCustomerProfileValid

EM::TicketIssueLogic::ECardBusinessLogic::DEPRECATED ( static bool   GetCustomerProfileNameEM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *tariff, std::string &customerProfile)

DEPRECATED - Use GetCustomerProfileName( unsigned char customerProfileIndex, std::string &customerProfile ) CustomerProfileIndex should be obtained from IsAnyCustomerProfileValid

EIssueLogicDefines::ReturnValues ECardBusinessLogic::EvaluateCardTypeForInvalidCustomerProfile ( unsigned short &  cardType)
static

EvaluateCardTypeForInvalidCustomerProfile - evaluates tariff system settings for invalid customer profiles.

Note
Some tariff system settings treat invalid customer profile as valid customer profile with changed cardType (expired student card = full card)
Parameters
cardType-
Returns
EIssueLogicDefines::Ok when invalid customer profile should be treated as valid
EIssueLogicDefines::ErrorInvalidCardDiscount when invalid customer profile should be treated as invalid
other -
See also
EIssueLogicDefines::ReturnValues

Here is the caller graph for this function:

static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::EvaluateCardTypeForInvalidCustomerProfile ( unsigned short &  cardType)
static

EvaluateCardTypeForInvalidCustomerProfile - evaluates tariff system settings for invalid customer profiles.

Note
Some tariff system settings treat invalid customer profile as valid customer profile with changed cardType (expired student card = full card)
Parameters
cardType-
Returns
EIssueLogicDefines::Ok when invalid customer profile should be treated as valid
EIssueLogicDefines::ErrorInvalidCardDiscount when invalid customer profile should be treated as invalid
other -
See also
EIssueLogicDefines::ReturnValues
bool ECardBusinessLogic::GetBornNumber ( unsigned short &  year,
unsigned short &  month,
unsigned short &  day,
bool &  showingEnabled 
)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static bool EM::TicketIssueLogic::ECardBusinessLogic::GetBornNumber ( unsigned short &  year,
unsigned short &  month,
unsigned short &  day,
bool &  showingEnabled 
)
static
static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::GetCappingInformation ( unsigned short  ids,
Strojcek::VstupneUdaje::CappingInformationData &  cappingInformationData 
)
static

GetCappingInformation - gains capping information data from tariff system and from card data structures.

Parameters
ids- input parameter - actual IDS number
cappingInformationData- output parameter - set of capping information data from tariff system and from card data structures
Returns
EIssueLogicDefines::Ok when method was performed successfully
other -
See also
EIssueLogicDefines::ReturnValues
static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::GetCappingInformation ( unsigned short  ids,
Strojcek::VstupneUdaje::CappingInformationData &  cappingInformationData 
)
static

GetCappingInformation - gains capping information data from tariff system and from card data structures.

Parameters
ids- input parameter - actual IDS number
cappingInformationData- output parameter - set of capping information data from tariff system and from card data structures
Returns
EIssueLogicDefines::Ok when method was performed successfully
other -
See also
EIssueLogicDefines::ReturnValues
EIssueLogicDefines::ReturnValues ECardBusinessLogic::GetCardNetworkID ( unsigned long &  cardNetworkID)
static

GetCardNetworkID - gains network ID from country code and netwrok on card.

Parameters
cardNetworkID
Returns
OK - everythng's fine
See also
EIssueLogicDefines::ReturnValues

Here is the call graph for this function:

Here is the caller graph for this function:

static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::GetCardNetworkID ( unsigned long &  cardNetworkID)
static

GetCardNetworkID - gains network ID from country code and netwrok on card.

Parameters
cardNetworkID
Returns
OK - everythng's fine
See also
EIssueLogicDefines::ReturnValues
static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::GetCardType ( unsigned short &  cardType,
const unsigned char  validCustomerProfileIndex 
)
static

GetCardType - method returns card type (NOT card type ID) at desired customer profile index.

Parameters
cardType- card type we want to get
validCustomerProfileIndex- index of customer profile which we are interested in
Returns
EIssueLogicDefines::Ok on success, EIssueLogicDefines::BadCommonCardData on error
EIssueLogicDefines::ReturnValues ECardBusinessLogic::GetCardType ( unsigned short &  cardType,
const unsigned char  validCustomerProfileIndex 
)
static

GetCardType - method returns card type (NOT card type ID) at desired customer profile index.

Parameters
cardType- card type we want to get
validCustomerProfileIndex- index of customer profile which we are interested in
Returns
EIssueLogicDefines::Ok on success, EIssueLogicDefines::BadCommonCardData on error

Here is the call graph for this function:

static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::GetCardTypeID ( unsigned char &  cardTypeID,
unsigned char  validCustomerProfileIndex 
)
static

Get card type ID by card type and card standard from card facade.

EIssueLogicDefines::ReturnValues ECardBusinessLogic::GetCardTypeID ( unsigned char &  cardTypeID,
unsigned char  validCustomerProfileIndex 
)
static

Get card type ID by card type and card standard from card facade.

Here is the call graph for this function:

static bool EM::TicketIssueLogic::ECardBusinessLogic::GetCustomerProfileName ( unsigned char  customerProfileIndex,
std::string &  customerProfile 
)
static

Get name of card type (text representation of card type)

Parameters
customerProfileIndex- index of customer profile which we are interested in (emtest mifare classic has only one customer profile)
customerProfile- name of card customer profile which index is defined by given tariff (output parameter)
Returns
true on success

Here is the caller graph for this function:

static bool EM::TicketIssueLogic::ECardBusinessLogic::GetCustomerProfileName ( unsigned char  customerProfileIndex,
std::string &  customerProfile 
)
static

Get name of card type (text representation of card type)

Parameters
customerProfileIndex- index of customer profile which we are interested in (emtest mifare classic has only one customer profile)
customerProfile- name of card customer profile which index is defined by given tariff (output parameter)
Returns
true on success
EIssueLogicDefines::ReturnValues ECardBusinessLogic::GetCustomerProfileValidity ( unsigned long &  customerProfileValidityStart,
unsigned long &  customerProfileValidityEnd,
const unsigned char  customerProfileIndex 
)
static

Wrapper for customer profile validity on card.

Note
Gets customer profile start/end validity. Student card only (provider 102/104) - Tries to prolong end validity according to tariff system settings.

Card provider 102 uses 'PlatnStudZlavyDoDen'/129 and 'PlatnStudZlavDoMesia'/130 Card provider 104 uses 178 and 179 for 30.6. or 199 and 200 for 31.8.

Parameters
customerProfileValidityStart- output - start date of customer profile validity
customerProfileValidityEnd- output - end date of customer profile validity (recalculated if card provider is 102 or 104)
customerProfileIndex
Returns
OK - all ok
See also
EIssueLogicDefines::ReturnValues

Here is the call graph for this function:

Here is the caller graph for this function:

static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::GetCustomerProfileValidity ( unsigned long &  customerProfileValidityStart,
unsigned long &  customerProfileValidityEnd,
const unsigned char  customerProfileIndex 
)
static

Wrapper for customer profile validity on card.

Note
Gets customer profile start/end validity. Student card only (provider 102/104) - Tries to prolong end validity according to tariff system settings.

Card provider 102 uses 'PlatnStudZlavyDoDen'/129 and 'PlatnStudZlavDoMesia'/130 Card provider 104 uses 178 and 179 for 30.6. or 199 and 200 for 31.8.

Parameters
customerProfileValidityStart- output - start date of customer profile validity
customerProfileValidityEnd- output - end date of customer profile validity (recalculated if card provider is 102 or 104)
customerProfileIndex
Returns
OK - all ok
See also
EIssueLogicDefines::ReturnValues
static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::GetDepartmentNumberFromCard ( unsigned long &  departmentNumber)
static

Function gets department number from card (or from purse)

Parameters
departmentNumber- department number from card or purse
Returns
Ok - all ok
Other - see result values of function PrepareTicketAutoIssueData
EIssueLogicDefines::ReturnValues ECardBusinessLogic::GetDepartmentNumberFromCard ( unsigned long &  departmentNumber)
static

Function gets department number from card (or from purse)

Parameters
departmentNumber- department number from card or purse
Returns
Ok - all ok
Other - see result values of function PrepareTicketAutoIssueData

Here is the call graph for this function:

Here is the caller graph for this function:

static bool EM::TicketIssueLogic::ECardBusinessLogic::GetDiscountTypeByCardType ( unsigned short  cardType,
EM::CardFacade::ECardFacadeDefines::CardTypeStandard  standard,
bool  timeTicket,
unsigned char &  discountType 
)
static
bool ECardBusinessLogic::GetDiscountTypeByCardType ( unsigned short  cardType,
EM::CardFacade::ECardFacadeDefines::CardTypeStandard  standard,
bool  timeTicket,
unsigned char &  discountType 
)
static

Here is the caller graph for this function:

static bool EM::TicketIssueLogic::ECardBusinessLogic::GetDiscountTypeByCardType ( unsigned char  cardTypeID,
bool  timeTicket,
unsigned char &  discountType 
)
static
bool ECardBusinessLogic::GetDiscountTypeByCardType ( unsigned char  cardTypeID,
bool  timeTicket,
unsigned char &  discountType 
)
static

Here is the call graph for this function:

static bool EM::TicketIssueLogic::ECardBusinessLogic::GetNameAndSurname ( std::string &  name,
std::string &  surname,
std::string &  codecName,
bool &  showingEnabled 
)
static
static bool EM::TicketIssueLogic::ECardBusinessLogic::GetNameAndSurname ( std::string &  name,
std::string &  surname,
std::string &  codecName,
bool &  showingEnabled 
)
static
EIssueLogicDefines::ReturnValues ECardBusinessLogic::GetNIDFromOneWayTicket ( const unsigned char  oneWayTicketIndex,
unsigned long &  oneWayTicketNID 
)
static

GetNIDFromOneWayTicket - calculates network ID from country code and network code.

Parameters
oneWayTicketIndex- one way ticket index
oneWayTicketNID- output parameter
Returns
EIssueLogicDefines::Ok if successful EIssueLogicDefines::ReturnValues if error occured

Here is the call graph for this function:

Here is the caller graph for this function:

static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::GetNIDFromOneWayTicket ( const unsigned char  oneWayTicketIndex,
unsigned long &  oneWayTicketNID 
)
static

GetNIDFromOneWayTicket - calculates network ID from country code and network code.

Parameters
oneWayTicketIndex- one way ticket index
oneWayTicketNID- output parameter
Returns
EIssueLogicDefines::Ok if successful EIssueLogicDefines::ReturnValues if error occured
static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::GetNIDFromTimeTicket ( const unsigned char  timeTicketIndex,
unsigned long &  timeTicketNID 
)
static

GetNIDFromTimeTicket - check if time ticket supports network id (NID), then calculate NID from country code and network code.

Note
if time ticket does not support NID, cardNID 0 is returned
Parameters
timeTicketIndex- used time ticket index
timeTicketNID- output param
Returns
EIssueLogicDefines::Ok if successful (valid NID found, or NID is not supported on time ticket), other EIssueLogicDefines::ReturnValues if error occured
EIssueLogicDefines::ReturnValues ECardBusinessLogic::GetNIDFromTimeTicket ( const unsigned char  timeTicketIndex,
unsigned long &  timeTicketNID 
)
static

GetNIDFromTimeTicket - check if time ticket supports network id (NID), then calculate NID from country code and network code.

Note
if time ticket does not support NID, cardNID 0 is returned
Parameters
timeTicketIndex- used time ticket index
timeTicketNID- output param
Returns
EIssueLogicDefines::Ok if successful (valid NID found, or NID is not supported on time ticket), other EIssueLogicDefines::ReturnValues if error occured

Here is the call graph for this function:

static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::GetOneWayTicketPriceListRowFromCard ( unsigned char  ticketIndex,
unsigned long  itsNumber,
Strojcek::VstupneUdaje::TarifnySystem::ETarifnePasmo *&  priceListRow 
)
static

GetOneWayTicketPriceListRowFromCard - Get priceListRow from card with OneWayTicket.

Parameters
ticketIndex- ticket indentificator on card
itsNumber- selected ITS(IDS) number
priceListRow- output param - priceListRow found by priceListRowNumber on card
Returns
Ok - all ok
BadInputData - can't get priceListRowNumber from card OR can't find priceList OR can't find priceListRow by priceListRowNumber
BadOneWayTicketCardData - error get data from oneway ticket facade
other -
See also
EIssueLogicDefines::ReturnValues
static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::GetOneWayTicketPriceListRowFromCard ( unsigned char  ticketIndex,
unsigned long  itsNumber,
Strojcek::VstupneUdaje::TarifnySystem::ETarifnePasmo *&  priceListRow 
)
static

GetOneWayTicketPriceListRowFromCard - Get priceListRow from card with OneWayTicket.

Parameters
ticketIndex- ticket indentificator on card
itsNumber- selected ITS(IDS) number
priceListRow- output param - priceListRow found by priceListRowNumber on card
Returns
Ok - all ok
BadInputData - can't get priceListRowNumber from card OR can't find priceList OR can't find priceListRow by priceListRowNumber
BadOneWayTicketCardData - error get data from oneway ticket facade
other -
See also
EIssueLogicDefines::ReturnValues
static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::GetTariffFromCard ( CardFacade::ECardFacadeDefines::CardFacadeType  facadeType,
unsigned char  ticketIndex,
bool  timeTicket,
unsigned long  itsNumber,
Strojcek::VstupneUdaje::TarifnySystem::ETarifa *&  tariff 
)
static

GetTariffFromCard - Get tariff from card by ticketIndex.

Note
If is set to true call dataclass function
See also
GetTariffTicketNumberFromTimeTicket,
GetTariffTicketNumberFromOneWayTicket otherwise
Parameters
facadeType- which facade may be taken
ticketIndex- ticket indentificator on card
timeTicket- determines whether the time ticket has been used
itsNumber- selected ITS(IDS) number
tariff- output param - tariff from card
Returns
Ok - all ok
BadInputData - tariff group is NULL
BadTimeTicketCardData - error get data from time ticket facade
BadOneWayTicketCardData - error get data from oneway ticket facade
other -
See also
EIssueLogicDefines::ReturnValues

Here is the caller graph for this function:

static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::GetTariffFromCard ( CardFacade::ECardFacadeDefines::CardFacadeType  facadeType,
unsigned char  ticketIndex,
bool  timeTicket,
unsigned long  itsNumber,
Strojcek::VstupneUdaje::TarifnySystem::ETarifa *&  tariff 
)
static

GetTariffFromCard - Get tariff from card by ticketIndex.

Note
If is set to true call dataclass function
See also
GetTariffTicketNumberFromTimeTicket,
GetTariffTicketNumberFromOneWayTicket otherwise
Parameters
facadeType- which facade may be taken
ticketIndex- ticket indentificator on card
timeTicket- determines whether the time ticket has been used
itsNumber- selected ITS(IDS) number
tariff- output param - tariff from card
Returns
Ok - all ok
BadInputData - tariff group is NULL
BadTimeTicketCardData - error get data from time ticket facade
BadOneWayTicketCardData - error get data from oneway ticket facade
other -
See also
EIssueLogicDefines::ReturnValues
static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::GetUTNFromTimeTicket ( const unsigned char  timeTicketIndex,
long &  urbanTransportNumber 
)
static

GetUTNFromTimeTicket - check if time ticket supports urban transport number (UTN), return UTN if yes.

Parameters
timeTicketIndex- used time ticket index
urbanTransportNumber- output param
Returns
EIssueLogicDefines::Ok if successful (valid UTN found, or UTN is not supported on time ticket), other EIssueLogicDefines::ReturnValues if error occured
EIssueLogicDefines::ReturnValues ECardBusinessLogic::GetUTNFromTimeTicket ( const unsigned char  timeTicketIndex,
long &  urbanTransportNumber 
)
static

GetUTNFromTimeTicket - check if time ticket supports urban transport number (UTN), return UTN if yes.

Parameters
timeTicketIndex- used time ticket index
urbanTransportNumber- output param
Returns
EIssueLogicDefines::Ok if successful (valid UTN found, or UTN is not supported on time ticket), other EIssueLogicDefines::ReturnValues if error occured

Here is the call graph for this function:

static bool EM::TicketIssueLogic::ECardBusinessLogic::GetWalletBalanceText ( std::string &  walletBalance)
static

Get balance of electronic wallet on card in form of "amount currency".

Parameters
walletBalance- output parameter where result will be stored
Returns
true - all ok
static bool EM::TicketIssueLogic::ECardBusinessLogic::GetWalletBalanceText ( std::string &  walletBalance)
static

Get balance of electronic wallet on card in form of "amount currency".

Parameters
walletBalance- output parameter where result will be stored
Returns
true - all ok
EIssueLogicDefines::ReturnValues ECardBusinessLogic::IsAllowedCardTypeForCardActivation ( bool &  isAllowedCardTypeForCardActivation)
static

IsAllowedCardTypeForCardActivation.

Parameters
isAllowedCardTypeForCardActivation- set to true if card activation is allowed otherwise set to false
Returns
Ok - all ok
other - see enumerator in EIssueLogicDefines::ReturnValues

Here is the call graph for this function:

Here is the caller graph for this function:

static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::IsAllowedCardTypeForCardActivation ( bool &  isAllowedCardTypeForCardActivation)
static

IsAllowedCardTypeForCardActivation.

Parameters
isAllowedCardTypeForCardActivation- set to true if card activation is allowed otherwise set to false
Returns
Ok - all ok
other - see enumerator in EIssueLogicDefines::ReturnValues
EIssueLogicDefines::ReturnValues ECardBusinessLogic::IsAllowedCompanyCard ( bool &  isAllowedCompanyCard)
static

IsAllowedCompanyCard.

Parameters
isAllowedCompanyCard- set to true if card company number found in 'udalosti.dat' ( ForOneWayTicketJourney ) otherwise set to false
Returns
Ok - all ok
other - see enumerator in EIssueLogicDefines::ReturnValues

Here is the call graph for this function:

static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::IsAllowedCompanyCard ( bool &  isAllowedCompanyCard)
static

IsAllowedCompanyCard.

Parameters
isAllowedCompanyCard- set to true if card company number found in 'udalosti.dat' ( ForOneWayTicketJourney ) otherwise set to false
Returns
Ok - all ok
other - see enumerator in EIssueLogicDefines::ReturnValues
EIssueLogicDefines::ReturnValues ECardBusinessLogic::IsAnyCustomerProfileValid ( unsigned char &  firstValidCustomerProfile,
unsigned long  timeToCompareProfileValidityTo = 0 
)
static

IsAnyCustomerProfileValid - loops all customer profiles on card and checks their time validity.

Parameters
firstValidCustomerProfile- index of first valid customer profile on card; zero if no valid customer profile is found
timeToCompareProfileValidityTo- date in epoch format, customer profile validity is compared to this date. If (comparedDate = 0), current date is used.
Returns
EIssueLogicDefines::Ok when valid customer profile exists
EIssueLogicDefines::ErrorInvalidCardDiscount when no valid customer profile is found
other -
See also
EIssueLogicDefines::ReturnValues

Here is the call graph for this function:

Here is the caller graph for this function:

static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::IsAnyCustomerProfileValid ( unsigned char &  firstValidCustomerProfile,
unsigned long  timeToCompareProfileValidityTo = 0 
)
static

IsAnyCustomerProfileValid - loops all customer profiles on card and checks their time validity.

Parameters
firstValidCustomerProfile- index of first valid customer profile on card; zero if no valid customer profile is found
timeToCompareProfileValidityTo- date in epoch format, customer profile validity is compared to this date. If (comparedDate = 0), current date is used.
Returns
EIssueLogicDefines::Ok when valid customer profile exists
EIssueLogicDefines::ErrorInvalidCardDiscount when no valid customer profile is found
other -
See also
EIssueLogicDefines::ReturnValues
static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::IsAnyValidFareProviderForCurrentCompanyNumber ( )
static

IsAnyValidFareProviderForCurrentCompanyNumber - checks if there are valid commonData and if all virtual card slots are used.

Note
RM #5240 - if card (Desfire) has all virtual card slots used (every slot has fareProviderNumber set), SCS will return NULL customerData
Returns
EIssueLogicDefines::Ok when there are valid commonData
EIssueLogicDefines::NoSpaceOnCard when all virtual card slots are full and it is not possible to create new virtual card
other -
See also
EIssueLogicDefines::ReturnValues
EIssueLogicDefines::ReturnValues ECardBusinessLogic::IsAnyValidFareProviderForCurrentCompanyNumber ( )
static

IsAnyValidFareProviderForCurrentCompanyNumber - checks if there are valid commonData and if all virtual card slots are used.

Note
RM #5240 - if card (Desfire) has all virtual card slots used (every slot has fareProviderNumber set), SCS will return NULL customerData
Returns
EIssueLogicDefines::Ok when there are valid commonData
EIssueLogicDefines::NoSpaceOnCard when all virtual card slots are full and it is not possible to create new virtual card
other -
See also
EIssueLogicDefines::ReturnValues

Here is the call graph for this function:

bool ECardBusinessLogic::IsCityCard ( )
static

Checks city code flag on card( SCS strcuture EAppIssuer::Get/Set IssuerType, ECardDataFacadeCommon::GetAppIssuerType ). Currently is supported only code 0x40.

Here is the call graph for this function:

Here is the caller graph for this function:

static bool EM::TicketIssueLogic::ECardBusinessLogic::IsCityCard ( )
static

Checks city code flag on card( SCS strcuture EAppIssuer::Get/Set IssuerType, ECardDataFacadeCommon::GetAppIssuerType ). Currently is supported only code 0x40.

EIssueLogicDefines::ReturnValues ECardBusinessLogic::IsCustomerProfileValidByDate ( unsigned char  customerProfileIndex,
unsigned long  timeToCompareProfileValidityTo = 0 
)
static

IsCustomerProfileValidByDate - checks time validity of a customer profile on given index.

Parameters
customerProfileIndex- customer profile to be checked
timeToCompareProfileValidityTo- date in epoch format, customer profile validity is compared to this date. If (comparedDate = 0), current date is used.
Returns
EIssueLogicDefines::Ok when profile is valid
EIssueLogicDefines::ErrorInvalidCardDiscount when profile is not valid
other -
See also
EIssueLogicDefines::ReturnValues

Here is the caller graph for this function:

static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::IsCustomerProfileValidByDate ( unsigned char  customerProfileIndex,
unsigned long  timeToCompareProfileValidityTo = 0 
)
static

IsCustomerProfileValidByDate - checks time validity of a customer profile on given index.

Parameters
customerProfileIndex- customer profile to be checked
timeToCompareProfileValidityTo- date in epoch format, customer profile validity is compared to this date. If (comparedDate = 0), current date is used.
Returns
EIssueLogicDefines::Ok when profile is valid
EIssueLogicDefines::ErrorInvalidCardDiscount when profile is not valid
other -
See also
EIssueLogicDefines::ReturnValues
static bool EM::TicketIssueLogic::ECardBusinessLogic::IsCustomerProfileValidByTariff ( unsigned char  profileIndex,
const unsigned short  cardType,
EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *  tariff 
)
static

Checks if customer profile on specified index can use specified tariff.

Parameters
profileIndex- profile to be checked
cardType- card type information
tariff- tariff of lookup profile
Returns
Ok - all ok
static bool EM::TicketIssueLogic::ECardBusinessLogic::IsCustomerProfileValidByTariff ( unsigned char  profileIndex,
const unsigned short  cardType,
EM::Strojcek::VstupneUdaje::TarifnySystem::ETarifa *  tariff 
)
static

Checks if customer profile on specified index can use specified tariff.

Parameters
profileIndex- profile to be checked
cardType- card type information
tariff- tariff of lookup profile
Returns
Ok - all ok
static bool EM::TicketIssueLogic::ECardBusinessLogic::IsHomeCompanyCard ( bool &  isHomeCompanyCard)
static

IsHomeCompanyCard.

Parameters
isHomeCompanyCard- set to true if card company number found in CompaniesConfig otherwise set to false
Returns
true - all ok
bool ECardBusinessLogic::IsHomeCompanyCard ( bool &  isHomeCompanyCard)
static

IsHomeCompanyCard.

Parameters
isHomeCompanyCard- set to true if card company number found in CompaniesConfig otherwise set to false
Returns
true - all ok

Here is the caller graph for this function:

EIssueLogicDefines::ReturnValues ECardBusinessLogic::IsSupportedLineTripProtectNumberOnCard ( bool &  isSupportedFlagsOnCard)
static

IsSupportedLineTripProtectNumberOnCard - Function checks feature on card.

Controlled features on one way ticket facade:

  • line feature
  • trip feature
  • protect number feature
Parameters
IsSupportedFlagsOnCard- true == supported features on card, false otherwise
Returns
OK - all ok
See also
EIssueLogicDefines::ReturnValues

Here is the call graph for this function:

Here is the caller graph for this function:

static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::IsSupportedLineTripProtectNumberOnCard ( bool &  isSupportedFlagsOnCard)
static

IsSupportedLineTripProtectNumberOnCard - Function checks feature on card.

Controlled features on one way ticket facade:

  • line feature
  • trip feature
  • protect number feature
Parameters
IsSupportedFlagsOnCard- true == supported features on card, false otherwise
Returns
OK - all ok
See also
EIssueLogicDefines::ReturnValues
static EIssueLogicDefines::ReturnValues EM::TicketIssueLogic::ECardBusinessLogic::IsSupportedProfileValidityStartOnCard ( bool &  isSupportedProfileValidityStart)
static

IsSupportedProfileValidityStartOnCard.

Parameters
isSupportedProfileValidityStart- output parameter - true if card supports customerProfileValidityStart, false otherwise
Returns
Ok - all ok
See also
EIssueLogicDefines::ReturnValues
EIssueLogicDefines::ReturnValues ECardBusinessLogic::IsSupportedProfileValidityStartOnCard ( bool &  isSupportedProfileValidityStart)
static

IsSupportedProfileValidityStartOnCard.

Parameters
isSupportedProfileValidityStart- output parameter - true if card supports customerProfileValidityStart, false otherwise
Returns
Ok - all ok
See also
EIssueLogicDefines::ReturnValues

Here is the call graph for this function:

Here is the caller graph for this function:


The documentation for this class was generated from the following files: