some more thinking about delay manager
This commit is contained in:
parent
99fd001292
commit
9fff409630
17 changed files with 320 additions and 96 deletions
|
@ -14,8 +14,8 @@
|
|||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#ifndef CORE_DELAYMANAGER_H
|
||||
#define CORE_DELAYMANAGER_H
|
||||
#ifndef CORE_DELAYMANAGER_MANAGER_H
|
||||
#define CORE_DELAYMANAGER_MANAGER_H
|
||||
|
||||
#include <list>
|
||||
#include <set>
|
||||
|
@ -34,13 +34,14 @@
|
|||
#include "job.h"
|
||||
|
||||
namespace Core {
|
||||
namespace DelayManager {
|
||||
|
||||
class DelayManager : public QObject
|
||||
class Manager : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
DelayManager(Job::Id maxParallelJobs = 5, QObject* parent = nullptr);
|
||||
~DelayManager();
|
||||
Manager(Job::Id maxParallelJobs = 5, QObject* parent = nullptr);
|
||||
~Manager();
|
||||
|
||||
void getOwnVCard();
|
||||
void getOwnInfo();
|
||||
|
@ -58,6 +59,7 @@ signals:
|
|||
void receivedOwnInfo(const Shared::Info& info);
|
||||
|
||||
public slots:
|
||||
void disconnected();
|
||||
void ownVCardReceived(const Shared::VCard& card);
|
||||
void receivedVCard(const QString& jid, const Shared::VCard& card);
|
||||
void receivedBundles(const QString& jid);
|
||||
|
@ -67,6 +69,7 @@ private:
|
|||
void scheduleJob(Job* job);
|
||||
void preExecuteJob(Job* job);
|
||||
void executeJob(Job* job);
|
||||
void jobIsCanceled(Job* job, bool wasRunning);
|
||||
void jobIsDone(Job::Id jobId);
|
||||
Job::Id getNextJobId();
|
||||
void replaceJob(Job* job);
|
||||
|
@ -108,9 +111,12 @@ private:
|
|||
Job::Id ownInfoJobId;
|
||||
std::map<QString, Job::Id> scheduledVCards;
|
||||
std::map<QString, Job::Id> requestedVCards;
|
||||
#ifdef WITH_OMEMO
|
||||
std::map<QString, Job::Id> requestedBundles;
|
||||
#endif
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endif // CORE_DELAYMANAGER_H
|
||||
#endif // CORE_DELAYMANAGER_MANAGER_H
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue