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;
23 {
24 public:
28 ECardDataFacadeCommon( ECardDataStorage *cardDataStorage );
29
30
34 virtual ~ECardDataFacadeCommon( );
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
634 bool GetCappingProviderType( ECardFacadeDefines::CappingProviderType &cappingProviderType );
635
641 bool SetCappingProviderType( ECardFacadeDefines::CappingProviderType cappingProviderType );
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
void Init(__ESTRING path)
#define DLL_API
Definition ECardFacadeDefines.h:8
Definition ECardDataFacadeCommon.h:23
bool AddDataTypeToReadRequest(PT::EAplRequest *readRequest[], const unsigned short dataTypesOperation) const
DEPRECATED(bool SetSaleDate(const unsigned long saleDate, const signed char index=-1) const)
bool AddDataToWriteRequest(EM::PT::EDataCollection *writeRequest) const
bool PrepareWriteRequest(EM::PT::EDataCollection *writeRequest) const
DEPRECATED(bool GetSaleDate(unsigned long &saleDate, const signed char index=-1) const)
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