AppCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ECommonFacade.h
Go to the documentation of this file.
1 
2 #ifndef EM_CARDFACADEECOMMONFACADE_H
3 #define EM_CARDFACADEECOMMONFACADE_H
4 
5 #include <string>
6 #include <stdint.h>
7 #include "appcore/cardfacade/ECardFacadeDefines.h"
8 
9 
10 namespace EM
11 {
12  namespace PT
13  {
14  class EDataCollection;
15  class EAplRequest;
16  }
17 
18  namespace CardFacade
19  {
20  class ECardDataStorage;
22  {
23  public:
24  ECommonFacade( ECardDataStorage *cardDataStorage );
25  virtual ~ECommonFacade();
26 
27  virtual bool GetLogicalCardNumber( unsigned long &logicalCardNumber, signed char index = -1 ) = 0;
28  virtual bool GetLogicalCardNumber( std::string &logicalCardNumber, signed char index = -1 ) = 0;
29 
30  virtual bool GetFareProviderNumber( unsigned short &fareProviderNumber, signed char fareProviderIndex = -1 ) = 0;
31  virtual bool SetFareProviderNumber( unsigned short fareProviderNumber, signed char index = -1 ) = 0;
32 
33  virtual bool GetCardPublisherNumber( unsigned short &cardPublisherNumber ) = 0;
34  virtual bool SetCardPublisherNumber( unsigned short cardPublisherNumber ) = 0;
35 
36  virtual bool GetUID( std::string &uid ) = 0;
37  virtual bool GetRawUID( unsigned char *&uid ) = 0;
38 
39  virtual bool GetCardNumber( unsigned long &cardNumber ) = 0;
40  virtual bool SetCardNumber( unsigned long cardNumber ) = 0;
41 
42  virtual bool GetCardValidityEnd( unsigned long &cardValidityEnd ) = 0;
43  virtual bool SetCardValidityEnd( unsigned long cardValidityEnd ) = 0;
44 
45  virtual bool GetCardAdditionalDiscountValidity( unsigned long &additionalDiscountValidity, signed char index = -1 ) = 0;
46  virtual bool SetCardAdditionalDiscountValidity( unsigned long additionalDiscountValidity, signed char index = -1 ) = 0;
47 
48  virtual bool GetCustomerProfilesCount( unsigned char &customerProfilesCount ) = 0;
49 
50  virtual bool GetCustomerProfileValidityEnd( unsigned long &customerProfileValidity, unsigned char customerProfileIndex = 0, signed char index = -1 ) = 0;
51  virtual bool SetCustomerProfileValidityEnd( unsigned long customerProfileValidity, unsigned char customerProfileIndex = 0, signed char index = -1 ) = 0;
52 
53  virtual bool GetCustomerProfileValidityStart( unsigned long &customerProfileValidityStart, unsigned char customerProfileIndex = 0, signed char index = -1 ) = 0;
54  virtual bool SetCustomerProfileValidityStart( unsigned long customerProfileValidityStart, unsigned char customerProfileIndex = 0, signed char index = -1 ) = 0;
55 
56  virtual bool GetCardTypeAndSubType( unsigned short &cardType, unsigned short &cardSubType, ECardFacadeDefines::CardTypeStandard &cardStandard, unsigned char customerProfileIndex, signed char index = -1 ) = 0;
57  virtual bool SetCardTypeAndSubType( unsigned short cardType, unsigned short cardSubType, unsigned char customerProfileIndex, signed char index = -1 ) = 0;
58 
59  virtual bool GetSaleDate( unsigned long &saleDate, signed char index = -1 ) = 0;
60  virtual bool SetSaleDate( unsigned long saleDate, signed char index = -1 ) = 0;
61 
62  virtual bool IsCardBlocked( bool &cardBlocked, signed char index = -1 ) = 0;
63  virtual bool SetCardBlocked( bool blocked, signed char index = -1 ) = 0;
64 
65  virtual bool IsCardSold( bool &cardSold, signed char index = -1 ) = 0;
66  virtual bool SetCardSold( bool sold, signed char index = -1 ) = 0;
67 
68  virtual bool IsServiceCard( bool &serviceCard ) = 0;
69  virtual bool SetServiceCard( bool serviceCard ) = 0;
70 
71  virtual bool GetCardRegionCode( unsigned long &regionCode ) = 0;
72  virtual bool SetCardRegionCode( unsigned long regionCode ) = 0;
73 
74  virtual bool GetCardCityCode( unsigned long &cityCode ) = 0;
75  virtual bool SetCardCityCode( unsigned long cityCode ) = 0;
76 
77  virtual bool GetNetworkCode( unsigned short &networkCode ) = 0;
78  virtual bool SetNetworkCode( unsigned short networkCode ) = 0;
79 
80  virtual bool GetCountryCode( unsigned short &countryCode ) = 0;
81  virtual bool SetCountryCode( unsigned short countryCode ) = 0;
82 
83  virtual bool GetAppExpireDate( unsigned long &appExpireDate ) = 0;
84  virtual bool SetAppExpireDate( unsigned long appExpireDate ) = 0;
85 
86  virtual bool GetAppIssuerType( unsigned short &appIssuerType ) = 0;
87  virtual bool SetAppIssuerType( unsigned short appIssuerType ) = 0;
88 
89  virtual bool GetBornNumber( unsigned long &bornNumber ) = 0;
90  virtual bool SetBornNumber( unsigned long bornNumber ) = 0;
91 
92  virtual bool GetCardOwnerName( char *ownerName, unsigned short &nameLength, ECardFacadeDefines::TextEncoding &encoding ) = 0;
93  virtual bool SetCardOwnerName( char *ownerName, unsigned short nameLength ) = 0;
94 
95  virtual bool GetCardOwnerSurname( char *ownerSurname, unsigned short &surnameLength, ECardFacadeDefines::TextEncoding &encoding ) = 0;
96  virtual bool SetCardOwnerSurname( char *ownerSurname, unsigned short surnameLength ) = 0;
97 
98  virtual bool SetPublisherProviderID( unsigned long publisherProviderId ) = 0;
99  virtual bool GetPublisherProviderID( unsigned long &publisherProviderId ) = 0;
100 
101  virtual bool IsDiscountCouponValid( bool &isDiscountCouponValid, signed char couponIndex ) = 0;
102  virtual bool GetNumberOfDiscountCoupons( unsigned long &numberOfCoupons ) = 0;
103 
104  virtual bool GetDiscountCouponValidityEnd(unsigned long &couponValidityEnd, signed char couponIndex ) = 0;
105  virtual bool SetDiscountCouponValidityEnd(unsigned long couponValidityEnd, signed char couponIndex ) = 0;
106 
107  virtual bool GetDiscountCouponValidityStart(unsigned long &couponValidityStart, signed char couponIndex ) = 0;
108  virtual bool GetDiscountCouponRegionCode( unsigned long &couponRegionCode, signed char couponIndex ) = 0;
109  virtual bool GetDiscountCouponType(unsigned long &couponType, signed char couponIndex ) = 0;
110 
111  virtual bool GetCardPublisherVersion( unsigned char &publisherVersion ) = 0;
112  virtual bool SetCardPublisherVersion( unsigned char publisherVersion ) = 0;
113 
114  virtual bool GetDailyCappingDate( unsigned long &dailyCappingDate ) = 0;
115  virtual bool SetDailyCappingDate( unsigned long dailyCappingDate ) = 0;
116 
117  virtual bool GetDailyCappingSum( unsigned short &dailyCappingSum ) = 0;
118  virtual bool SetDailyCappingSum( unsigned short dailyCappingSum ) = 0;
119 
120  virtual bool GetWeeklyCappingDate( unsigned long &weeklyCappingDate ) = 0;
121  virtual bool SetWeeklyCappingDate( unsigned long weeklyCappingDate ) = 0;
122 
123  virtual bool GetWeeklyCappingSum( unsigned short &weeklyCappingSum ) = 0;
124  virtual bool SetWeeklyCappingSum( unsigned short weeklyCappingSum ) = 0;
125 
126  virtual bool GetCappingProvider( unsigned short &cappingProvider ) = 0;
127  virtual bool SetCappingProvider( unsigned short cappingProvider ) = 0;
128 
129  virtual bool GetCappingProviderType( ECardFacadeDefines::CappingProviderType &cappingProviderType ) = 0;
130  virtual bool SetCappingProviderType( ECardFacadeDefines::CappingProviderType cappingProviderType ) = 0;
131 
132  virtual bool GetEventCount( unsigned long &eventCount ) = 0;
133 
134  virtual bool GetCommonDataCount( unsigned char &commonDataCount ) = 0;
135 
136  virtual bool IsTransportSectionValid( bool &tranportSectionValid, signed char index = -1 ) = 0;
137 
138  virtual void Clear();
139 
140  virtual bool IsModifiedData();
141 
142  virtual bool PrepareWriteRequest( EM::PT::EDataCollection *writeRequest ) = 0;
143 
144  virtual bool AddDataToWriteRequest( EM::PT::EDataCollection *writeRequest );
145  virtual bool AddDataTypeToReadRequest( EM::PT::EAplRequest *readRequest, unsigned short dataTypesOperation ) = 0;
146 
147  virtual bool IsCommonDataFeatureEnabled( ECardFacadeDefines::CommonDataFeatures feature, bool &enabled ) = 0;
148 
149  virtual void Init();
150 
151  bool IsCardFeatureEnabled( ECardFacadeDefines::CommonCardFeatures feature, bool &enabled );
152 
153  virtual unsigned short GetRequiredDataReadOperation( unsigned short dataTypesOperation ) const = 0;
154 
155  virtual bool IsDataValid( bool &validData, signed char index = -1 ) = 0;
156 
157  protected:
158  void SetCardFeature( uint64_t features );
159 
160  private:
162 
163  class DataClass;
164  DataClass *d;
165 
167  };
168  }
169 }
170 
171 #endif
virtual bool IsModifiedData()
Definition: ECommonFacade.cpp:96
virtual bool GetAppExpireDate(unsigned long &appExpireDate)=0
virtual bool SetCustomerProfileValidityEnd(unsigned long customerProfileValidity, unsigned char customerProfileIndex=0, signed char index=-1)=0
virtual bool GetFareProviderNumber(unsigned short &fareProviderNumber, signed char fareProviderIndex=-1)=0
Definition: ECommonFacade.h:21
virtual bool SetFareProviderNumber(unsigned short fareProviderNumber, signed char index=-1)=0
virtual bool SetCappingProvider(unsigned short cappingProvider)=0
virtual bool GetNetworkCode(unsigned short &networkCode)=0
CappingProviderType
Definition: ECardFacadeDefines.h:279
virtual bool SetAppExpireDate(unsigned long appExpireDate)=0
virtual bool GetCommonDataCount(unsigned char &commonDataCount)=0
virtual bool SetCardPublisherVersion(unsigned char publisherVersion)=0
virtual void Clear()
Definition: ECommonFacade.cpp:91
virtual bool GetDiscountCouponValidityStart(unsigned long &couponValidityStart, signed char couponIndex)=0
virtual bool GetCustomerProfileValidityStart(unsigned long &customerProfileValidityStart, unsigned char customerProfileIndex=0, signed char index=-1)=0
virtual bool GetNumberOfDiscountCoupons(unsigned long &numberOfCoupons)=0
virtual bool GetCountryCode(unsigned short &countryCode)=0
virtual bool GetDailyCappingSum(unsigned short &dailyCappingSum)=0
virtual bool SetBornNumber(unsigned long bornNumber)=0
virtual bool GetCardNumber(unsigned long &cardNumber)=0
EEventTripTicketPr __EDATAPTR d
Definition: EEventTripTicket.h:96
virtual bool SetCardBlocked(bool blocked, signed char index=-1)=0
virtual ~ECommonFacade()
Definition: ECommonFacade.cpp:54
virtual bool SetCardAdditionalDiscountValidity(unsigned long additionalDiscountValidity, signed char index=-1)=0
virtual bool SetSaleDate(unsigned long saleDate, signed char index=-1)=0
bool IsCardFeatureEnabled(ECardFacadeDefines::CommonCardFeatures feature, bool &enabled)
Definition: ECommonFacade.cpp:64
void SetCardFeature(uint64_t features)
Definition: ECommonFacade.cpp:75
virtual bool SetWeeklyCappingDate(unsigned long weeklyCappingDate)=0
virtual bool GetCardOwnerName(char *ownerName, unsigned short &nameLength, ECardFacadeDefines::TextEncoding &encoding)=0
virtual bool GetSaleDate(unsigned long &saleDate, signed char index=-1)=0
virtual void Init()
Definition: ECommonFacade.cpp:60
virtual bool IsCommonDataFeatureEnabled(ECardFacadeDefines::CommonDataFeatures feature, bool &enabled)=0
virtual bool GetCustomerProfilesCount(unsigned char &customerProfilesCount)=0
virtual bool GetCardPublisherNumber(unsigned short &cardPublisherNumber)=0
ECommonFacade(ECardDataStorage *cardDataStorage)
Definition: ECommonFacade.cpp:45
virtual bool GetCardValidityEnd(unsigned long &cardValidityEnd)=0
virtual bool GetCardTypeAndSubType(unsigned short &cardType, unsigned short &cardSubType, ECardFacadeDefines::CardTypeStandard &cardStandard, unsigned char customerProfileIndex, signed char index=-1)=0
virtual bool GetPublisherProviderID(unsigned long &publisherProviderId)=0
virtual bool AddDataTypeToReadRequest(EM::PT::EAplRequest *readRequest, unsigned short dataTypesOperation)=0
virtual bool GetWeeklyCappingDate(unsigned long &weeklyCappingDate)=0
virtual bool SetNetworkCode(unsigned short networkCode)=0
virtual bool IsServiceCard(bool &serviceCard)=0
virtual bool GetWeeklyCappingSum(unsigned short &weeklyCappingSum)=0
virtual bool GetAppIssuerType(unsigned short &appIssuerType)=0
virtual bool GetBornNumber(unsigned long &bornNumber)=0
virtual bool SetCardRegionCode(unsigned long regionCode)=0
virtual bool GetDiscountCouponType(unsigned long &couponType, signed char couponIndex)=0
CommonCardFeatures
Definition: ECardFacadeDefines.h:78
virtual bool GetCardOwnerSurname(char *ownerSurname, unsigned short &surnameLength, ECardFacadeDefines::TextEncoding &encoding)=0
virtual bool SetCardPublisherNumber(unsigned short cardPublisherNumber)=0
virtual bool SetCardOwnerSurname(char *ownerSurname, unsigned short surnameLength)=0
virtual bool GetUID(std::string &uid)=0
virtual bool SetCappingProviderType(ECardFacadeDefines::CappingProviderType cappingProviderType)=0
virtual bool GetCappingProviderType(ECardFacadeDefines::CappingProviderType &cappingProviderType)=0
virtual bool GetCustomerProfileValidityEnd(unsigned long &customerProfileValidity, unsigned char customerProfileIndex=0, signed char index=-1)=0
virtual bool GetRawUID(unsigned char *&uid)=0
TextEncoding
Definition: ECardFacadeDefines.h:216
virtual bool GetCardRegionCode(unsigned long &regionCode)=0
virtual bool IsTransportSectionValid(bool &tranportSectionValid, signed char index=-1)=0
virtual bool SetCardTypeAndSubType(unsigned short cardType, unsigned short cardSubType, unsigned char customerProfileIndex, signed char index=-1)=0
virtual bool GetCardAdditionalDiscountValidity(unsigned long &additionalDiscountValidity, signed char index=-1)=0
virtual bool SetCustomerProfileValidityStart(unsigned long customerProfileValidityStart, unsigned char customerProfileIndex=0, signed char index=-1)=0
virtual bool SetDailyCappingSum(unsigned short dailyCappingSum)=0
virtual bool SetServiceCard(bool serviceCard)=0
virtual bool IsCardBlocked(bool &cardBlocked, signed char index=-1)=0
__ECLASS DataClass
Definition: EEventUpdateCustomerData.h:35
card data storage, who fill if card readed
Definition: ECardDataStorage.h:59
virtual bool IsDataValid(bool &validData, signed char index=-1)=0
virtual bool SetCardValidityEnd(unsigned long cardValidityEnd)=0
SYSTEM INCLUDES.
Definition: CardFacadeManagerXML.h:6
virtual bool SetCountryCode(unsigned short countryCode)=0
virtual unsigned short GetRequiredDataReadOperation(unsigned short dataTypesOperation) const =0
virtual bool GetCardPublisherVersion(unsigned char &publisherVersion)=0
virtual bool SetCardSold(bool sold, signed char index=-1)=0
virtual bool IsDiscountCouponValid(bool &isDiscountCouponValid, signed char couponIndex)=0
CardTypeStandard
Definition: ECardFacadeDefines.h:247
CommonDataFeatures
Definition: ECardFacadeDefines.h:134
virtual bool SetCardOwnerName(char *ownerName, unsigned short nameLength)=0
virtual bool SetPublisherProviderID(unsigned long publisherProviderId)=0
virtual bool GetDailyCappingDate(unsigned long &dailyCappingDate)=0
virtual bool GetDiscountCouponRegionCode(unsigned long &couponRegionCode, signed char couponIndex)=0
virtual bool GetCappingProvider(unsigned short &cappingProvider)=0
virtual bool GetCardCityCode(unsigned long &cityCode)=0
virtual bool SetDiscountCouponValidityEnd(unsigned long couponValidityEnd, signed char couponIndex)=0
virtual bool GetDiscountCouponValidityEnd(unsigned long &couponValidityEnd, signed char couponIndex)=0
virtual bool SetAppIssuerType(unsigned short appIssuerType)=0
virtual bool PrepareWriteRequest(EM::PT::EDataCollection *writeRequest)=0
virtual bool SetDailyCappingDate(unsigned long dailyCappingDate)=0
virtual bool GetLogicalCardNumber(unsigned long &logicalCardNumber, signed char index=-1)=0
virtual bool IsCardSold(bool &cardSold, signed char index=-1)=0
virtual bool SetCardNumber(unsigned long cardNumber)=0
virtual bool AddDataToWriteRequest(EM::PT::EDataCollection *writeRequest)
Definition: ECommonFacade.cpp:104
virtual bool SetWeeklyCappingSum(unsigned short weeklyCappingSum)=0
virtual bool SetCardCityCode(unsigned long cityCode)=0
virtual bool GetEventCount(unsigned long &eventCount)=0
Definition: ECommonFacade.cpp:80