AppCore
Loading...
Searching...
No Matches
ECardDataFacadeCommon.h
Go to the documentation of this file.
1#ifndef ECARDDATAFACADECOMMON_H
2#define ECARDDATAFACADECOMMON_H
3
4#include <string>
5#include <set>
6#include <vector>
7
8#include "core/common/eplatform.h"
9#include "appcore/cardfacade/ECardFacadeDefines.h"
10
11namespace EM
12{
13 namespace PT
14 {
15 class EDataCollection;
16 class EAplRequest;
17 }
18
19 namespace CardFacade
20 {
21 class ECardDataStorage;
22 class DLL_API ECardDataFacadeCommon
23 {
24 public:
29
30
35
36
42
43
50 bool GetLogicalCardNumber( unsigned long &logicalCardNumber, const signed char index = -1 ) const;
51
52
59 bool GetLogicalCardNumber( std::string &logicalCardNumber, const signed char index = -1 ) const;
60
66 bool GetCardNumber( unsigned long &cardNumber ) const;
67
68
74 bool SetCardNumber( const unsigned long cardNumber ) const;
75
76
82 bool GetCardValidityEnd( unsigned long &cardValidityEnd ) const;
83
84
90 bool SetCardValidityEnd( const unsigned long cardValidityEnd ) const;
91
92
100 bool GetCardAdditionalDiscountValidity( unsigned long &additionalDiscountValidity, const signed char index = -1 ) const;
101
102
110 bool SetCardAdditionalDiscountValidity( const unsigned long additionalDiscountValidity, const signed char index = -1 ) const;
111
112
123 bool GetCardRegionCode( unsigned long &regionCode ) const;
124
125
138 bool GetCardCityCode( unsigned long &cityCode ) const;
139
145 bool SetCardRegionCode( const unsigned long regionCode ) const;
146
155 bool IsDiscountCouponValid( bool &isDiscountCouponValid, const signed char couponIndex ) const;
156
163 bool GetNumberOfDiscountCoupons( unsigned long &numberOfCoupons ) const;
164
173 bool GetDiscountCouponValidityEnd( unsigned long &couponValidityEnd, const signed char couponIndex ) const;
174
183 bool SetDiscountCouponValidityEnd( const unsigned long couponValidityEnd, const signed char couponIndex ) const;
184
193 bool GetDiscountCouponValidityStart(unsigned long &couponValidityStart, const signed char couponIndex ) const;
194
203 bool GetDiscountCouponRegionCode( unsigned long &couponRegionCode, const signed char couponIndex ) const;
204
213 bool GetDiscountCouponType(unsigned long &couponType, const signed char couponIndex ) const;
214
221 bool GetCustomerProfilesCount( unsigned char &customerProfilesCount ) const;
222
234 bool GetCustomerProfileValidityEnd( unsigned long &customerProfileValidityEnd, const unsigned char customerProfileIndex = 0, const signed char index = -1 ) const;
235
243 bool SetCustomerProfileValidityEnd( const unsigned long customerProfileValidityEnd, const unsigned char customerProfileIndex = 0, const signed char index = -1 ) const;
244
252 bool GetCustomerProfileValidityStart( unsigned long &customerProfileValidityStart, const unsigned char customerProfileIndex = 0, const signed char index = -1 ) const;
253
260 bool SetCustomerProfileValidityStart( const unsigned long customerProfileValidityStart, const unsigned char customerProfileIndex = 0, const signed char index = -1 ) const;
261
269 bool GetCardTypeAndSubType( unsigned short &cardType, unsigned short &cardSubType, ECardFacadeDefines::CardTypeStandard &cardStandard, const unsigned char customerProfileIndex, const signed char index = -1 ) const;
270
271
278 bool SetCardTypeAndSubType( const unsigned short cardType, const unsigned short cardSubType, const unsigned char customerProfileIndex, const signed char index = -1 ) const;
279
280
291 bool GetFareProviderNumber( unsigned short &fareProviderNumber, const signed char fareProviderIndex = -1 ) const;
292
300 bool SetFareProviderNumber(const unsigned short providerNumber , const signed char fareProviderIndex = -1 ) const;
301
307 bool GetCardPublisherNumber( unsigned short &cardPublisherNumber ) const;
308
314 bool SetCardPublisherNumber( const unsigned short cardPublisherNumber ) const;
315
322 bool GetNetworkCode( unsigned short &networkCodeInBCD ) const;
323
330 bool SetNetworkCode( const unsigned short networkCodeInBCD ) const;
331
338 bool GetCountryCode( unsigned short &countryCodeInBCD ) const;
339
346 bool SetCountryCode( const unsigned short countryCodeInBCD ) const;
347
353 bool GetAppExpireDate( unsigned long &appExpireDate ) const;
354
360 bool SetAppExpireDate( const unsigned long appExpireDate ) const;
361
367 bool GetAppIssuerType( unsigned short &appIssuerType ) const;
368
374 bool SetAppIssuerType( const unsigned short appIssuerType ) const;
375
382 DEPRECATED( bool GetSaleDate( unsigned long &saleDate, const signed char index = -1 ) const );
383
384
391 DEPRECATED( bool SetSaleDate( const unsigned long saleDate, const signed char index = -1 ) const );
392
393
401 bool IsCardBlocked( bool &cardBlocked, const signed char index = -1 ) const;
402
411 bool SetCardBlocked( const bool blocked, const signed char index = -1 ) const;
412
413
420 bool IsCardSold( bool &cardSold, const signed char index = -1 ) const;
421
429 bool SetCardSold( const bool sold, const signed char index = -1 ) const;
430
436 bool GetUID( std::string &uid ) const;
437
443 bool GetRawUID( unsigned char *&uid ) const;
444
450 bool IsServiceCard( bool &serviceCard ) const;
451
458 bool SetServiceCard( const bool serviceCard ) const;
459
465 bool GetBornNumber( unsigned long &bornNumber ) const;
466
472 bool SetBornNumber( const unsigned long bornNumber ) const;
473
481 bool GetCardOwnerName( char *ownerName, unsigned short &nameLength, ECardFacadeDefines::TextEncoding &encoding ) const;
482
489 bool SetCardOwnerName( const char *ownerName, const unsigned short nameLength ) const;
490
498 bool GetCardOwnerSurname( char *ownerSurname, unsigned short &surnameLength, ECardFacadeDefines::TextEncoding &encoding ) const;
499
506 bool SetCardOwnerSurname( const char *ownerSurname, const unsigned short surnameLength ) const;
507
513 bool GetEventCount( unsigned long &eventCount ) const;
514
522 bool GetCommonDataCount( unsigned char &commonDataCount ) const;
523
532 bool GetCardPublisherVersion( unsigned char &publisherVersion );
533
539 bool GetQrPayload( std::vector<unsigned char> &data ) const;
540
549 bool SetCardPublisherVersion( unsigned char publisherVersion );
550
557 bool IsTransportSectionValid( bool &tranportSectionValid, const signed char index = -1 ) const;
558
564 bool GetDailyCappingDate( unsigned long &dailyCappingDate );
565
571 bool SetDailyCappingDate( unsigned long dailyCappingDate );
572
578 bool GetDailyCappingSum( unsigned short &dailyCappingSum );
579
585 bool SetDailyCappingSum( unsigned short dailyCappingSum );
586
592 bool GetWeeklyCappingDate( unsigned long &weeklyCappingDate );
593
599 bool SetWeeklyCappingDate( unsigned long weeklyCappingDate );
600
606 bool GetWeeklyCappingSum( unsigned short &weeklyCappingSum );
607
613 bool SetWeeklyCappingSum( unsigned short weeklyCappingSum );
614
620 bool GetCappingProvider( unsigned short &cappingProvider );
621
627 bool SetCappingProvider( unsigned short cappingProvider );
628
635
642
646 void Clear();
647
652 bool IsModifiedData() const;
653
659 bool PrepareWriteRequest( EM::PT::EDataCollection *writeRequest ) const;
660
666 bool AddDataToWriteRequest( EM::PT::EDataCollection *writeRequest ) const;
667
673 bool AddDataTypeToReadRequest(PT::EAplRequest *readRequest[] , const unsigned short dataTypesOperation) const;
674
681 bool IsCommonDataFeatureEnabled( const ECardFacadeDefines::CommonDataFeatures feature, bool &enabled ) const;
682
689 bool IsCardFeatureEnabled( const ECardFacadeDefines::CommonCardFeatures feature, bool &enabled ) const;
690
697 bool IsDataValid( bool &validData, const signed char index = -1 );
698
699 unsigned short GetRequiredDataReadOperation( const unsigned short dataTypesOperation ) const;
700
701 private:
703
704 class DataClass;
705 DataClass *d;
706
708 };
709 }
710}
711
712#endif // ECARDDATAFACADECOMMON_H
#define DLL_API
Definition ECardFacadeDefines.h:8
bool GetAppIssuerType(unsigned short &appIssuerType) const
bool IsModifiedData() const
check in actual implementation, if data was modified
bool GetDailyCappingDate(unsigned long &dailyCappingDate)
GetDailyCappingDate.
unsigned short GetRequiredDataReadOperation(const unsigned short dataTypesOperation) const
bool SetCustomerProfileValidityStart(const unsigned long customerProfileValidityStart, const unsigned char customerProfileIndex=0, const signed char index=-1) const
bool SetCountryCode(const unsigned short countryCodeInBCD) const
bool SetAppIssuerType(const unsigned short appIssuerType) const
bool SetBornNumber(const unsigned long bornNumber) const
function saved owner
bool IsDataValid(bool &validData, const signed char index=-1)
IsDataValid checks if commonData is valid (is not null)
bool IsTransportSectionValid(bool &tranportSectionValid, const signed char index=-1) const
function check if transportsection on common card data is valid
bool IsCommonDataFeatureEnabled(const ECardFacadeDefines::CommonDataFeatures feature, bool &enabled) const
bool GetAppExpireDate(unsigned long &appExpireDate) const
bool SetNetworkCode(const unsigned short networkCodeInBCD) const
bool GetNetworkCode(unsigned short &networkCodeInBCD) const
bool GetBornNumber(unsigned long &bornNumber) const
function return by reference owner
bool GetQrPayload(std::vector< unsigned char > &data) const
GetQrPayload retrieves the QR payload data.
bool AddDataTypeToReadRequest(PT::EAplRequest *readRequest[], const unsigned short dataTypesOperation) const
bool SetDiscountCouponValidityEnd(const unsigned long couponValidityEnd, const signed char couponIndex) const
SetDiscountCouponValidityEnd set valdity end.
bool IsCardFeatureEnabled(const ECardFacadeDefines::CommonCardFeatures feature, bool &enabled) const
bool GetCardRegionCode(unsigned long &regionCode) const
bool SetCardOwnerSurname(const char *ownerSurname, const unsigned short surnameLength) const
function set new owner card surname
bool GetCardValidityEnd(unsigned long &cardValidityEnd) const
bool IsCardSold(bool &cardSold, const signed char index=-1) const
bool SetServiceCard(const bool serviceCard) const
bool SetCardBlocked(const bool blocked, const signed char index=-1) const
Set status ofcard (ok, blocked ...). On Em-DesFire virtual card status is set, on other cards it is s...
bool GetCustomerProfilesCount(unsigned char &customerProfilesCount) const
Tells how many customer profiles are on card.
bool GetDiscountCouponValidityEnd(unsigned long &couponValidityEnd, const signed char couponIndex) const
GetDiscountCouponValidityEnd return by couponValidityEnd coupon validity end.
bool SetCappingProvider(unsigned short cappingProvider)
SetCappingProvider.
bool GetUID(std::string &uid) const
bool GetCardTypeAndSubType(unsigned short &cardType, unsigned short &cardSubType, ECardFacadeDefines::CardTypeStandard &cardStandard, const unsigned char customerProfileIndex, const signed char index=-1) const
bool SetCardPublisherNumber(const unsigned short cardPublisherNumber) const
DEPRECATED(bool SetSaleDate(const unsigned long saleDate, const signed char index=-1) const)
bool SetCustomerProfileValidityEnd(const unsigned long customerProfileValidityEnd, const unsigned char customerProfileIndex=0, const signed char index=-1) const
bool SetCardSold(const bool sold, const signed char index=-1) const
bool SetCardOwnerName(const char *ownerName, const unsigned short nameLength) const
function set new owner card name
bool IsServiceCard(bool &serviceCard) const
bool GetCappingProvider(unsigned short &cappingProvider)
GetCappingProvider.
ECardDataFacadeCommon(ECardDataStorage *cardDataStorage)
in construcotr create dataclass create dataClass
bool GetCountryCode(unsigned short &countryCodeInBCD) const
bool SetWeeklyCappingDate(unsigned long weeklyCappingDate)
SetWeeklyCappingDate - method sets weekly capping date.
bool SetCardRegionCode(const unsigned long regionCode) const
bool SetCappingProviderType(ECardFacadeDefines::CappingProviderType cappingProviderType)
SetCappingProviderType.
ECardFacadeDefines::ReturnValues Init()
set to member actual card implementation and call init on actual implementation
bool GetCustomerProfileValidityEnd(unsigned long &customerProfileValidityEnd, const unsigned char customerProfileIndex=0, const signed char index=-1) const
bool GetWeeklyCappingSum(unsigned short &weeklyCappingSum)
GetWeeklyCappingSum.
bool IsDiscountCouponValid(bool &isDiscountCouponValid, const signed char couponIndex) const
IsDiscountCouponValid checks structure data validity.
bool SetDailyCappingSum(unsigned short dailyCappingSum)
SetDailyCappingSum.
bool GetCardOwnerSurname(char *ownerSurname, unsigned short &surnameLength, ECardFacadeDefines::TextEncoding &encoding) const
function return owner card surname
bool SetCardAdditionalDiscountValidity(const unsigned long additionalDiscountValidity, const signed char index=-1) const
bool GetCardAdditionalDiscountValidity(unsigned long &additionalDiscountValidity, const signed char index=-1) const
bool SetWeeklyCappingSum(unsigned short weeklyCappingSum)
SetWeeklyCappingSum.
bool GetFareProviderNumber(unsigned short &fareProviderNumber, const signed char fareProviderIndex=-1) const
virtual ~ECardDataFacadeCommon()
standard virtual destrcutor
bool SetCardTypeAndSubType(const unsigned short cardType, const unsigned short cardSubType, const unsigned char customerProfileIndex, const signed char index=-1) const
bool IsCardBlocked(bool &cardBlocked, const signed char index=-1) const
Check status of card (ok, blocked ...). On Em-DesFire virtual card status is checked,...
bool SetDailyCappingDate(unsigned long dailyCappingDate)
SetDailyCappingDate - method sets daily capping date.
bool AddDataToWriteRequest(EM::PT::EDataCollection *writeRequest) const
bool SetCardValidityEnd(const unsigned long cardValidityEnd) const
bool SetCardNumber(const unsigned long cardNumber) const
bool PrepareWriteRequest(EM::PT::EDataCollection *writeRequest) const
bool GetWeeklyCappingDate(unsigned long &weeklyCappingDate)
GetWeeklyCappingDate.
bool GetCommonDataCount(unsigned char &commonDataCount) const
bool SetCardPublisherVersion(unsigned char publisherVersion)
SetCardPublisherVersion set version of publisher structure on card.
bool GetDiscountCouponType(unsigned long &couponType, const signed char couponIndex) const
GetDiscountCouponVersion return by couponRegionCode coupon version.
bool GetDiscountCouponRegionCode(unsigned long &couponRegionCode, const signed char couponIndex) const
GetDiscountCouponValidityEnd return by couponRegionCode coupon region code.
bool GetDailyCappingSum(unsigned short &dailyCappingSum)
GetDailyCappingSum.
bool SetAppExpireDate(const unsigned long appExpireDate) const
DEPRECATED(bool GetSaleDate(unsigned long &saleDate, const signed char index=-1) const)
bool GetCustomerProfileValidityStart(unsigned long &customerProfileValidityStart, const unsigned char customerProfileIndex=0, const signed char index=-1) const
bool GetCardCityCode(unsigned long &cityCode) const
bool GetNumberOfDiscountCoupons(unsigned long &numberOfCoupons) const
GetNumberOfDiscountCoupons return by numberOfCoupons coupon count in coupon collection.
bool GetLogicalCardNumber(unsigned long &logicalCardNumber, const signed char index=-1) const
bool GetCappingProviderType(ECardFacadeDefines::CappingProviderType &cappingProviderType)
GetCappingProviderType.
bool GetCardNumber(unsigned long &cardNumber) const
bool GetDiscountCouponValidityStart(unsigned long &couponValidityStart, const signed char couponIndex) const
GetDiscountCouponValidityStart return by couponValidityStart coupon validity start.
bool GetCardPublisherVersion(unsigned char &publisherVersion)
GetCardPublisherVersion return version of publisher structure on card.
bool GetRawUID(unsigned char *&uid) const
bool GetLogicalCardNumber(std::string &logicalCardNumber, const signed char index=-1) const
bool GetCardOwnerName(char *ownerName, unsigned short &nameLength, ECardFacadeDefines::TextEncoding &encoding) const
function return owner card name
bool GetCardPublisherNumber(unsigned short &cardPublisherNumber) const
bool SetFareProviderNumber(const unsigned short providerNumber, const signed char fareProviderIndex=-1) const
SetFareProviderNumber - set provider to FareDataDirectory. Supported only for TransData desfire mediu...
bool GetEventCount(unsigned long &eventCount) const
function retrun event count fromevent collection
card data storage, who fill if card readed
Definition ECardDataStorage.h:60
CappingProviderType
Definition ECardFacadeDefines.h:285
CommonCardFeatures
Definition ECardFacadeDefines.h:82
CardTypeStandard
Definition ECardFacadeDefines.h:253
ReturnValues
Definition ECardFacadeDefines.h:148
CommonDataFeatures
Definition ECardFacadeDefines.h:138
TextEncoding
Definition ECardFacadeDefines.h:221
SYSTEM INCLUDES.
Definition CardFacadeManagerXML.h:7