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
7#include "core/common/eplatform.h"
8#include "appcore/cardfacade/ECardFacadeDefines.h"
9
10namespace EM
11{
12 namespace PT
13 {
14 class EDataCollection;
15 class EAplRequest;
16 }
17
18 namespace CardFacade
19 {
20 class ECardDataStorage;
21 class DLL_API ECardDataFacadeCommon
22 {
23 public:
28
29
34
35
41
42
49 bool GetLogicalCardNumber( unsigned long &logicalCardNumber, const signed char index = -1 ) const;
50
51
58 bool GetLogicalCardNumber( std::string &logicalCardNumber, const signed char index = -1 ) const;
59
65 bool GetCardNumber( unsigned long &cardNumber ) const;
66
67
73 bool SetCardNumber( const unsigned long cardNumber ) const;
74
75
81 bool GetCardValidityEnd( unsigned long &cardValidityEnd ) const;
82
83
89 bool SetCardValidityEnd( const unsigned long cardValidityEnd ) const;
90
91
99 bool GetCardAdditionalDiscountValidity( unsigned long &additionalDiscountValidity, const signed char index = -1 ) const;
100
101
109 bool SetCardAdditionalDiscountValidity( const unsigned long additionalDiscountValidity, const signed char index = -1 ) const;
110
111
122 bool GetCardRegionCode( unsigned long &regionCode ) const;
123
124
137 bool GetCardCityCode( unsigned long &cityCode ) const;
138
144 bool SetCardRegionCode( const unsigned long regionCode ) const;
145
154 bool IsDiscountCouponValid( bool &isDiscountCouponValid, const signed char couponIndex ) const;
155
162 bool GetNumberOfDiscountCoupons( unsigned long &numberOfCoupons ) const;
163
172 bool GetDiscountCouponValidityEnd( unsigned long &couponValidityEnd, const signed char couponIndex ) const;
173
182 bool SetDiscountCouponValidityEnd( const unsigned long couponValidityEnd, const signed char couponIndex ) const;
183
192 bool GetDiscountCouponValidityStart(unsigned long &couponValidityStart, const signed char couponIndex ) const;
193
202 bool GetDiscountCouponRegionCode( unsigned long &couponRegionCode, const signed char couponIndex ) const;
203
212 bool GetDiscountCouponType(unsigned long &couponType, const signed char couponIndex ) const;
213
220 bool GetCustomerProfilesCount( unsigned char &customerProfilesCount ) const;
221
233 bool GetCustomerProfileValidityEnd( unsigned long &customerProfileValidityEnd, const unsigned char customerProfileIndex = 0, const signed char index = -1 ) const;
234
242 bool SetCustomerProfileValidityEnd( const unsigned long customerProfileValidityEnd, const unsigned char customerProfileIndex = 0, const signed char index = -1 ) const;
243
251 bool GetCustomerProfileValidityStart( unsigned long &customerProfileValidityStart, const unsigned char customerProfileIndex = 0, const signed char index = -1 ) const;
252
259 bool SetCustomerProfileValidityStart( const unsigned long customerProfileValidityStart, const unsigned char customerProfileIndex = 0, const signed char index = -1 ) const;
260
268 bool GetCardTypeAndSubType( unsigned short &cardType, unsigned short &cardSubType, ECardFacadeDefines::CardTypeStandard &cardStandard, const unsigned char customerProfileIndex, const signed char index = -1 ) const;
269
270
277 bool SetCardTypeAndSubType( const unsigned short cardType, const unsigned short cardSubType, const unsigned char customerProfileIndex, const signed char index = -1 ) const;
278
279
290 bool GetFareProviderNumber( unsigned short &fareProviderNumber, const signed char fareProviderIndex = -1 ) const;
291
299 bool SetFareProviderNumber(const unsigned short providerNumber , const signed char fareProviderIndex = -1 ) const;
300
306 bool GetCardPublisherNumber( unsigned short &cardPublisherNumber ) const;
307
313 bool SetCardPublisherNumber( const unsigned short cardPublisherNumber ) const;
314
321 bool GetNetworkCode( unsigned short &networkCodeInBCD ) const;
322
329 bool SetNetworkCode( const unsigned short networkCodeInBCD ) const;
330
337 bool GetCountryCode( unsigned short &countryCodeInBCD ) const;
338
345 bool SetCountryCode( const unsigned short countryCodeInBCD ) const;
346
352 bool GetAppExpireDate( unsigned long &appExpireDate ) const;
353
359 bool SetAppExpireDate( const unsigned long appExpireDate ) const;
360
366 bool GetAppIssuerType( unsigned short &appIssuerType ) const;
367
373 bool SetAppIssuerType( const unsigned short appIssuerType ) const;
374
381 DEPRECATED( bool GetSaleDate( unsigned long &saleDate, const signed char index = -1 ) const );
382
383
390 DEPRECATED( bool SetSaleDate( const unsigned long saleDate, const signed char index = -1 ) const );
391
392
400 bool IsCardBlocked( bool &cardBlocked, const signed char index = -1 ) const;
401
410 bool SetCardBlocked( const bool blocked, const signed char index = -1 ) const;
411
412
419 bool IsCardSold( bool &cardSold, const signed char index = -1 ) const;
420
428 bool SetCardSold( const bool sold, const signed char index = -1 ) const;
429
435 bool GetUID( std::string &uid ) const;
436
442 bool GetRawUID( unsigned char *&uid ) const;
443
449 bool IsServiceCard( bool &serviceCard ) const;
450
457 bool SetServiceCard( const bool serviceCard ) const;
458
464 bool GetBornNumber( unsigned long &bornNumber ) const;
465
471 bool SetBornNumber( const unsigned long bornNumber ) const;
472
480 bool GetCardOwnerName( char *ownerName, unsigned short &nameLength, ECardFacadeDefines::TextEncoding &encoding ) const;
481
488 bool SetCardOwnerName( const char *ownerName, const unsigned short nameLength ) const;
489
497 bool GetCardOwnerSurname( char *ownerSurname, unsigned short &surnameLength, ECardFacadeDefines::TextEncoding &encoding ) const;
498
505 bool SetCardOwnerSurname( const char *ownerSurname, const unsigned short surnameLength ) const;
506
512 bool GetEventCount( unsigned long &eventCount ) const;
513
521 bool GetCommonDataCount( unsigned char &commonDataCount ) const;
522
531 bool GetCardPublisherVersion( unsigned char &publisherVersion );
532
541 bool SetCardPublisherVersion( unsigned char publisherVersion );
542
549 bool IsTransportSectionValid( bool &tranportSectionValid, const signed char index = -1 ) const;
550
556 bool GetDailyCappingDate( unsigned long &dailyCappingDate );
557
563 bool SetDailyCappingDate( unsigned long dailyCappingDate );
564
570 bool GetDailyCappingSum( unsigned short &dailyCappingSum );
571
577 bool SetDailyCappingSum( unsigned short dailyCappingSum );
578
584 bool GetWeeklyCappingDate( unsigned long &weeklyCappingDate );
585
591 bool SetWeeklyCappingDate( unsigned long weeklyCappingDate );
592
598 bool GetWeeklyCappingSum( unsigned short &weeklyCappingSum );
599
605 bool SetWeeklyCappingSum( unsigned short weeklyCappingSum );
606
612 bool GetCappingProvider( unsigned short &cappingProvider );
613
619 bool SetCappingProvider( unsigned short cappingProvider );
620
627
634
638 void Clear();
639
644 bool IsModifiedData() const;
645
651 bool PrepareWriteRequest( EM::PT::EDataCollection *writeRequest ) const;
652
658 bool AddDataToWriteRequest( EM::PT::EDataCollection *writeRequest ) const;
659
665 bool AddDataTypeToReadRequest(PT::EAplRequest *readRequest[] , const unsigned short dataTypesOperation) const;
666
673 bool IsCommonDataFeatureEnabled( const ECardFacadeDefines::CommonDataFeatures feature, bool &enabled ) const;
674
681 bool IsCardFeatureEnabled( const ECardFacadeDefines::CommonCardFeatures feature, bool &enabled ) const;
682
689 bool IsDataValid( bool &validData, const signed char index = -1 );
690
691 unsigned short GetRequiredDataReadOperation( const unsigned short dataTypesOperation ) const;
692
693 private:
695
696 class DataClass;
697 DataClass *d;
698
700 };
701 }
702}
703
704#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 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:280
CommonCardFeatures
Definition ECardFacadeDefines.h:79
CardTypeStandard
Definition ECardFacadeDefines.h:248
ReturnValues
Definition ECardFacadeDefines.h:145
CommonDataFeatures
Definition ECardFacadeDefines.h:135
TextEncoding
Definition ECardFacadeDefines.h:217
SYSTEM INCLUDES.
Definition CardFacadeManagerXML.h:7