#ifndef AUTOSYNCPACKINFO_H
#define AUTOSYNCPACKINFO_H

#include <QObject>
#include "packinfoseed2server.h"
#include <QDate>
#include <QThread>
#include <QMutex>

class AutoSyncPackInfo : public QObject
{
    Q_OBJECT
public:
    explicit AutoSyncPackInfo(QObject *parent = nullptr);

signals:

public slots:
    void start();

    void sync(const QDate & dt);

    void loadOut();
protected slots:
    void doSend();
    void syncedOne();

    void doQueue();
private:
    PackInfoSeed2Server * _server;
    QQueue<QDate> _dateQueue;
    PackInfoManger * _manger;
    QThread * th;
    bool inQueue;
    QMutex mutex;
};


#endif // AUTOSYNCPACKINFO_H
