Skip to content

Latest commit

 

History

History
81 lines (62 loc) · 2.25 KB

counter.h

File metadata and controls

81 lines (62 loc) · 2.25 KB
 
Dec 21, 2012
Dec 21, 2012
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/*
* Copyright © 2012, Jolla.
*
* This program is licensed under the terms and conditions of the
* Apache License, version 2.0. The full text of the Apache License is at
* http://www.apache.org/licenses/LICENSE-2.0
*
*/
#ifndef COUNTER_H
#define COUNTER_H
#include <QObject>
#include <QVariantMap>
#include <QtDBus/QDBusAbstractAdaptor>
#include <QtDBus/QDBusObjectPath>
Mar 28, 2024
Mar 28, 2024
18
#include "networkmanager.h"
Dec 21, 2012
Dec 21, 2012
19
Mar 15, 2013
Mar 15, 2013
20
21
22
/*
* Proxy class for interface net.connman.Counter
*/
Oct 19, 2013
Oct 19, 2013
23
24
// static const char counterPath[] = "/ConnectivityCounter";
Apr 4, 2024
Apr 4, 2024
25
26
class CounterPrivate;
Dec 21, 2012
Dec 21, 2012
27
28
29
class Counter : public QObject
{
Q_OBJECT
Feb 20, 2014
Feb 20, 2014
30
31
Q_PROPERTY(quint64 bytesReceived READ bytesReceived NOTIFY bytesReceivedChanged)
Q_PROPERTY(quint64 bytesTransmitted READ bytesTransmitted NOTIFY bytesTransmittedChanged)
Mar 15, 2013
Mar 15, 2013
32
33
34
35
36
37
Q_PROPERTY(quint32 secondsOnline READ secondsOnline NOTIFY secondsOnlineChanged)
Q_PROPERTY(bool roaming READ roaming NOTIFY roamingChanged)
Q_PROPERTY(quint32 accuracy READ accuracy WRITE setAccuracy NOTIFY accuracyChanged)
Q_PROPERTY(quint32 interval READ interval WRITE setInterval NOTIFY intervalChanged)
Q_PROPERTY(bool running READ running WRITE setRunning NOTIFY runningChanged)
Dec 21, 2012
Dec 21, 2012
38
Q_DISABLE_COPY(Counter)
Oct 19, 2013
Oct 19, 2013
39
Jun 28, 2017
Jun 28, 2017
40
41
public:
explicit Counter(QObject *parent = 0);
Dec 21, 2012
Dec 21, 2012
42
43
virtual ~Counter();
Feb 20, 2014
Feb 20, 2014
44
45
quint64 bytesReceived() const;
quint64 bytesTransmitted() const;
Mar 15, 2013
Mar 15, 2013
46
47
48
49
50
51
52
53
54
55
56
57
quint32 secondsOnline() const;
bool roaming() const;
quint32 accuracy() const;
void setAccuracy(quint32 accuracy);
quint32 interval() const;
void setInterval(quint32 interval);
bool running() const;
void setRunning(bool on);
Dec 21, 2012
Dec 21, 2012
58
Nov 8, 2013
Nov 8, 2013
59
Q_SIGNALS:
Oct 19, 2013
Oct 19, 2013
60
void counterChanged(const QString &servicePath, const QVariantMap &counters, bool roaming);
Feb 20, 2014
Feb 20, 2014
61
62
void bytesReceivedChanged(quint64 bytesRx);
void bytesTransmittedChanged(quint64 bytesTx);
Mar 15, 2013
Mar 15, 2013
63
64
65
66
67
void secondsOnlineChanged(quint32 seconds);
void roamingChanged(bool roaming);
void accuracyChanged(quint32 accuracy);
void intervalChanged(quint32 interval);
void runningChanged(bool running);
Jun 10, 2014
Jun 10, 2014
68
69
70
71
private Q_SLOTS:
void updateCounterAgent();
Dec 21, 2012
Dec 21, 2012
72
private:
Apr 4, 2024
Apr 4, 2024
73
CounterPrivate *d_ptr;
Dec 28, 2012
Dec 28, 2012
74
Oct 28, 2014
Oct 28, 2014
75
friend class CounterAdaptor;
Mar 15, 2013
Mar 15, 2013
76
Jun 28, 2017
Jun 28, 2017
77
void serviceUsage(const QString &servicePath, const QVariantMap &counters, bool roaming);
Oct 28, 2014
Oct 28, 2014
78
void release();
Mar 15, 2013
Mar 15, 2013
79
};
Dec 21, 2012
Dec 21, 2012
80
81
#endif // COUNTER_H