1 #ifndef QTDATASYNC_ANDROIDBACKGROUNDSERVICE_H 2 #define QTDATASYNC_ANDROIDBACKGROUNDSERVICE_H 4 #include <QtCore/qscopedpointer.h> 6 #include <QtService/service.h> 8 #include <QtAndroidExtras/qandroidintent.h> 10 #include <QtDataSync/setup.h> 11 #include <QtDataSync/syncmanager.h> 13 #include "QtDataSyncAndroid/qtdatasyncandroid_global.h" 17 class AndroidBackgroundServicePrivate;
24 Q_PROPERTY(
bool waitFullSync READ waitFullSync WRITE setWaitFullSync NOTIFY waitFullSyncChanged)
39 bool waitFullSync()
const;
43 void setWaitFullSync(
bool waitFullSync);
47 void waitFullSyncChanged(
bool waitFullSync, QPrivateSignal);
51 virtual QString setupName()
const;
53 virtual void prepareSetup(
Setup &setup);
66 virtual int onStartCommand(
const QAndroidIntent &intent,
int flags,
int startId);
68 virtual QAndroidJniObject createForegroundNotification() = 0;
70 virtual bool stopSelf(
int startId);
73 void startBackgroundSync(
int startId);
74 void registerSync(
int startId, qint64 interval);
83 #endif // QTDATASYNC_ANDROIDBACKGROUNDSERVICE_H
The class to setup and create datasync instances.
static const QString RegisterSyncAction
The Intent Action used to register the service for background synchronization.
static const QString BackgroundSyncAction
The Intent Action used to start the background synchronization.
The primary namespace of the QtDataSync library.
SyncState
The possible states the sync engine can be in.
An extension of QtService to create a synchronization service for android.
static const int ForegroundNotificationId
The ID of the Foreground notification shown by the service while synchronizing.