1 #ifndef QTDATASYNC_ANDROIDSYNCCONTROL_H 2 #define QTDATASYNC_ANDROIDSYNCCONTROL_H 6 #include <QtCore/qobject.h> 7 #include <QtCore/qscopedpointer.h> 9 #include "QtDataSyncAndroid/qtdatasyncandroid_global.h" 13 class AndroidSyncControlPrivate;
20 Q_PROPERTY(
bool valid READ isValid NOTIFY validChanged)
23 Q_PROPERTY(
QString serviceId READ serviceId WRITE setServiceId NOTIFY serviceIdChanged)
25 Q_PROPERTY(qint64 interval READ interval WRITE setInterval NOTIFY intervalChanged)
28 Q_PROPERTY(
bool enabled READ isEnabled WRITE setEnabled)
43 qint64 interval() const;
45 std::chrono::minutes intervalMinutes() const;
47 bool isEnabled() const;
50 template <typename TRep, typename TPeriod>
51 void setInterval(const
std::chrono::duration<TRep, TPeriod> &interval);
53 void setInterval(
std::chrono::minutes interval);
57 void setServiceId(
QString serviceId);
59 void setInterval(qint64 interval);
61 void setEnabled(
bool enabled);
64 bool triggerSyncNow();
68 void validChanged(QPrivateSignal);
70 void serviceIdChanged(const
QString &serviceId, QPrivateSignal);
72 void intervalChanged(qint64 interval, QPrivateSignal);
78 template<typename TRep, typename TPeriod>
81 setInterval(std::chrono::duration_cast<std::chrono::minutes>(interval));
86 #endif // QTDATASYNC_ANDROIDSYNCCONTROL_H A class to manage background synchronization for android.
The primary namespace of the QtDataSync library.