AusweisApp2
Lade ...
Suche ...
Keine Treffer
CallCost.h
gehe zur Dokumentation dieser Datei
1
7#pragma once
8
9#include <QDebug>
10#include <QJsonValue>
11
12
13namespace governikus
14{
15
17{
18 friend bool operator==(const CallCost& pLeft, const CallCost& pRight);
19
20 int mFreeSeconds;
21 double mLandlineCentsPerMinute, mLandlineCentsPerCall;
22 double mMobileCentsPerMinute, mMobileCentsPerCall;
23
24 public:
25 explicit CallCost(int pFreeSeconds = 0, double pLandlineCentsPerMinute = 0.0, double pLandlineCentsPerCall = 0.0, double pMobileCentsPerMinute = 0.0, double pMobileCentsPerCall = 0.0);
26 explicit CallCost(const QJsonValue& pJson);
27
28 void load();
29 void save();
30
31 [[nodiscard]] bool isNull() const;
32 [[nodiscard]] int getFreeSeconds() const;
33 [[nodiscard]] double getLandlineCentsPerMinute() const;
34 [[nodiscard]] double getLandlineCentsPerCall() const;
35 [[nodiscard]] double getMobileCentsPerMinute() const;
36 [[nodiscard]] double getMobileCentsPerCall() const;
37};
38
39
40inline bool operator==(const CallCost& pLeft, const CallCost& pRight)
41{
42 return &pLeft == &pRight || (
43 pLeft.mFreeSeconds == pRight.mFreeSeconds &&
44 pLeft.mLandlineCentsPerMinute == pRight.mLandlineCentsPerMinute &&
45 pLeft.mLandlineCentsPerCall == pRight.mLandlineCentsPerCall &&
46 pLeft.mMobileCentsPerMinute == pRight.mMobileCentsPerMinute &&
47 pLeft.mMobileCentsPerCall == pRight.mMobileCentsPerCall);
48}
49
50
51} // namespace governikus
52
53QDebug operator<<(QDebug pDbg, const governikus::CallCost& pCallCost);
QDebug operator<<(QDebug pDbg, const governikus::CallCost &pCallCost)
Definition: CallCost.cpp:79
Definition: CallCost.h:17
double getLandlineCentsPerCall() const
Definition: CallCost.cpp:61
double getMobileCentsPerCall() const
Definition: CallCost.cpp:73
int getFreeSeconds() const
Definition: CallCost.cpp:49
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:40
Implementation of ActivationContext for Intent based activation on Android systems.
Definition: ActivationContext.h:15
bool operator==(const CVCertificate &pLeft, const CVCertificate &pRight)
Definition: CVCertificate.h:72