AusweisApp
Lade ...
Suche ...
Keine Treffer
CallCost.h
gehe zur Dokumentation dieser Datei
1
9#pragma once
10
11#include <QDebug>
12#include <QJsonValue>
13
14
15namespace governikus
16{
17
19{
20 friend bool operator==(const CallCost& pLeft, const CallCost& pRight);
21
22 private:
23 int mFreeSeconds;
24 double mLandlineCentsPerMinute;
25 double mLandlineCentsPerCall;
26 double mMobileCentsPerMinute;
27 double mMobileCentsPerCall;
28
29 public:
30 explicit CallCost(int pFreeSeconds = 0, double pLandlineCentsPerMinute = 0.0, double pLandlineCentsPerCall = 0.0, double pMobileCentsPerMinute = 0.0, double pMobileCentsPerCall = 0.0);
31 explicit CallCost(const QJsonValue& pJson);
32
33 void load();
34 void save();
35
36 [[nodiscard]] bool isNull() const;
37 [[nodiscard]] int getFreeSeconds() const;
38 [[nodiscard]] double getLandlineCentsPerMinute() const;
39 [[nodiscard]] double getLandlineCentsPerCall() const;
40 [[nodiscard]] double getMobileCentsPerMinute() const;
41 [[nodiscard]] double getMobileCentsPerCall() const;
42};
43
44
45inline bool operator==(const CallCost& pLeft, const CallCost& pRight)
46{
47 return &pLeft == &pRight || (
48 pLeft.mFreeSeconds == pRight.mFreeSeconds &&
49 pLeft.mLandlineCentsPerMinute == pRight.mLandlineCentsPerMinute &&
50 pLeft.mLandlineCentsPerCall == pRight.mLandlineCentsPerCall &&
51 pLeft.mMobileCentsPerMinute == pRight.mMobileCentsPerMinute &&
52 pLeft.mMobileCentsPerCall == pRight.mMobileCentsPerCall);
53}
54
55
56} // namespace governikus
57
58QDebug operator<<(QDebug pDbg, const governikus::CallCost& pCallCost);
QDebug operator<<(QDebug pDbg, const governikus::CallCost &pCallCost)
Definition CallCost.cpp:79
Definition CallCost.h:19
double getLandlineCentsPerCall() const
Definition CallCost.cpp:61
double getMobileCentsPerCall() const
Definition CallCost.cpp:73
int getFreeSeconds() const
Definition CallCost.cpp:49
CallCost(int pFreeSeconds=0, double pLandlineCentsPerMinute=0.0, double pLandlineCentsPerCall=0.0, double pMobileCentsPerMinute=0.0, double pMobileCentsPerCall=0.0)
Definition CallCost.cpp:23
bool isNull() const
Definition CallCost.cpp:43
double getMobileCentsPerMinute() const
Definition CallCost.cpp:67
double getLandlineCentsPerMinute() const
Definition CallCost.cpp:55
friend bool operator==(const CallCost &pLeft, const CallCost &pRight)
Definition CallCost.h:45
Implementation of GeneralAuthenticate response APDUs.
Definition CommandApdu.h:17
QSharedPointer< T > decodeObject(const QByteArray &pData, bool pLogging=true)
Template function for decoding an OpenSSL type from DER encoded QByteArray.
Definition ASN1TemplateUtil.h:114
bool operator==(const CommandApdu &pLeft, const CommandApdu &pRight)
Definition CommandApdu.h:105